All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic
Date: Mon, 01 Feb 2016 11:22:45 +0100	[thread overview]
Message-ID: <87h9hs7mru.fsf@free-electrons.com> (raw)
In-Reply-To: <20160129.203810.1601035648854177084.davem@davemloft.net> (David Miller's message of "Fri, 29 Jan 2016 20:38:10 -0800 (PST)")

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

WARNING: multiple messages have this Message-ID (diff)
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	thomas.petazzoni@free-electrons.com, jason@lakedaemon.net,
	andrew@lunn.ch, sebastian.hesselbarth@gmail.com,
	linux-arm-kernel@lists.infradead.org, alior@marvell.com,
	nadavh@marvell.com, mw@semihalf.com, linux@arm.linux.org.uk,
	w@1wt.eu
Subject: Re: [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic
Date: Mon, 01 Feb 2016 11:22:45 +0100	[thread overview]
Message-ID: <87h9hs7mru.fsf@free-electrons.com> (raw)
In-Reply-To: <20160129.203810.1601035648854177084.davem@davemloft.net> (David Miller's message of "Fri, 29 Jan 2016 20:38:10 -0800 (PST)")

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

  reply	other threads:[~2016-02-01 10:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 16:26 [PATCH net 0/6] mvneta fixes for SMP Gregory CLEMENT
2016-01-29 16:26 ` Gregory CLEMENT
2016-01-29 16:26 ` [PATCH net 1/6] net: mvneta: Fix for_each_present_cpu usage Gregory CLEMENT
2016-01-29 16:26   ` Gregory CLEMENT
2016-01-29 16:26 ` [PATCH net 2/6] net: mvneta: Use on_each_cpu when possible Gregory CLEMENT
2016-01-29 16:26   ` Gregory CLEMENT
2016-01-29 16:26   ` Gregory CLEMENT
2016-01-29 16:26 ` [PATCH net 3/6] net: mvneta: Remove unused code Gregory CLEMENT
2016-01-29 16:26   ` Gregory CLEMENT
2016-01-29 16:26   ` Gregory CLEMENT
2016-01-29 16:26 ` [PATCH net 4/6] net: mvneta: Modify the queue related fields from each cpu Gregory CLEMENT
2016-01-29 16:26   ` Gregory CLEMENT
2016-01-29 16:26 ` [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic Gregory CLEMENT
2016-01-29 16:26   ` Gregory CLEMENT
2016-01-30  4:38   ` David Miller
2016-01-30  4:38     ` David Miller
2016-02-01 10:22     ` Gregory CLEMENT [this message]
2016-02-01 10:22       ` Gregory CLEMENT
2016-01-29 16:26 ` [PATCH net 6/6] net: mvneta: Fix race condition during stopping Gregory CLEMENT
2016-01-29 16:26   ` Gregory CLEMENT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h9hs7mru.fsf@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.