From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbbBWVhW (ORCPT ); Mon, 23 Feb 2015 16:37:22 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:37935 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752072AbbBWVhU (ORCPT ); Mon, 23 Feb 2015 16:37:20 -0500 Date: Mon, 23 Feb 2015 16:37:17 -0500 (EST) Message-Id: <20150223.163717.356301805782993412.davem@davemloft.net> To: stathis.voukelatos@linn.co.uk Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 2/3] Packet sniffer core framework From: David Miller In-Reply-To: <3f43e4376bec64ded755e202c11d2f07886194af.1424698609.git.stathis.voukelatos@linn.co.uk> References: <3f43e4376bec64ded755e202c11d2f07886194af.1424698609.git.stathis.voukelatos@linn.co.uk> X-Mailer: Mew version 6.5 on Emacs 24.1 / 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.7 (shards.monkeyblade.net [149.20.54.216]); Mon, 23 Feb 2015 13:37:19 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stathis Voukelatos Date: Mon, 23 Feb 2015 14:26:21 +0000 > + spin_lock_irqsave(&priv->lock, flags); > + /* Stop the hardware */ > + sch->stop(sch); > + /* Set the new command pattern */ > + ret = sch->set_pattern(sch, skb->data, skb->len / 2); > + /* Restart the hardware */ > + sch->start(sch); > + spin_unlock_irqrestore(&priv->lock, flags); These comments are excessive. When someone calls ops->stop() what are they supposed to think the thing does? Open a can of tuna? Mow the lawn? Wash the dishes? No, it stops the thing. Everyone understands that and you don't have to explicitly say it. Saying "stop the hardware" does not add anything to the source code that is not already implicitly there. They just take up space and keep more useful information from being displayed at once on the screen. Please remove all of these things. Thanks.