[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0f9e73a2-075a-4a4d-9c74-de17d135567d@cogentembedded.com>
Date: Mon, 15 Jan 2024 08:28:12 +0600
From: Nikita Yushchenko <nikita.yoush@...entembedded.com>
To: Sergey Shtylyov <s.shtylyov@....ru>, "David S. Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ravb: Fix wrong dma_unmap_single() calls in ring
unmapping
>> + if (le16_to_cpu(desc->ds_cc) != 0)
>
> It's not that != 0 or le16_to_cpu() are necessary here but we're on
> the little-endian platforms anyways...
Let's leave optimizing this out to compiler.
In the code, I'd vote for always having explicit conversion operation when reading __le16 value from memory.
Nikita
Powered by blists - more mailing lists