From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool Date: Fri, 14 Jul 2017 15:05:12 +0300 Message-ID: <20170714120512.ioe67nnloqivtbr7@mwanda> References: <20170714092540.1217397-1-arnd@arndb.de> <20170714093938.1469319-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170714093938.1469319-1-arnd@arndb.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Arnd Bergmann Cc: devel@driverdev.osuosl.org, linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, Greg Kroah-Hartman , Daeseok Youn , Linus Torvalds , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, adi-buildroot-devel@lists.sourceforge.net, Hans Verkuil , linux-ide@vger.kernel.org, Guenter Roeck , Niklas =?iso-8859-1?Q?S=F6derlund?= , Tejun Heo , akpm@linux-foundation.org, Mauro Carvalho Chehab , Robert Jarzmik , linux-arm-kernel@lists.infradead.org, Alan Cox List-Id: dri-devel@lists.freedesktop.org Changing: - if (!frob()) { + if (frob() == 0) { is a totally pointless change. They're both bad, because they're doing success testing instead of failure testing, but probably the second one is slightly worse. This warning seems dumb. I can't imagine it has even a 10% success rate at finding real bugs. Just disable it. Changing the code to propagate error codes, is the right thing of course so long as it doesn't introduce bugs. regards, dan carpenter