From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751289AbbEYQW5 (ORCPT ); Mon, 25 May 2015 12:22:57 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:51212 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750894AbbEYQW4 (ORCPT ); Mon, 25 May 2015 12:22:56 -0400 Date: Mon, 25 May 2015 19:22:40 +0300 From: Dan Carpenter To: Sudip Mukherjee Cc: Micky Ching , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rts5208: remove always true comparison Message-ID: <20150525162240.GA11734@mwanda> References: <1431613559-17097-1-git-send-email-sudipm.mukherjee@gmail.com> <20150514151859.GW14154@mwanda> <20150515101649.GA9605@sudip-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150515101649.GA9605@sudip-PC> 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 Fri, May 15, 2015 at 03:46:49PM +0530, Sudip Mukherjee wrote: > On Thu, May 14, 2015 at 06:18:59PM +0300, Dan Carpenter wrote: > > 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. > > but I am not seeing any warnings. I tried with make W=1, tried with > sparse, but still no warning. am i missing something? David Binderman is using a static checker of some kind. I'm not sure which. It might be cppcheck or it might be something private. regards, dan carpenter