devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <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
Date: Mon, 23 Feb 2015 16:37:17 -0500 (EST)	[thread overview]
Message-ID: <20150223.163717.356301805782993412.davem@davemloft.net> (raw)
In-Reply-To: <3f43e4376bec64ded755e202c11d2f07886194af.1424698609.git.stathis.voukelatos@linn.co.uk>

From: Stathis Voukelatos <stathis.voukelatos@linn.co.uk>
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.

  reply	other threads:[~2015-02-23 21:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 14:26 [PATCH v3 0/3] net: Linn Ethernet Packet Sniffer driver Stathis Voukelatos
2015-02-23 14:26 ` [PATCH v3 1/3] Ethernet packet sniffer: device tree binding and vendor prefix Stathis Voukelatos
2015-02-23 14:26 ` [PATCH v3 2/3] Packet sniffer core framework Stathis Voukelatos
2015-02-23 21:37   ` David Miller [this message]
2015-02-24  9:35     ` Stathis Voukelatos
2015-02-23 14:26 ` [PATCH v3 3/3] Linn Ethernet packet sniffer driver Stathis Voukelatos
2015-02-23 21:38   ` David Miller
2015-02-24  9:44     ` Stathis Voukelatos

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=20150223.163717.356301805782993412.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stathis.voukelatos@linn.co.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).