From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933308AbbENPTY (ORCPT ); Thu, 14 May 2015 11:19:24 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:18763 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932453AbbENPTV (ORCPT ); Thu, 14 May 2015 11:19:21 -0400 Date: Thu, 14 May 2015 18:18:59 +0300 From: Dan Carpenter To: Sudip Mukherjee , Micky Ching Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rts5208: remove always true comparison Message-ID: <20150514151859.GW14154@mwanda> References: <1431613559-17097-1-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431613559-17097-1-git-send-email-sudipm.mukherjee@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 14, 2015 at 07:55:59PM +0530, Sudip Mukherjee wrote: > the if comparison is always true as anything bitwise and-ing with 0x1E > can never be equal to 0x03. > > Fixes bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=69881 > It doesn't fix anything though, it just silences the warning. Warnings are nice because they let you know that the code is buggy. It's better to leave them there instead of making the bugs more complicated to find. Micky Ching might know if this is the right thing to do or if something else was intended instead of 0x03? regards, dan carpenter > Reported-by: David Binderman > Signed-off-by: Sudip Mukherjee > --- > drivers/staging/rts5208/sd.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c > index a8d657b..2e3f1f4 100644 > --- a/drivers/staging/rts5208/sd.c > +++ b/drivers/staging/rts5208/sd.c > @@ -4170,10 +4170,8 @@ RTY_SEND_CMD: > } > > } else if (rsp_type == SD_RSP_TYPE_R0) { > - if ((ptr[3] & 0x1E) != 0x03) { > - rtsx_trace(chip); > - return STATUS_FAIL; > - } > + rtsx_trace(chip); > + return STATUS_FAIL; > } > } > } > -- > 1.8.1.2 > > _______________________________________________ > devel mailing list > devel@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel