mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: Nicolas Ferre <nicolas.ferre@microchip.com>,
	netdev@vger.kernel.org, pabeni@redhat.com, kuba@kernel.org,
	edumazet@google.com, davem@davemloft.net
Cc: linux-kernel@vger.kernel.org, claudiu.beznea@microchip.com
Subject: Re: net: macb: sparse warning fixes
Date: Mon, 3 Jul 2023 09:10:59 +0100	[thread overview]
Message-ID: <988325dc-79ff-6a8d-9fb5-7f2a167cf37b@codethink.co.uk> (raw)
In-Reply-To: <66f00ffc-571b-86b3-5c35-b9ce566cc149@microchip.com>

On 23/06/2023 14:16, Nicolas Ferre wrote:
> Hi Ben,
> 
> On 22/06/2023 at 15:05, Ben Dooks wrote:
>> These are 3 hopefully easy patches for fixing sparse errors due to
>> endian-ness warnings. There are still some left, but there are not
>> as easy as they mix host and network fields together.
>>
>> For example, gem_prog_cmp_regs() has two u32 variables that it does
>> bitfield manipulation on for the tcp ports and these are __be16 into
>> u32, so not sure how these are meant to be changed. I've also no hardware
>> to test on, so even if these did get changed then I can't check if it is
>> working pre/post change.
> 
> Do you know if there could be any impact on performance (even if limited)?

There shouldn't be, these are either constants so should be compile time
sorted or they are just using the swap code the wrong way round... same
values, just the wrong endian markers going in/out.

The only device with a macb I've got is an unmatched, so don't even know
if I can test any of this.

The filter code I would like to get some feedback on, as I didn't want
to do any modifications without being able to test.

> Best regards,
>    Nicolas
> 
>> Also gem_writel and gem_writel_n, it is not clear if both of these are
>> meant to be host order or not.
>>
>> Ben Dooks (3):
>>    net: macb: check constant to define and fix __be32 warnings
>>    net: macb: add port constant to fix __be16 warnings
>>    net: macb: fix __be32 warnings in debug code
>>
>>   drivers/net/ethernet/cadence/macb_main.c | 25 +++++++++++++-----------
>>   1 file changed, 14 insertions(+), 11 deletions(-)
> 

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html


      parent reply	other threads:[~2023-07-03  8:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 13:05 Ben Dooks
2023-06-22 13:05 ` [PATCH 1/3] net: macb: check constant to define and fix __be32 warnings Ben Dooks
2023-06-22 15:49   ` Simon Horman
2023-06-23  9:40     ` Ben Dooks
2023-06-23 11:02       ` Simon Horman
2023-06-22 13:05 ` [PATCH 2/3] net: macb: add port constant to fix __be16 warnings Ben Dooks
2023-06-22 13:05 ` [PATCH 3/3] net: macb: fix __be32 warnings in debug code Ben Dooks
2023-06-22 15:44   ` Simon Horman
2023-06-23  9:43     ` Ben Dooks
2023-06-23 11:01       ` Simon Horman
2023-06-23 13:16 ` net: macb: sparse warning fixes Nicolas Ferre
2023-06-23 15:38   ` Andrew Lunn
2023-06-23 15:42     ` Nicolas Ferre
2023-07-03  8:10   ` Ben Dooks [this message]

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=988325dc-79ff-6a8d-9fb5-7f2a167cf37b@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=claudiu.beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®