lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 20 Nov 2020 11:37:27 -0500 From: Alan Stern <stern@...land.harvard.edu> To: Greg Kroah-Hartman <gregkh@...uxfoundation.org> Cc: Min Guo <min.guo@...iatek.com>, Bin Liu <b-liu@...com>, Matthias Brugger <matthias.bgg@...il.com>, chunfeng.yun@...iatek.com, linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org Subject: Re: [PATCH] usb: musb: remove unused variable 'devctl' On Fri, Nov 20, 2020 at 05:32:44PM +0100, Greg Kroah-Hartman wrote: > On Fri, Nov 20, 2020 at 11:15:19AM -0500, Alan Stern wrote: > > > Perhaps you might want to add a comment here so that people will not > > > keep making this same mistake when they run auto-checkers on the > > > codebase? > > > > A better change would be > > > > - devctl = musb_readb(mbase, MUSB_DEVCTL); > > + (void) musb_readb(mbase, MUSB_DEVCTL); > > > > and eliminate the unused variable. Then there wouldn't be any compiler > > warning. > > No need for the (void), the compiler shouldn't warn about that, right? True, but it clearly indicates to a human reader that the value was intended to be read and thrown away. Alternatively, the (void) cast could be left out and a comment added. Alan Stern
Powered by blists - more mailing lists