From: Nathan Chancellor <nathan@kernel.org>
To: "Mario Limonciello (AMD) (kernel.org)" <superm1@kernel.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jan Dabros <jsd@semihalf.com>, Andi Shyti <andi.shyti@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Kees Cook <kees@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] i2c: designware: Remove i2c_dw_remove_lock_support()
Date: Tue, 14 Oct 2025 15:39:55 -0700 [thread overview]
Message-ID: <20251014223955.GB3575477@ax162> (raw)
In-Reply-To: <3f4ee683-4fdb-4183-8f99-f931f853d9ae@kernel.org>
On Tue, Oct 14, 2025 at 04:58:56PM -0500, Mario Limonciello (AMD) (kernel.org) wrote:
> On 10/14/2025 3:33 PM, Bjorn Helgaas wrote:
> > I'm totally fine with the patch itself, but I think the commit log
> > could be trimmed to something like the following with no loss:
> >
> > Remove struct i2c_dw_semaphore_callbacks.remove() and
> > i2c_dw_remove_lock_support().
> >
> > 440da737cf8d ("i2c: designware: Use PCI PSP driver for
> > communication") removed the last place that set
> > i2c_dw_semaphore_callbacks.remove(), which made
> > i2c_dw_remove_lock_support() a no-op.
> >
> > This has the side effect of avoiding this kCFI warning (see Link):
> >
> > dw_i2c_plat_remove+0x3c: no-cfi indirect call!
> >
> > Link: https://lore.kernel.org/r/20251013-dw_i2c_plat_remove-avoid-objtool-no-cfi-warning-v1-1-8cc4842967bf@kernel.org
> >
> > FWIW,
> > Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
>
> I echo Bjorn's comments on the lengthy commit message.
> Code change looks fine.
>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
I have no objections to trimming the commit message if so desired but I
think the solution (removing unused code) is more tangential to the
problem (potentially accessing an array out of bounds). I am sometimes
looking at changes from ten years ago where something was done to avoid
a problem but the problem was never mentioned in the message but may
have been elsewhere. Maybe nobody ever needs .remove() again but what if
new IP comes out that necessitates it and they go to revert this change
without avoiding this problem? I could try to make the analysis shorter
if that would help.
Cheers,
Nathan
next prev parent reply other threads:[~2025-10-14 22:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 1:05 [PATCH] i2c: designware: Remove i2c_dw_remove_lock_support() Nathan Chancellor
2025-10-14 20:33 ` Bjorn Helgaas
2025-10-14 21:58 ` Mario Limonciello (AMD) (kernel.org)
2025-10-14 22:39 ` Nathan Chancellor [this message]
2025-10-14 22:53 ` Bjorn Helgaas
2025-10-14 21:10 ` Kees Cook
2025-10-15 20:47 ` Andi Shyti
2025-10-23 6:29 ` Andy Shevchenko
2025-10-23 16:37 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251014223955.GB3575477@ax162 \
--to=nathan@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=helgaas@kernel.org \
--cc=jsd@semihalf.com \
--cc=justinstitt@google.com \
--cc=kees@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mika.westerberg@linux.intel.com \
--cc=morbo@google.com \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=samitolvanen@google.com \
--cc=superm1@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox