Subject: Re: [PATCH net-next] sfc: Use ether_addr_copy and eth_broadcast_addr

From: Edward Cree <[email-masked]>
Date: Wed, 5 Mar 2014 11:48:05 +0000

On 04/03/14 20:36, David Miller wrote:
>> diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
>> index 3b39798..de0c815 100644
>> --- a/drivers/net/ethernet/sfc/ef10.c
>> +++ b/drivers/net/ethernet/sfc/ef10.c
>> @@ -162,8 +162,8 @@ static int efx_ef10_get_mac_address(struct efx_nic *efx, u8 *mac_address)
>>  	if (outlen < MC_CMD_GET_MAC_ADDRESSES_OUT_LEN)
>>  		return -EIO;
>>  
>> -	memcpy(mac_address,
>> -	       MCDI_PTR(outbuf, GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE), ETH_ALEN);
>> +	ether_addr_copy(mac_address,
>> +	       MCDI_PTR(outbuf, GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE));
> This is not indented correctly, the original code was.
Oops, yes.
After fixing that, checkpatch also complains about a couple of long
lines (mcdi.c:1207-8).  Am I right in thinking that it's being
overzealous and is best ignored in this case?  Alternatively I suppose
the expression starting 'port_num ? ' could go in a local variable;
would that be clearer?