mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Aleksander Jan Bajkowski <olek2@wp.pl>,
	davem@davemloft.net, kuba@kernel.org, jgg@ziepe.ca,
	rdunlap@infradead.org, arnd@arndb.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: lantiq_etop: make alignment match open parenthesis
Date: Wed, 29 Dec 2021 17:32:49 -0800	[thread overview]
Message-ID: <7d75e12a4eb373a5a7e90161049a0eccb6b8c63c.camel@perches.com> (raw)
In-Reply-To: <20211229233952.5306-1-olek2@wp.pl>

On Thu, 2021-12-30 at 00:39 +0100, Aleksander Jan Bajkowski wrote:
> checkpatch.pl complains as the following:
> 
> Alignment should match open parenthesis
[]
> diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
[]
> @@ -111,9 +111,9 @@ ltq_etop_alloc_skb(struct ltq_etop_chan *ch)
>  	ch->skb[ch->dma.desc] = netdev_alloc_skb(ch->netdev, MAX_DMA_DATA_LEN);
>  	if (!ch->skb[ch->dma.desc])
>  		return -ENOMEM;
> -	ch->dma.desc_base[ch->dma.desc].addr = dma_map_single(&priv->pdev->dev,
> -		ch->skb[ch->dma.desc]->data, MAX_DMA_DATA_LEN,
> -		DMA_FROM_DEVICE);
> +	ch->dma.desc_base[ch->dma.desc].addr =
> +		dma_map_single(&priv->pdev->dev, ch->skb[ch->dma.desc]->data,
> +			       MAX_DMA_DATA_LEN, DMA_FROM_DEVICE);
>  	ch->dma.desc_base[ch->dma.desc].addr =
>  		CPHYSADDR(ch->skb[ch->dma.desc]->data);

Unassociated trivia:

ch->dma.desc_base[ch->dma.desc].addr is the target of consecutive assignments.

That looks very odd.

Isn't the compiler allowed to toss/throw away the first assignment?



  reply	other threads:[~2021-12-30  1:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29 23:39 Aleksander Jan Bajkowski
2021-12-30  1:32 ` Joe Perches [this message]
2022-01-08 15:48   ` Aleksander Bajkowski
2021-12-30 13:30 ` patchwork-bot+netdevbpf

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=7d75e12a4eb373a5a7e90161049a0eccb6b8c63c.camel@perches.com \
    --to=joe@perches.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=jgg@ziepe.ca \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olek2@wp.pl \
    --cc=rdunlap@infradead.org \
    /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

all inboxes | Powered by JetHome®