mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mark Einon <mark.einon@gmail.com>
Cc: gregkh@suse.de, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, o.hartmann@telovital.com
Subject: Re: [PATCH 1/2] staging: et131x: Fix checkpatch whitespace warnings
Date: Fri, 09 Sep 2011 22:41:35 -0700	[thread overview]
Message-ID: <1315633296.23777.32.camel@Joe-Laptop> (raw)
In-Reply-To: <1315050547-4781-1-git-send-email-mark.einon@gmail.com>

On Sat, 2011-09-03 at 12:49 +0100, Mark Einon wrote:
> Some of my previous hacking attempts have not been following the rules.
> All fixes either lines > 80 chars or whitespace corrections (spaces->tabs etc).
[]
> diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c
> index ab85cb3..36f2168 100644
> --- a/drivers/staging/et131x/et1310_mac.c
> +++ b/drivers/staging/et131x/et1310_mac.c
> @@ -191,7 +191,8 @@ void et1310_config_mac_regs2(struct et131x_adapter *adapter)
>  	cfg1 |= CFG1_RX_ENABLE | CFG1_TX_ENABLE | CFG1_TX_FLOW;
>  	/* Initialize loop back to off */
>  	cfg1 &= ~(CFG1_LOOPBACK | CFG1_RX_FLOW);
> -	if (adapter->flowcontrol == FLOW_RXONLY || adapter->flowcontrol == FLOW_BOTH)
> +	if (adapter->flowcontrol == FLOW_RXONLY ||
> +				adapter->flowcontrol == FLOW_BOTH)

Especially in cases like this, it helps readability
to align to open parenthesis like:

	if (adapter->flowcontrol == FLOW_RXONLY ||
	    adapter->flowcontrol == FLOW_BOTH)

[]
> @@ -641,7 +641,8 @@ static inline void free_send_packet(struct et131x_adapter *adapter,
>  		 * they point to
>  		 */
>  		do {
> -			desc = (struct tx_desc *)(adapter->tx_ring.tx_desc_ring +
> +			desc = (struct tx_desc *)
> +				    (adapter->tx_ring.tx_desc_ring +
>  						INDEX10(tcb->index_start));

Isn't this an unnecessary cast?
Perhaps it's better as:

			u32 i10 = INDEX10(tcb->index_start);

			desc = &adapter->tx_ring.tx_desc_ring[i10];



  parent reply	other threads:[~2011-09-10  5:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-03 11:49 Mark Einon
2011-09-03 11:49 ` [PATCH 2/2] staging: et131x: Amend README file Mark Einon
2011-09-10  5:22 ` [PATCH 1/2] staging: et131x: Fix checkpatch whitespace warnings Dan Carpenter
2011-09-10 16:34   ` Mark Einon
2011-09-10  5:41 ` Joe Perches [this message]
2011-09-10 16:40   ` Mark Einon

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=1315633296.23777.32.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.einon@gmail.com \
    --cc=o.hartmann@telovital.com \
    /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

Powered by JetHome