Subject: Re: [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic

From: Gregory CLEMENT <[email-masked]>
Date: Mon, 01 Feb 2016 11:22:45 +0100

Hi David,
 
 On sam., janv. 30 2016, David Miller <[email-masked]> wrote:

> From: Gregory CLEMENT <[email-masked]>
> Date: Fri, 29 Jan 2016 17:26:06 +0100
>
>> @@ -370,6 +370,8 @@ struct mvneta_port {
>>  	struct net_device *dev;
>>  	struct notifier_block cpu_notifier;
>>  	int rxq_def;
>> +	/* protect  */
>> +	spinlock_t lock;
>>  
>>  	/* Core clock */
>>  	struct clk *clk;
>
> Protect what?  This comment needs a lot of improvement.

Sorry about it, this was a left-over.

>
> Everyone knows a spinlock "protects" things, so if you aren't going
> to actually describe what this lock protects, and in what contexts
> the lock is used, you might as well not say anything at all.

I can only agree with you, I will fix it for next version.

Thanks,

Gregory

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com