Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1354259

Re: [PATCH 0/3] net: macb: Fix coding style issues

From Michal Simek <michal.simek@xilinx.com>
Newsgroups linux.kernel
Subject Re: [PATCH 0/3] net: macb: Fix coding style issues
Date 2016-03-09 17:40 +0100
Message-ID <raPjs-24S-15@gated-at.bofh.it> (permalink)
References <ra630-57L-3@gated-at.bofh.it> <ra6Z4-5LX-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 7.3.2016 18:13, Nicolas Ferre wrote:
> Le 07/03/2016 17:17, Moritz Fischer a écrit :
>> Hi Nicolas,
>>
>> this series deals with most of the checkpatch warnings
>> generated for macb. There are two BUG_ON()'s that I didn't touch, yet,
>> that were suggested by checkpatch, that I can address in a follow up
>> commit if needed.
>> Let me know if you want me to split the fixes differently or squash
>> them into one commit.
> 
> Hi,
> 
> I'm not usually fond of this type of patches, but I must admit that this
> series corrects some style issues.
> 
> So, I would like more feedback from Michal and Cyrille as these changes
> may delay some of the not-merged-yet features or more important
> work-in-progress on their side.
> 
> On the other hand, if we all think it's a calm period for this macb
> driver, we may find interesting to merge some "cleanup and style"
> enhancements.

Not a problem with merging cleanups in general. We have several out of
tree patches but doesn't make sense to to wait.
I wasn't in cc for the series but I don't like this change to be the
part of cleanup series.

	mac = of_get_mac_address(np);
 	if (mac)
-		memcpy(bp->dev->dev_addr, mac, ETH_ALEN);
+		ether_addr_copy(bp->dev->dev_addr, mac);
 	else

Also extending scope of variables is not the right way to go. Especially
when some automation tools are reporting that you should reduce scope of
use for them. Wolfram is checking it for example.

Thanks,
Michal

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] net: macb: Fix coding style issues Moritz Fischer <moritz.fischer@ettus.com> - 2016-03-07 17:20 +0100
  [PATCH 3/3] net: macb: Cleanup checkpatch checks Moritz Fischer <moritz.fischer@ettus.com> - 2016-03-07 17:20 +0100
    Re: [PATCH 3/3] net: macb: Cleanup checkpatch checks Moritz Fischer <moritz.fischer@ettus.com> - 2016-03-07 17:30 +0100
  [PATCH 1/3] net: macb: Fix coding style error message Moritz Fischer <moritz.fischer@ettus.com> - 2016-03-07 17:20 +0100
  [PATCH 3/3] net: macb: Address checkpatch 'check' suggestions Moritz Fischer <moritz.fischer@ettus.com> - 2016-03-07 17:30 +0100
  Re: [PATCH 0/3] net: macb: Fix coding style issues Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-03-07 18:20 +0100
    Re: [PATCH 0/3] net: macb: Fix coding style issues Michal Simek <michal.simek@xilinx.com> - 2016-03-09 17:40 +0100
      Re: [PATCH 0/3] net: macb: Fix coding style issues Moritz Fischer <moritz.fischer@ettus.com> - 2016-03-09 18:20 +0100
      Re: [PATCH 0/3] net: macb: Fix coding style issues Michal Simek <michal.simek@xilinx.com> - 2016-03-09 18:30 +0100
        Re: [PATCH 0/3] net: macb: Fix coding style issues David Miller <davem@davemloft.net> - 2016-03-09 21:30 +0100
      Re: [PATCH 0/3] net: macb: Fix coding style issues David Miller <davem@davemloft.net> - 2016-03-09 18:30 +0100
  Re: [PATCH 0/3] net: macb: Fix coding style issues Alexander Stein <alexander.stein@systec-electronic.com> - 2016-03-08 08:10 +0100

csiph-web