[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZDVLXQ/8O7YxTHRv@smile.fi.intel.com>
Date: Tue, 11 Apr 2023 14:58:21 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Simon Horman <simon.horman@...igine.com>
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Michael Jamet <michael.jamet@...el.com>,
Yehezkel Bernat <YehezkelShB@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v2 2/3] net: thunderbolt: Fix sparse warnings in
tbnet_xmit_csum_and_map()
On Tue, Apr 11, 2023 at 01:50:16PM +0200, Simon Horman wrote:
> On Tue, Apr 11, 2023 at 12:10:48PM +0300, Mika Westerberg wrote:
> > Fixes the following warning when the driver is built with sparse checks
> > enabled:
> >
> > main.c:993:23: warning: incorrect type in initializer (different base types)
> > main.c:993:23: expected restricted __wsum [usertype] wsum
> > main.c:993:23: got restricted __be32 [usertype]
> >
> > No functional changes intended.
>
> This seems nice.
>
> After you posted v1 I was wondering if, as a follow-up, it would be worth
> creating a helper for this, say cpu_to_wsum(), as I think this pattern
> occurs a few times. I'm thinking of a trivial wrapper around cpu_to_be32().
But it looks like it makes sense to have a standalone series for that matter.
I.o.w. it doesn't belong to Thunderbolt (only).
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists