lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 17 Oct 2021 13:48:58 +0200 From: Michael Straube <straube.linux@...il.com> To: Martin Kaiser <martin@...ser.cx>, Greg Kroah-Hartman <gregkh@...uxfoundation.org> Cc: Larry Finger <Larry.Finger@...inger.net>, Phillip Potter <phil@...lpotter.co.uk>, linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org Subject: Re: [PATCH 3/8] staging: r8188eu: remove two checks that are always false On 10/16/21 13:30, Martin Kaiser wrote: > Commit aefb1fc5c185 ("staging: r8188eu: odm BoardType is never set") > clarified that the odm board type is always 0. > > The CheckCondition functions extract the board type from the hex > parameter and stores it in _board. For _board == 0, > (_board == cond) && cond != 0x00 is always false. Remove the checks. > > Signed-off-by: Martin Kaiser <martin@...ser.cx> > --- > drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c | 5 ----- > drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c | 5 ----- > 2 files changed, 10 deletions(-) > > diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c > index a623e0aaa0d0..f6e4243e0c7b 100644 > --- a/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c > +++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_BB.c > @@ -13,7 +13,6 @@ > > static bool CheckCondition(const u32 condition, const u32 hex) > { > - u32 _board = (hex & 0x000000FF); > u32 _interface = (hex & 0x0000FF00) >> 8; > u32 _platform = (hex & 0x00FF0000) >> 16; > u32 cond = condition; > @@ -21,10 +20,6 @@ static bool CheckCondition(const u32 condition, const u32 hex) > if (condition == 0xCDCDCDCD) > return true; > > - cond = condition & 0x000000FF; > - if ((_board == cond) && cond != 0x00) > - return false; > - > cond = condition & 0x0000FF00; > cond = cond >> 8; > if ((_interface & cond) == 0 && cond != 0x07) > diff --git a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c > index 3e2a09fc2619..5e0a96200078 100644 > --- a/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c > +++ b/drivers/staging/r8188eu/hal/HalHWImg8188E_RF.c > @@ -6,7 +6,6 @@ > > static bool CheckCondition(const u32 Condition, const u32 Hex) > { > - u32 _board = (Hex & 0x000000FF); > u32 _interface = (Hex & 0x0000FF00) >> 8; > u32 _platform = (Hex & 0x00FF0000) >> 16; > u32 cond = Condition; > @@ -14,10 +13,6 @@ static bool CheckCondition(const u32 Condition, const u32 Hex) > if (Condition == 0xCDCDCDCD) > return true; > > - cond = Condition & 0x000000FF; > - if ((_board == cond) && cond != 0x00) > - return false; > - > cond = Condition & 0x0000FF00; > cond = cond >> 8; > if ((_interface & cond) == 0 && cond != 0x07) > Acked-by: Michael Straube <straube.linux@...il.com>
Powered by blists - more mailing lists