[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <76e32faf-3e50-c71f-afd9-3a2a1da86bd1@wp.pl>
Date: Sat, 8 Jan 2022 16:48:00 +0100
From: Aleksander Bajkowski <olek2@...pl>
To: Joe Perches <joe@...ches.com>, davem@...emloft.net,
kuba@...nel.org, jgg@...pe.ca, rdunlap@...radead.org,
arnd@...db.de, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: lantiq_etop: make alignment match open
parenthesis
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.
Powered by blists - more mailing lists