From: Greg KH <gregkh@linuxfoundation.org>
To: Leon Pelzmann <brunonick1801@gmail.com>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: sm750fb: remove ineffective sw_i2c_wait() busy loop
Date: Mon, 16 Nov 2026 10:41:43 +0100 [thread overview]
Message-ID: <2026111622-vision-dollhouse-f72f@gregkh> (raw)
In-Reply-To: <20261115215427.112315-1-brunonick1801@gmail.com>
On Sun, Nov 15, 2026 at 10:54:27PM +0100, Leon Pelzmann wrote:
> sw_i2c_wait() is meant to insert a delay between the bit-banged I2C
> operations, but it only consists of a loop that computes a value into
> a local variable which is never read. The loop has no side effects, so
> the compiler removes it entirely and the function compiles to nothing.
> With W=1 this also triggers:
>
> ddk750_swi2c.c:95:16: error: variable 'tmp' set but not used
> [-Werror=unused-but-set-variable=]
>
> Remove the function and all of its call sites. The I2C timing is not
> changed by this: the object code of ddk750_swi2c.o (x86_64, gcc,
> allmodconfig) is identical before and after this change.
>
> The W=1 warning was found by building the driver, and the change was
> prepared with the help of an AI coding assistant (Claude); it was
> verified by comparing the objdump output before and after the change.
Please read https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh
prev parent reply other threads:[~2026-11-16 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 21:54 [PATCH] staging: sm750fb: remove ineffective sw_i2c_wait() busy loop Leon Pelzmann
2026-11-16 5:24 ` Dan Carpenter
2026-11-16 9:41 ` Greg KH [this message]
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=2026111622-vision-dollhouse-f72f@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=brunonick1801@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=sudipm.mukherjee@gmail.com \
--cc=teddy.wang@siliconmotion.com \
/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