Subject: Re: [PATCH net-next] tg3: Override clock, link aware and link idle mode during NVRAM dump

From: Prashant <[email-masked]>
Date: Sat, 24 May 2014 01:04:50 -0700

On 5/23/2014 9:17 PM, David Miller wrote:
> From: Prashant Sreedharan <[email-masked]>
> Date: Fri, 23 May 2014 09:54:44 -0700
>
>> +		if (cpmu_val & (CPMU_CTRL_LINK_AWARE_MODE |
>> +				CPMU_CTRL_LINK_IDLE_MODE)) {
>> +
>
> Please remove this empty line.
Ok
>
>> +			tw32(TG3_CPMU_CTRL, cpmu_val &
>> +			     ~(CPMU_CTRL_LINK_AWARE_MODE |
>> +			       CPMU_CTRL_LINK_IDLE_MODE));
>
> This is not indented correctly.
>
> The ~() expression is part of the "cpum_val &", it's not
> another separate argument to tw32().
>
> Therefore ~() should be indented to the column cpum_val starts
> at.
>
Will fix indentation.
>> +		if (need_resched()) {
>> +			if (signal_pending(current)) {
>> +				eeprom->len += i;
>> +				ret = -EINTR;
>> +				goto eeprom_done;
>
> Why are you incrementing eeprom->len when you break out of the
> loop due to a signal?  You didn't read that extra byte.
>
eeprom->len is discarded by caller if a failure is returned.
I will resend the patch after incorporating comments and add your 
Reviewed-by. Thanks.