Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1269711pxb; Sat, 17 Apr 2021 12:01:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsszYuDyYO3IXvuitVvRu/ys2gBUGZ0GlQvWcXGpdFR1VwVXt3FwuKVXuwOZBpvzeIXDU0 X-Received: by 2002:a17:902:ee4d:b029:ea:ce1c:690f with SMTP id 13-20020a170902ee4db02900eace1c690fmr15231200plo.35.1618686079888; Sat, 17 Apr 2021 12:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618686079; cv=none; d=google.com; s=arc-20160816; b=zrTStDI+yGQJGH1PG0syzJAouEEkPG+ia2NsJJ5Gy3Hu4RtEh/VmV8L6SFrITdN/Qs 8NqGevqV8Y2XEcoy0HfNmvbXaUH52qHGgFNL/n+6cbIfIglRgS/N/CaW5jdbaoiOGJvb d9WzCeHi4im6Wno4vBV6ingyYYgwt6zAfJYdNa7wgyYWjgOjZADrBOWcqhLRPHEXQ9vf s13sj32x1lkQAXtgTD3iHO6zW3XTuKbsedOtYQIeQg8xXXicqj8kMQ5Z0CCK6WCc0H4p Zm1YDqQQCp+HFiERLD0R2zoVkLehmcbRD1tTZgb9clMT+MxnZby375FeBfj1umsg5uSM LvVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Sj595HJHYte4gcD4x98H8tHD13CLkarJ6jv/FmVf9UA=; b=ymSZguQEFckD3l8LCjxzItJPnllcZtYbdjjRxHCvtO8SznEIhGF1XjNP+TTezLUofu wqehlXtffcl/WwK2QFYZhxk1QTEP/2P/pGB+HGy2X7XKjr/Xpy9cAiE1KxMRXLEZufiD sBAxS9yRpfDa0uSJKK6c6/5MzghOgO5gyB+UH1y+f/eNBAQbsfHhhDCU6kd0DCKzuXmx iCB1ucTP8x7UF1WESrQUl6NgMJ6uVgH8HFW37hpxgeV0y44sXWy6fkd7J6TkQs5wTlXg CINKEVkaDwrdM0CATs72W50YWrUf2lrOGh0jbbVSaeeddvCWy8+opA2ja8kC4TzDimid MWDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mWgNqAbs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d31si10868684pgd.286.2021.04.17.12.00.36; Sat, 17 Apr 2021 12:01:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mWgNqAbs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236917AbhDQS4s (ORCPT + 99 others); Sat, 17 Apr 2021 14:56:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:45424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230064AbhDQS4p (ORCPT ); Sat, 17 Apr 2021 14:56:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD7E3611AF; Sat, 17 Apr 2021 18:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618685778; bh=q4iX3RXOxXW84nbXIPQOIIfrItUVpHgRu5CQVY3pD10=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mWgNqAbstI1cedVjNcKZidVcBm6v9IMj6tzpUNed3gM+CxaGhhzIxC1UOwBzntmUW c1U1MiHMnGGaKttVW39g17SsIQZtZvGXzyJAxB1L5XR9ZygLHpQCXujyFHR235qdR8 dZFMoheVyzYtQ0iBi2dCjpL6CMHG6fQoRuHMND+ROEKNiHuczSIzTecO3wRPTV5De4 jqyb1DK88vc83w9nPL8JMnYBU1AIakMztOAGgCZw3AJI6xdWUSrZ8lBQ1IsnNicTpK XlmBjnNMvaD5SU74U3oO5NHldTInUUnqPG+fq+aLTx4Mvci7aJI83JJPQIuVWXKDm6 zAtyEUgR6KUcQ== Date: Sat, 17 Apr 2021 20:56:13 +0200 From: Mauro Carvalho Chehab To: Ashish Kalra Cc: Sakari Ailus , Greg Kroah-Hartman , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: atomisp: silence "dubious: !x | !y" warning Message-ID: <20210417205613.5c1aac74@coco.lan> In-Reply-To: <20210417153627.GA50228@ashish-NUC8i5BEH> References: <20210417153627.GA50228@ashish-NUC8i5BEH> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, 17 Apr 2021 21:06:27 +0530 Ashish Kalra escreveu: > Upon running sparse, "warning: dubious: !x | !y" is brought to notice > for this file. Logical and bitwise OR are basically the same in this > context so it doesn't cause a runtime bug. But let's change it to > logical OR to make it cleaner and silence the Sparse warning. > > Signed-off-by: Ashish Kalra > --- > .../media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c > index 358cb7d2cd4c..3b850bb2d39d 100644 > --- a/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c > +++ b/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c > @@ -58,7 +58,7 @@ sh_css_vf_downscale_log2( > unsigned int ds_log2 = 0; > unsigned int out_width; > > - if ((!out_info) | (!vf_info)) > + if ((!out_info) || (!vf_info)) While here, please get rid of the unneeded parenthesis: if (!out_info || !vf_info) > return -EINVAL; > > out_width = out_info->res.width; Thanks, Mauro