From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752416AbbBXJft (ORCPT ); Tue, 24 Feb 2015 04:35:49 -0500 Received: from mail.linn.co.uk ([195.59.102.251]:56182 "EHLO mail.linn.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751253AbbBXJfq (ORCPT ); Tue, 24 Feb 2015 04:35:46 -0500 Message-ID: <54EC45EC.3020205@linn.co.uk> Date: Tue, 24 Feb 2015 09:35:40 +0000 From: Stathis Voukelatos User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: David Miller CC: , , Subject: Re: [PATCH v3 2/3] Packet sniffer core framework References: <3f43e4376bec64ded755e202c11d2f07886194af.1424698609.git.stathis.voukelatos@linn.co.uk> <20150223.163717.356301805782993412.davem@davemloft.net> In-Reply-To: <20150223.163717.356301805782993412.davem@davemloft.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.2.10.132] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/02/15 21:37, David Miller wrote: > 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. > Will remove the comments in the next version of the patch set. Thank you, Stathis