lkml.org 
[lkml]   [2017]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dm ioctl: Remove double parentheses
Hi Joe,

El Fri, Mar 31, 2017 at 07:07:33PM -0700 Joe Perches ha dit:

> On Fri, 2017-03-31 at 18:50 -0700, Matthias Kaehlcke wrote:
> > El Thu, Mar 16, 2017 at 09:48:30AM -0700 Matthias Kaehlcke ha dit:
> >
> > > The extra pair of parantheses is not needed and causes clang to generate
> > > the following warning:
> > >
> > > drivers/md/dm-ioctl.c:1776:11: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
> > > if ((cmd == DM_DEV_CREATE_CMD)) {
> > > ~~~~^~~~~~~~~~~~~~~~~~~~
> > > drivers/md/dm-ioctl.c:1776:11: note: remove extraneous parentheses around the comparison to silence this warning
> > > if ((cmd == DM_DEV_CREATE_CMD)) {
> > > ~ ^ ~
> > > drivers/md/dm-ioctl.c:1776:11: note: use '=' to turn this equality comparison into an assignment
> > > if ((cmd == DM_DEV_CREATE_CMD)) {
>
> There are dozens of these comparisons in the kernel.
> Are you fixing them all or just this one?

For now I focus on occurrences that pop up in my builds. So far there
have been two more:

https://patchwork.kernel.org/patch/9626833/
https://patchwork.kernel.org/patch/9631591/

Thanks

Matthias

\
 
 \ /
  Last update: 2017-04-03 18:57    [W:0.821 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site