Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3284579pxb; Tue, 20 Apr 2021 05:06:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyJMnTj5ddVAEqQ5nZf3Y1UsKOZikgQ2/K+NkjhsG/avJEKAg1aDhYU3qkU+hy/K1cFTFH X-Received: by 2002:a63:3757:: with SMTP id g23mr16570223pgn.422.1618920396178; Tue, 20 Apr 2021 05:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618920396; cv=none; d=google.com; s=arc-20160816; b=hBYXXDY7kRM3fsFwGsQC/x8L1K/+sEz7FNdL2fx5dUUiL51+y3gTUevE/C8wScF4/1 MEmJLKmbNpNyZv7VcMcGt3o/y97N+z1oQMC1RtLoE/YyZLe5GRJVCeNLt5Ym6sdybeUb jiijwqqBKb65Y7LsMN6WeSbHR58EVNXozNu5JmmE0NaIq6i8NFNsL0HI8PMcpRVIlUrQ I6YFwWORhD6ZVY8v7PTljWWa/Ztz1wM5bH5gigOtxJoaJddLNd9cwCLjjQeq9ECGtSFa SftIg3Z2oxYFBIf3/YLlClIUhgk4DkcrtsaD4ZecRS3xk16g6tF41NyqucrVe3jhdjHV ZyAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=hOjRdcVj/vhC8QEJJK2RYHYHr0CLQHqjNWi1pVmSYoA=; b=OVooK6HbU3T4pOgHYeADBsUoVnpXQz+NFI8Ao3VVQi1XymJBhyteh3QogeVYdh61XV GzY8GTJZ0rOHCxODG9nvVG1+4wHD8k7ra21Ljvws2KUZYaX+TDfpPrNQQUiaRqrkvfx6 HTL2NMkiEDjsZ/vHSXgVnIcUHWJ92oalhDOoxoViAWB55Bw/qgBQ/xakkzkTEzh790HC D/VZv96bzvMtiluZw2y2nGTMO0sTxz/wlb1zpseCSfd9fhDVzcAiPOpXGvIepGx++9dM qJP0ZOGDL8uBpGWdrdej1D/x3wB0kfW7HaO7G1SF/7tGXNBsi2/p8T0ZeY6wDG097D6o fl4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=fAPcB6T9; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si24954473pfu.100.2021.04.20.05.06.23; Tue, 20 Apr 2021 05:06:36 -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=@xs4all.nl header.s=s2 header.b=fAPcB6T9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231944AbhDTMEs (ORCPT + 99 others); Tue, 20 Apr 2021 08:04:48 -0400 Received: from lb1-smtp-cloud7.xs4all.net ([194.109.24.24]:35421 "EHLO lb1-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbhDTMEq (ORCPT ); Tue, 20 Apr 2021 08:04:46 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud7.xs4all.net with ESMTPA id Yp6wlXcgL8K3KYp6zlzVd5; Tue, 20 Apr 2021 14:04:13 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1618920253; bh=hOjRdcVj/vhC8QEJJK2RYHYHr0CLQHqjNWi1pVmSYoA=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=fAPcB6T9UvBNirxHTMGn2rs0Rehy/FF3+NYIYI8wmk2pkMSpWBKuOicdnnYA922S7 RTfZ4cH+c0uNOHIZC/54UEX6jTJjiY0xVB6lXWCLXIYJSmGF0Fyu97UGTvvE1sHjrr XZDf5XPFyl2ZN0H+Tpi0+RqN72kHLve/BcxBSEefg/N+urHtM3C3SQCoua1lKD0AgX bI+JeayI4U/Wtv0ebtQfP7VLt2YavfSMJOBRUn7fSXpbQuUwsHfDVSSTpzJ6ZAKfzR tE/8y76g+cOWGx4V639I9TVLBnbpk8mLXw+zznxkSNv3YB0mxhJAfAd1ddvnxfyW4/ ZvHaGKr9vv8cQ== Subject: Re: [PATCH] media: atomisp: silence "dubious: !x | !y" warning To: Ashish Kalra , Mauro Carvalho Chehab Cc: Sakari Ailus , Greg Kroah-Hartman , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org References: <20210417153627.GA50228@ashish-NUC8i5BEH> <20210417205613.5c1aac74@coco.lan> <20210418012648.GA4821@ashish-NUC8i5BEH> From: Hans Verkuil Message-ID: <5abf96ba-b73f-005f-f489-81c6e3a57648@xs4all.nl> Date: Tue, 20 Apr 2021 14:04:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210418012648.GA4821@ashish-NUC8i5BEH> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfCeDK+lIdYygSjSbwF3EraPHGthWBShAeXh/SHt0WbKm2m9F0LVGg2KktfY9PnncxcIPo5bQ/KhijIl50OKsO6rMgwQHUf/kbpoHmMNuRWeuPPiSHvY9 ZRK48KJNCB+vSkr6Yo1TMgUjL5dhyxNCsAYsth61/Yf1HqKSj57PcdcQc4GD1Vr2q+Ig8CL6iwpFdFSpsz0u5g9Ua+lo30bxOV4gdxs1COPsRhYQVPH1hbRe 0FR7lq4R+SUDfes9sVxblffz45fKlHE711XuBukD9LIEjfPO691IguUK7JMMGNqyT+s/ApoN8vkeo724vgI/xiAmmpy3ic6WEJ9n6HNHqbEn4c/t0lOie/XY NxbAQwM7ie2+BPRhnLgQ3LFsry8ng6SCNAx3taeOsZyWP9A2x7S5VX98q9hBcuN5dAzh7fDK Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ashish, On 18/04/2021 03:26, Ashish Kalra wrote: > On Sat, Apr 17, 2021 at 08:56:13PM +0200, Mauro Carvalho Chehab wrote: >> 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 > Updated Patch as per your feedback Please don't post patches as an attachment. Just post it inline as you did the first time, but with Subject prefix [PATCHv2]. Thanks! Hans