From: Aleksander Bajkowski <olek2@wp.pl>
To: Joe Perches <joe@perches.com>,
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: Sat, 8 Jan 2022 16:48:00 +0100 [thread overview]
Message-ID: <76e32faf-3e50-c71f-afd9-3a2a1da86bd1@wp.pl> (raw)
In-Reply-To: <7d75e12a4eb373a5a7e90161049a0eccb6b8c63c.camel@perches.com>
Hi Joe,
On 12/30/21 02:32, Joe Perches wrote:
> 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?
>
>
I think you are right. This function should look similar to xrx200_alloc_skb().
Both drivers have the same DMA IP core and packet receiving mechanism.
next prev parent reply other threads:[~2022-01-08 15:48 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
2022-01-08 15:48 ` Aleksander Bajkowski [this message]
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=76e32faf-3e50-c71f-afd9-3a2a1da86bd1@wp.pl \
--to=olek2@wp.pl \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=jgg@ziepe.ca \
--cc=joe@perches.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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®