Re: [PATCH net-next 00/14] redefine some macros of feature abilities judgement

Leon Romanovsky
2022-09-27T10:24:51Z

On Mon, Sep 26, 2022 at 10:11:35AM -0700, Jakub Kicinski wrote:
> On Mon, 26 Sep 2022 20:56:26 +0800 huangguangbin (A) wrote:
> > On 2022/9/24 19:27, Leon Romanovsky wrote:
> > > On Sat, Sep 24, 2022 at 10:30:10AM +0800, Guangbin Huang wrote:
> > >> The macros hnae3_dev_XXX_supported just can be used in hclge layer, but
> > >> hns3_enet layer may need to use, so this serial redefine these macros.
> > >
> > > IMHO, you shouldn't add new obfuscated code, but delete it.
> > >
> > > Jakub,
> > >
> > > The more drivers authors will obfuscate in-kernel primitives and reinvent
> > > their own names, macros e.t.c, the less external reviewers you will be able
> > > to attract.
> > >
> > > IMHO, netdev should have more active position do not allow obfuscated code.
> > >
> > > Thanks
> > >
> >
> > Hi, Leon
> > I'm sorry, I can not get your point. Can you explain in more detail?
> > Do you mean the name "macro" should not be used?
>
> He is saying that you should try to remove those macros rather than
> touch them up.

Exactly, thanks Jakub.