lkml.org 
[lkml]   [2021]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH net-next] drivers: net: dsa: qca8k: convert to GENMASK/FIELD_PREP/FIELD_GET
From


On 9/30/2021 6:37 PM, Ansuel Smith wrote:
> Convert and try to standardize bit fields using
> GENMASK/FIELD_PREP/FIELD_GET macros. Rework some logic to support the
> standard macro and tidy things up. No functional change intended.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>
> I still need to test this in every part but I would like to have some
> approval about this kind of change. Also there are tons of warning by
> checkpatch about too long line... Are they accepted for headers? I can't
> really find another way to workaround the problem as reducing the define
> name would make them less descriptive.
> Aside from that I did the conversion as carefully as possible so in
> theory nothing should be broken and the conversion should be all
> correct. Some real improvement by using filed macro are in the
> fdb_read/fdb_write that now are much more readable.

My main concern is that it is going to be a tad harder to back port
fixes made to this driver with such changes in place, so unfortunately
it is usually a matter of either the initial version of the driver use
BIT(), FIELD_{PREP,GET} and GENMASK, or the very few commits following
the initial commit take care of that, and then it is all rosy for
everyone, or else it may be complicated.

You are one of the active contributors to this driver, so ultimately you
should decide.
--
Florian

\
 
 \ /
  Last update: 2021-10-01 04:14    [W:0.050 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site