From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756128AbcA3EiP (ORCPT ); Fri, 29 Jan 2016 23:38:15 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:42364 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752145AbcA3EiN (ORCPT ); Fri, 29 Jan 2016 23:38:13 -0500 Date: Fri, 29 Jan 2016 20:38:10 -0800 (PST) Message-Id: <20160129.203810.1601035648854177084.davem@davemloft.net> To: gregory.clement@free-electrons.com 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 From: David Miller In-Reply-To: <1454084767-24715-6-git-send-email-gregory.clement@free-electrons.com> References: <1454084767-24715-1-git-send-email-gregory.clement@free-electrons.com> <1454084767-24715-6-git-send-email-gregory.clement@free-electrons.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 29 Jan 2016 20:38:13 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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.