lkml.org 
[lkml]   [2021]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next v7 5/6] stmmac: dwmac-mediatek: add support for mt8195
From
Date
On Wed, 2021-12-08 at 17:51 -0800, Jakub Kicinski wrote:
> On Thu, 9 Dec 2021 09:48:25 +0800 Biao Huang wrote:
> > Sorry for some typo in previous reply, fix it here.
> >
> > All these warning lines share a similar semantics:
> > delay_val |= FIELD_PREP(xxx, !!val);
> >
> > and, should come from the expansion of FIELD_PREP in
> > include/linux/bitfiled.h:
> >
> > FIELD _PREP --> __BF_FILED_CHECK --> "~((_mask) >>
> > __bf_shf(_mask)) &
> > (_val) : 0,"
> >
> > ===============================================================
> > __BF_FILED_CHECK {
> > ...
> > BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
> > ~((_mask) >> __bf_shf(_mask)) & (_val) : 0, \
> > _pfx "value too large for the field"); \ ...
> > ===============================================================
> >
> > Should I fix it by converting
> > delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE, !!mac_delay-
> > >tx_delay);
> > to
> > en_val = !!mac_delay->tx_delay;
> > delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE, en_val);
> >
> > or other suggestions for these warnings?
>
> I see, thanks for explaining. The code is fine, we can simply ignore
> this warning IMHO.
OK, thanks for your comments~
\
 
 \ /
  Last update: 2021-12-09 02:55    [W:0.180 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site