> -----Original Message----- > From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > Sent: Wednesday, November 22, 2023 9:02 PM > To: Su Hui <suhui@xxxxxxxxxxxx> > Cc: Ping-Ke Shih <pkshih@xxxxxxxxxxx>; kvalo@xxxxxxxxxx; nathan@xxxxxxxxxx; ndesaulniers@xxxxxxxxxx; > trix@xxxxxxxxxx; lizetao1@xxxxxxxxxx; linville@xxxxxxxxxxxxx; Larry.Finger@xxxxxxxxxxxx; > linux-wireless@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; llvm@xxxxxxxxxxxxxxx; > kernel-janitors@xxxxxxxxxxxxxxx > Subject: Re: [PATCH wireless-next 2/2] rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior > > Perhaps, a better way to silence the warning is to just change > _rtl8821ae_phy_calculate_bit_shift() to not return 32 bits? Do we > really ever pass bitmask 0? No idea... > I think the bitmask should not 0, so just replace _rtl8821ae_phy_calculate_bit_shift() by __ffs(bitmask). To be safer, callers can check bitmask is not 0 before calling. Ping-Ke