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


Groups > linux.kernel > #1322974

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

From Gregory CLEMENT <gregory.clement@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic
Date 2016-02-01 11:30 +0100
Message-ID <qXjU7-19m-25@gated-at.bofh.it> (permalink)
References <qWk5P-5O3-5@gated-at.bofh.it> <qWk5R-5O3-41@gated-at.bofh.it> <qWvuh-5JL-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi David,
 
 On sam., janv. 30 2016, David Miller <davem@davemloft.net> wrote:

> From: Gregory CLEMENT <gregory.clement@free-electrons.com>
> 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

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


Thread

[PATCH net 0/6] mvneta fixes for SMP Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-01-29 17:30 +0100
  [PATCH net 4/6] net: mvneta: Modify the queue related fields from each cpu Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-01-29 17:30 +0100
  [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-01-29 17:30 +0100
    Re: [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function  should be atomic David Miller <davem@davemloft.net> - 2016-01-30 05:40 +0100
      Re: [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-02-01 11:30 +0100
  [PATCH net 6/6] net: mvneta: Fix race condition during stopping Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-01-29 17:30 +0100
  [PATCH net 1/6] net: mvneta: Fix for_each_present_cpu usage Gregory CLEMENT <gregory.clement@free-electrons.com> - 2016-01-29 17:30 +0100

csiph-web