Re: [PATCH] staging: rtl8188eu: remove dead code in do-while conditional step

2019-09-23 Thread Dan Carpenter
On Mon, Sep 23, 2019 at 03:38:39PM -0500, Larry Finger wrote: > This patch is correct; however, the do..while loop will always be executed s/correct/harmless/. > once, thus you could remove the loop and the loop variable bcmd_down. > > @greg: If you would prefer a two-step process, then this one

Re: [PATCH] staging: rtl8188eu: remove dead code in do-while conditional step

2019-09-23 Thread Dan Carpenter
On Mon, Sep 23, 2019 at 12:48:06PM -0700, Connor Kuehl wrote: > @@ -103,7 +102,7 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 > ElementID, u32 CmdLen, u8 *p > adapt->HalData->LastHMEBoxNum = > (h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS; > > - } wh

Re: [PATCH] staging: rtl8188eu: remove dead code in do-while conditional step

2019-09-23 Thread Connor Kuehl
On 9/23/19 1:38 PM, Larry Finger wrote: On 9/23/19 2:48 PM, Connor Kuehl wrote: The local variable 'bcmd_down' is always set to true almost immediately before the do-while's condition is checked. As a result, !bcmd_down evaluates to false which short circuits the logical AND operator meaning tha

Re: [PATCH] staging: rtl8188eu: remove dead code in do-while conditional step

2019-09-23 Thread Larry Finger
On 9/23/19 2:48 PM, Connor Kuehl wrote: The local variable 'bcmd_down' is always set to true almost immediately before the do-while's condition is checked. As a result, !bcmd_down evaluates to false which short circuits the logical AND operator meaning that the second operand is never reached and

Re: [PATCH] Staging: rtl8188eu: remove dead code

2015-03-23 Thread Dan Carpenter
On Fri, Mar 20, 2015 at 08:41:45PM +0100, Matteo Semenzato wrote: > From: Matteo Semenzato > > The condition pxmitpriv->hwxmit_entry == 5 is always false because > HWXMIT_ENTRY is always 4. > > Signed-off-by: Matteo Semenzato Reviewed-by: Dan Carpenter regards, dan carpenter -- To unsubscri