mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Eduard Zateev <hackerowskiy@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Teddy Wang <teddy.wang@siliconmotion.com>,
	linux-staging@lists.linux.dev, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: sm750fb: remove unused variable 'tmp' in sw_i2c_wait
Date: Wed, 23 Sep 2026 10:34:27 +0300	[thread overview]
Message-ID: <arOBA2jJ7_9a1XMs@stanley.mountain> (raw)
In-Reply-To: <20260923013526.12225-1-hackerowskiy@gmail.com>

On Wed, Sep 23, 2026 at 03:35:26AM +0200, Eduard Zateev wrote:
> The variable 'tmp' in sw_i2c_wait() is written but never read outside
> the loop, triggering a set-but-not-used warning with W=1. The loop
> itself is a fixed-count busy-wait with no side effects; remove the
> unused variable and keep the empty loop body.
> 
> Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>
> ---

Search the archives to see if someone has sent a patch like this
before.

https://lore.kernel.org/all/abfFn_AET_xAVjji@stanley.mountain/

Compilers often remove empty busy loops so that probably explains
why they added the nonsense code.

We don't want to silence this warning because the code is legitimately
bad and should trigger a warning.  But until someone can test it, then
it's impossible to fix.

regards,
dan carpenter


      reply	other threads:[~2026-09-23  7:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23  1:35 Eduard Zateev
2026-09-23  7:34 ` Dan Carpenter [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=arOBA2jJ7_9a1XMs@stanley.mountain \
    --to=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hackerowskiy@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

all inboxes | Powered by JetHome®