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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BANLkTikW8W8ZVSYMyOSJxiWouLE1_tEiDQ@mail.gmail.com>
Date:	Wed, 4 May 2011 14:42:16 +0200
From:	Michał Mirosław <mirqus@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Sergei Shtylyov <sshtylyov@...sta.com>,
	Oliver Neukum <oneukum@...e.de>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@...e.de>, netdev@...r.kernel.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] usbnet: Convert dbg to dev_dbg and neatening

2011/5/4 Joe Perches <joe@...ches.com>:
> On Wed, 2011-05-04 at 15:35 +0400, Sergei Shtylyov wrote:
>> Hello.
>
> And hello to you Sergei.
>
> On 03-05-2011 22:17, Joe Perches wrote:
>> > Use the more standard logging form.
>> > Add a bit more tidying style.
>>     Style changes look rather doubtful to me...
>> >   drivers/net/usb/usbnet.c |   23 +++++++++++------------
>> > diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> []
>> > @@ -192,8 +192,8 @@ static int init_status(struct usbnet *dev, struct usb_interface *intf)
>> >             return 0;
>> >
>> >     pipe = usb_rcvintpipe(dev->udev,
>> > -                         dev->status->desc.bEndpointAddress
>> > -                   & USB_ENDPOINT_NUMBER_MASK);
>> > +                         (dev->status->desc.bEndpointAddress
>> > +                   & USB_ENDPOINT_NUMBER_MASK));
>>
>>     Why add parens?
>
> Leading & uses are almost always addressof.
> This makes it easier for me to see that it's not an addressof use.

This is a clear case where 80-char limit impairs code readability. Why
not just use another variable?

int epn = dev->status->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
pipe = usb_rcvintpipe(dev->udev, epn);

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ