From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 782784DD6C4 for ; Wed, 3 Jun 2026 23:17:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780528660; cv=none; b=gYnXD6DuTHMxyA9JPyOfe0As5TZyZuYVS9JO9aftLSudW64UuSDH93IKCs56OwW033rS0zIvNGVlnJBf9mI7TCDGonQje3/zisjy2kPxIX2zP2/tHUMb+qBL1FEgDO9kVb/dUYLOSRSDVcU5HwB+Rx+vM+d3kngkR2aEUWlzewM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780528660; c=relaxed/simple; bh=AJSPxfgP5SQlVstHDNiVHyfZqJLrhzjZ4XrR9bocubQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SNr71+DJUY598v+DnmYYmbclU6mmK+4km++yM90HfmEZrdx9B5BxQFc6zYOP+qOLmJgqiiWz3U7d7osHtwMc4m52cwp4mxhHdYSLw2/uDJ+/AUTPefRNV7pOU7frX/P+begOf638iz4xUDn1d3oyHcl+L4RSlWo76gRg8sq8nio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=minyard.net; spf=pass smtp.mailfrom=minyard.net; dkim=pass (2048-bit key) header.d=minyard.net header.i=@minyard.net header.b=nFl5yf42; arc=none smtp.client-ip=209.85.167.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=minyard.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=minyard.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=minyard.net header.i=@minyard.net header.b="nFl5yf42" Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-48611d28204so21004b6e.3 for ; Wed, 03 Jun 2026 16:17:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=minyard.net; s=google; t=1780528658; x=1781133458; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=wOrjAy3sfJBraT8vZndOtdFtPFK3vWth1XX7ivB6YhA=; b=nFl5yf42r5e3FpR+rdkO3MR7o151v/r3Nodf+oONWbefMSH3r9DR8zzHL2Ql2h+YSx 7F03+RfpN2wb84AliUxt5K8ut7eNsMRx7jhLKTiBmwj4U4/CWZNRAjYSmlWCFkOV+HTt MJ4YQTW8XORc5Huj2CIREISWko+YMhDGmJnGNqB8I40ULqicVDR/Th1t8DzFfa9tDe3W 7qLXAjqI9NGB0OxZPsj+dyWhGLJ4MC3xnsJTKCn8UfPWQxlby6uIz4d1lq0HjF/Y42es TMKFqzEmR4/NNmoGh83sji6zaC/OxohzgiusK9Tz4rbX5KZJOL+y4LiY/kHIL1q9E7uN lYMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780528658; x=1781133458; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wOrjAy3sfJBraT8vZndOtdFtPFK3vWth1XX7ivB6YhA=; b=NVcnqH/+9hWW/FmOqgjlq4Dl/xPtoWqKVnkWSTyR8UG1Wic8LEhLiQNHBGZkVXyqpt 8hG/CdRCX4wXOj4N1gqjg6hKEPa8DZgHQAeYkXzJeetSjCk2InnQDJz1A0EisluYjxVC YrXgTE3xpRbxa0Alh+23azWH3yA71vaZkYXUmgkggncCk7SP9a4VZCoIt5YrMc9GziE7 eFDZDdt9jur7VF+5iWh588vv9gf0nbxKS5y/QIVP5qJa2RIzH1MTH1xgsgQCd4d56M00 xZ7yLReM9L3vfFkj3ZCrOk1z+wnQMSJ6k7SEpyeDFMbxgmYBu8lUqGb6KvI4sBxJsWoh Rl3w== X-Gm-Message-State: AOJu0Yxqw4DYH8x5O1PG0Sg/KmFUafsgwCpYPyBnFU948zG4wAa/HhqI U8GBjE8zW9Rl6M+tHrklxN7wDvxj5KYCWzQPQbS4nWb4szlyp3YaOynE6J8XOrlHrZo= X-Gm-Gg: Acq92OGRjBXkRkEc4jjCb1fO4zgAKQZHCFWE4Z1F5mcahIZH+Hr9Ad295QDljMnQHFb LiGbuYePSTYAs4CXNEkDy74x5nNoZK7fyaYYzkrCY7z+6PcXjc2IZ1WF6ge5mgsVZxujnfTQtHL A6EcDdxK3rIlsQ6HA6/KNUjg4hFFirb4eorpJFxTKps7kSjcfdcu+AOZlI+R5Ji+wZ7Mp8AyHDJ KfB860IFgOgxn/LTx2NYISODavhqMPMUU7oSoSkSmX+F5MSwd59x0kRLtKGGnqZ09dW04P2EEfO HKsm3qHJLVvtqkpvwoa2P+6Tj5vAF9FfxgZlokA6T5CxypDvRy8LS28aiZIL/PAmgCQ68+DcgRO Cf7GrHBUY7uFZFJ6Y0Zpy+1W4GVDKGHkWOfUcNVY0Ub7a8Ls+SHLd9KeJDSzNDd8rwn9/B4Qh1X kVcgYmbr1J5ZNoNCaRJ0hNigdrR5JkcNjmjSRUxqFd9EdmUidxdnwZUS731pXZM6ChLLxY35U09 9ORjknwqBT60rW1/ezY5adFDUhTdTeDGYSt X-Received: by 2002:a05:6808:1802:b0:47b:c2a2:1c6c with SMTP id 5614622812f47-4865a9a59c9mr3230177b6e.16.1780528658404; Wed, 03 Jun 2026 16:17:38 -0700 (PDT) Received: from mail.minyard.net ([2001:470:b8f6:1b:144e:c181:b1d6:32f9]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4865b91a9d2sm2918758b6e.12.2026.06.03.16.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 16:17:37 -0700 (PDT) Date: Wed, 3 Jun 2026 18:17:34 -0500 From: Corey Minyard To: Rosen Penev Cc: linux-kernel@vger.kernel.org, "moderated list:IPMI SUBSYSTEM" Subject: Re: [PATCH] ipmi: si: Use platform_get_irq() to retrieve interrupt Message-ID: Reply-To: corey@minyard.net References: <20260603192511.6869-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Jun 03, 2026 at 04:05:54PM -0700, Rosen Penev wrote: > On Wed, Jun 3, 2026 at 3:57 PM Corey Minyard wrote: > > > > On Wed, Jun 03, 2026 at 05:53:56PM -0500, Corey Minyard wrote: > > > On Wed, Jun 03, 2026 at 12:25:11PM -0700, Rosen Penev wrote: > > > > Use platform_get_irq() to retrieve the interrupt resource instead of > > > > directly parsing and mapping the OF node via irq_of_parse_and_map(). > > > > This is the standard pattern for platform devices. > > > > irq_of_parse_and_map() requires ire_dispose_mapping(), which is missing. > > > > > > > > Assisted-by: Antigravity:Gemini-3.5-Flash > > > > Signed-off-by: Rosen Penev > > > > --- > > > > drivers/char/ipmi/ipmi_si_platform.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c > > > > index fb6e359ae494..e10b5d8af092 100644 > > > > --- a/drivers/char/ipmi/ipmi_si_platform.c > > > > +++ b/drivers/char/ipmi/ipmi_si_platform.c > > > > @@ -276,7 +276,7 @@ static int of_ipmi_probe(struct platform_device *pdev) > > > > io.regspacing = regspacing ? be32_to_cpup(regspacing) : DEFAULT_REGSPACING; > > > > io.regshift = regshift ? be32_to_cpup(regshift) : 0; > > > > > > > > - io.irq = irq_of_parse_and_map(pdev->dev.of_node, 0); > > > > + io.irq = platform_get_irq(pdev, 0); > > > > > > This should be something like: > > > > > > io.irq = platform_get_irq_optional(pdev, 0); > > > if (io.irq > 0) > > > io.irq_setup = ipmi_std_irq_setup; > > > else > > > io.irq = 0; > > > > > > right? > > > > Oops, cut and paste error, try: > > > > io.irq = platform_get_irq_optional(pdev, 0); > > if (io.irq < 0) > > io.irq = 0; > I don't think that if is appropriate. Can platform_get_irq[_optional]() return < 0? The driver still has to work even if there is no interrupt specified. -corey > > > > This just disables the interrupt if it can't get it. > > > > > > > > -corey > > > > > > > io.dev = &pdev->dev; > > > > > > > > dev_dbg(&pdev->dev, "addr 0x%lx regsize %d spacing %d irq %d\n", > > > > -- > > > > 2.54.0 > > > >