From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com [209.85.161.46]) (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 4286F44C67E for ; Mon, 17 Aug 2026 17:35:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786988118; cv=none; b=Wx+/qpa4O0124+Ur7LuHXS1VnW3BhDmqlcj4JxHUpMADUvfcQlsISg9uMMQ8T+PnKUxbGKq+6Crn/MEX0+s2a7h+CrwDLmog/cI6HIMlf4k1M0GDecj1Zmlq/6u5SpGo67z3SIDDmwUyAXLvAFyRSGk/fb/mXRetFbuOsGhcejg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786988118; c=relaxed/simple; bh=VcsHz1KSNzIO3qyngxuqmLyWhr8t633ofCqXbSH+ulk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VzUt9YCktsI6XLtHB+l8HIX/6mdkb2ATvTdKzfyhlnICXq9NsgNc+qcrtpynQV2qqjpz++tCCcRoz0z75YRDJ4diAGDmVyby7N5aDz4aZV7yaz2EJOe/I7Kt2FZPj2n65OIYyaWbIt8g4IDNhco6rmSCNwMeyC2kn6c7lLBRp0Q= 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=Gq/8t5BU; arc=none smtp.client-ip=209.85.161.46 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="Gq/8t5BU" Received: by mail-oo1-f46.google.com with SMTP id 006d021491bc7-6b051516aaaso2360309eaf.2 for ; Mon, 17 Aug 2026 10:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=minyard.net; s=google; t=1786988116; x=1787592916; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:reply-to:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=bIvZA4YFtmIIgPEEGQpd62Tb8K9roQmeJwb7qy3p30Y=; b=Gq/8t5BUoWhMWGPbUTd7YO0+mxLqnvkZ3pxPPRMZl7DmdP08XTEDxhcG0iKG7Kn34Q IpNYOd2PjD9edwuW08naXnmY2QXIw8hbojhPAzTb9Ic9HXRq2S0z0s1jPW5oI90aZtMw sfA5UrE0nxzDOc90KjrF1pOImgr/L0aoF3VjgoHgVv0pWjdbJ5kpkcbXZZhL0CS7O/C0 F+zvqZ9l+79R8a4hojldZYMbxL/1+Lom/6vxzcXFJdu5LuOTaEaa0JgJhB0+TtnFSEm+ gJGgmwFoP8o0ebeGkaalPhLZSU4KgEVXN4ihCEf80L3YRnU7pw6pbl2QwzbCleObnbq9 3KcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786988116; x=1787592916; h=in-reply-to:content-transfer-encoding:content-disposition :content-type: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:content-type; bh=bIvZA4YFtmIIgPEEGQpd62Tb8K9roQmeJwb7qy3p30Y=; b=deCSniz1zfbnjRDwlebLCMMPm2qWJu6DM3xl+2NjDGxVJM5dWsta+dv/2PPX5brHBo u5g5gpbTRyzjEZZTQ7APyL352ZP4n82i0Sa9WQmjO9nRSwSxpksHBuBTAPipBo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J7Q== X-Received: by 2002:a05:6820:1693:b0:6a1:22cd:8ffd with SMTP id 006d021491bc7-6b11e37bbb7mr1772224eaf.34.1786988115969; Mon, 17 Aug 2026 10:35:15 -0700 (PDT) Received: from mail.minyard.net ([2001:470:b8f6:1b:71c4:69c5:72c4:896f]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6b1166dcdfesm2222228eaf.13.2026.08.17.10.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2026 10:35:15 -0700 (PDT) Date: Mon, 17 Aug 2026 12:35:09 -0500 From: Corey Minyard To: Bui Duc Phuc Cc: openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] ipmi: bt-bmc: Handle -ENXIO from optional IRQ lookup Message-ID: Reply-To: corey@minyard.net References: <20260817105041.63224-1-phucduc.bui@gmail.com> <20260817105041.63224-2-phucduc.bui@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 Mon, Aug 17, 2026 at 09:28:50PM +0700, Bui Duc Phuc wrote: > On Mon, Aug 17, 2026 at 6:40 PM Corey Minyard wrote: > > > > On Mon, Aug 17, 2026 at 05:50:39PM +0700, phucduc.bui@gmail.com wrote: > > > From: bui duc phuc > > > > > > platform_get_irq_optional() can return -ENXIO when no IRQ resource is > > > available, as well as other negative error codes. > > > > > > The probe path supports running without an IRQ by falling back to > > > the timer. Treat -ENXIO as the no-IRQ case while propagating other > > > errors to the caller. > > > > This is obviously wrong, it will pass -ENXIO into devm_request_irq() > > if returned. > > > > > No. This is addressed in the following patch: > [PATCH 3/4] ipmi: bt-bmc: Request IRQ only when available > > https://lore.kernel.org/all/20260817105041.63224-3-phucduc.bui@gmail.com/ > > Please take a look at the subsequent patches in the series as well. You cannot add patches that introduce bugs then fix them later. Occassionally it might be necessary, but it should be avoided if possible, and it's certainly possible here. And as I said earlier, this function should return an error/interrupt, not set the value inside the function. The function has issues, and you are right to work on it, but it needs to be consistent with everything else in the kernel. This would also be better as a single patch. There's no reason to split it up to this fine a level of detail, it makes it hard to follow. And it must work if no interrupt is available for any reason. -corey > > Best regards, > Phuc