From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregory.clement@free-electrons.com (Gregory CLEMENT) Date: Mon, 01 Feb 2016 11:22:45 +0100 Subject: [PATCH net 5/6] net: mvneta: The mvneta_percpu_elect function should be atomic In-Reply-To: <20160129.203810.1601035648854177084.davem@davemloft.net> (David Miller's message of "Fri, 29 Jan 2016 20:38:10 -0800 (PST)") References: <1454084767-24715-1-git-send-email-gregory.clement@free-electrons.com> <1454084767-24715-6-git-send-email-gregory.clement@free-electrons.com> <20160129.203810.1601035648854177084.davem@davemloft.net> Message-ID: <87h9hs7mru.fsf@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi David, On sam., janv. 30 2016, David Miller wrote: > From: Gregory CLEMENT > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753545AbcBAKXK (ORCPT ); Mon, 1 Feb 2016 05:23:10 -0500 Received: from down.free-electrons.com ([37.187.137.238]:54487 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753516AbcBAKXG (ORCPT ); Mon, 1 Feb 2016 05:23:06 -0500 From: Gregory CLEMENT To: David Miller 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 References: <1454084767-24715-1-git-send-email-gregory.clement@free-electrons.com> <1454084767-24715-6-git-send-email-gregory.clement@free-electrons.com> <20160129.203810.1601035648854177084.davem@davemloft.net> Date: Mon, 01 Feb 2016 11:22:45 +0100 In-Reply-To: <20160129.203810.1601035648854177084.davem@davemloft.net> (David Miller's message of "Fri, 29 Jan 2016 20:38:10 -0800 (PST)") Message-ID: <87h9hs7mru.fsf@free-electrons.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On sam., janv. 30 2016, David Miller wrote: > From: Gregory CLEMENT > 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