From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 879AD1C242B for ; Thu, 22 Jan 2015 10:14:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 833768A29C for ; Thu, 22 Jan 2015 10:14:26 +0000 (UTC) Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xrwOFMCySaJF for ; Thu, 22 Jan 2015 10:14:26 +0000 (UTC) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by whitealder.osuosl.org (Postfix) with ESMTPS id E258789E15 for ; Thu, 22 Jan 2015 10:14:25 +0000 (UTC) Date: Thu, 22 Jan 2015 13:14:22 +0300 From: Dan Carpenter Subject: Re: staging/dgap/dgap.c:981: bad if test ? Message-ID: <20150122101422.GK6456@mwanda> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: David Binderman , Daeseok Youn Cc: "driverdev-devel@linuxdriverproject.org" On Thu, Jan 22, 2015 at 10:05:53AM +0000, David Binderman wrote: > Hello there, > = > [linux-3.19-rc5/drivers/staging/dgap/dgap.c:981]: (warning) Logical disju= nction always evaluates to true: conc_type !=3D 65 || conc_type !=3D 66. > = > Source code is > = > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (conc_type =3D=3D 0 || conc_type != =3D CX || > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conc_type !=3D EPC) { > = > Suggest code rework. Thanks. This bug was introduced in: commit f6aa0164cd3b1c5192e87f5651ec382c3bc3abac Author: Daeseok Youn Date: Sat Aug 9 14:38:41 2014 +0900 staging: dgap: Simplify to set a concentrator type It is same manner with setting a board type. For example of config file for concentrator, "conc ccon" or "conc epcon" After allocating a type of "CNODE" then set a type of concentrator. So remove cases in swith statement, just get a token from string and set to "conc.type". And also it doesn't need to "conc.v_type". Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman Let's CC Daeseok. regards, dan carpenter _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel