From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jason Yan <yanaijie@huawei.com>
Cc: Sam Ravnborg <sam@ravnborg.org>, Helge Deller <deller@gmx.de>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
b.zolnierkie@samsung.com
Subject: Re: [PATCH] video: fbdev: matroxfb: remove dead code and set but not used variable
Date: Thu, 19 Mar 2026 10:21:56 +0200 [thread overview]
Message-ID: <abuyJDK6E2aHA4rC@ashevche-desk.local> (raw)
In-Reply-To: <e5f7611f-f087-4835-99e3-4fddc927aab8@huawei.com>
On Thu, Mar 19, 2026 at 04:06:44PM +0800, Jason Yan wrote:
> 在 2026/3/19 15:38, Andy Shevchenko 写道:
> > On Thu, Mar 19, 2026 at 10:22:08AM +0800, Jason Yan wrote:
> > > 在 2026/3/18 15:45, Andy Shevchenko 写道:
> > > > On Wed, Apr 08, 2020 at 10:18:52AM +0000, Sam Ravnborg wrote:
> > > > > On Fri, Apr 03, 2020 at 10:16:09AM +0800, Jason Yan wrote:
> > > > > > Fix the following gcc warning:
> > > > > >
> > > > > > drivers/video/fbdev/matrox/g450_pll.c:336:15: warning: variable
> > > > > > ‘pixel_vco’ set but not used [-Wunused-but-set-variable]
> > > > > > unsigned int pixel_vco;
> > > > > > ^~~~~~~~~
> > > > > > Reported-by: Hulk Robot <hulkci@huawei.com>
> > > > > > Signed-off-by: Jason Yan <yanaijie@huawei.com>
> > > > >
> > > > > Thanks, committed and pushed to drm-misc-next.
> > > > > The fix will show up in upstream kernel at the next
> > > > > merge window.
> > > >
> > > > The most of the patches from so called Hulk Robot appeared to be controversial.
> > > >
> > > > First of all, even so called "dead code" may have side effects on the registers
> > > > in HW which may lead to other issues. Second, the mentioned dead code elimination
> > > > patch doesn't improve anything as now the dead code is 'mnp' variable (that's how
> > > > I got into that, I still have a build error).
> > >
> > > Sorry, I do not understand what side effects this may cause. Would you
> > > please explain it in detail?
> >
> > Any IO (and specifically on PCI bus) may have side effects. If the removed code
> > did some HW accesses (especially reads), it affects the state of HW. You can
> > read more about PCI bus and what read from it does.
>
> No, the removed code did not do any IO and will not affect the state of HW.
Excellent, but it leaves the code that does IO and now still breaks the
compilation.
> > Helge, can we revert this change and start over, please? (I can also send
> > revert if you think it's a better way)
>
> I don't think we need to revert this patch. Please provide proof that this
> modification will lead to real issues.
It's not me, who should provide an evidence, it had to be the author
who must had provided testing and everything when submitting the change.
> > I do not believe this change was ever tested on real HW, and I see an evidence
> > that this most likely was blindly made as it led to the similar issue after
> > the change.
No answer here? That's what I expected based on my observations on the quality
of the patches from so called Hulk Robot.
> > > > That said, for the starter I suggest to revert this change. After one need go
> > > > carefully through code to understand if it's exactly the case and what to do with
> > > > 'mnp' which involves some IO.
> > > >
> > > > +Cc: current fbdev maintainers
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-03-19 8:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 2:16 [PATCH] video: fbdev: matroxfb: remove dead code and set but not used variable Jason Yan
2020-04-08 10:18 ` Sam Ravnborg
2026-03-18 7:45 ` Andy Shevchenko
2026-03-19 2:22 ` Jason Yan
2026-03-19 7:38 ` Andy Shevchenko
2026-03-19 8:06 ` Jason Yan
2026-03-19 8:21 ` Andy Shevchenko [this message]
2026-03-19 8:35 ` Helge Deller
2026-03-19 9:08 ` Andy Shevchenko
2026-03-19 12:44 ` Helge Deller
2026-03-20 14:37 ` Andy Shevchenko
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=abuyJDK6E2aHA4rC@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=b.zolnierkie@samsung.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=yanaijie@huawei.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