Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1427992lqa; Mon, 29 Apr 2024 08:12:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrMVNVSNgy2ZHTBFRwiUYrn+od9T55meBM15DwMf4qeoh87ZF9+6MwmWXlxPBprSCgPIOOh77BXU5XDXfSBsjLVtlVvXwGe1tiEz788A== X-Google-Smtp-Source: AGHT+IGqG5DQr3bzv/ZdBdCriixTwvBg+gCk+94AW0uXAokWf/q/rLDZeJNWv7yhZpi1ILuHLqnF X-Received: by 2002:a50:aa89:0:b0:56d:b7d6:d64b with SMTP id q9-20020a50aa89000000b0056db7d6d64bmr9302518edc.29.1714403568778; Mon, 29 Apr 2024 08:12:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714403568; cv=pass; d=google.com; s=arc-20160816; b=lxw4p8BgN9OSwJ1ru3jk/H3Ezs45YLF1ip274+VQyDfHWBeHz4vBpND2pvwgqaFiuI XzmpQ9hwDPOhCUFmyjGwcbAWgf9GdMZBaJblp7FZogGQvwCVhRIvOMyvZnbpoKvGpHsb 8Z9p18/77l7Y6/uJfC4+ogcVrlXv+ij2RZ1oaIPX2xIRBI01625f7b20mO7RYuucAbXI bQmsCgSwhgceD2DWw1YdBl4LAIYMLbvfg0sZt+xbwQc9DaQg4Px4lwPyXoa2ZHM92UzJ z8OPUKTeEdshXVkG0TYY1SBFSAiR+D4Sx/0ilmg7VWCdV4KpuuSSrg+dN3ONJsI6C9f2 hJoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=TBoYdFZFpJunUvgv52P8o/805oLnG0rRdaJVdgyqfIE=; fh=8Xy6NIcu9wIgXFHqUAS5b5sr7AcZeEfMZ9RnoJ1/ZcU=; b=pmySpxP7z8VkFWEXSL9HPa1Vmu+yV5Xtqb8wejDAbIWxZZ45/+GpXeMTdfwIB+D+fv Q4FW/c9o4cAIymFrR3AeFs8dJj7aEpFwX+sMWhyGqgM2s4BMwktpmrSEWTEqYg/JIvr6 ZxSf+BTeYgH+3KTv3dnsx0O9E5t2m/g0+SJnS3euQwX5qc+B5ZktK0cZOW5ORULf1jES q37F2pO0VU4gkobnQFtxWXlRH2dlsDfsHzTsiygnrYaU6mzuQEzs8pc/LiPg6omYKaEA ZnJsq5qS9yLBjzNo0QwMoLUdHAKva6qwWLEJBKpRzUVGdI53LtfxSau+tqtF7CEz3WHR +uXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ly3b7w2l; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-162511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x6-20020a50ba86000000b005725314f5ffsi4447333ede.314.2024.04.29.08.12.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:12:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ly3b7w2l; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-162511-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162511-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 579341F241A2 for ; Mon, 29 Apr 2024 15:05:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B829482D93; Mon, 29 Apr 2024 15:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ly3b7w2l" Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2E7481736 for ; Mon, 29 Apr 2024 15:04:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714403087; cv=none; b=qPw3nPIsUFGskuWf2pZIS1XDi3hbwas6j/pZoqz6RL0Qq5STLh0UcTv8MT9W/6QJLFC//CefuME/ZZOtE+tCCJNf+8leLCFhZqTYarpSA3X8aS7CyymXv7h0/6Ckva0zS3FpwceCsNN3zjzIrHy+BZy7R8F4G4MC+Wo41PFeDkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714403087; c=relaxed/simple; bh=urLejDAQyDwbji+siqv8Du9RbhkbIBb0Js/GJvw2ut0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=loZpuum1AScLMCy29SN8VvEEf0xhdw8EX47se8ZwM4bwkcoWRLlGRUYjNf7AQbhRBKD5Nx49+M9EwlfqkS+8YFl5VkgrluDuRUBchfMJOlk4t74UGCUxdcuLWyTLgNHEsNkDNHLVBL3KuEUrjicTFtgsIo+ynDvA8LYmQa2x7p8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ly3b7w2l; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-78f03917484so307886985a.3 for ; Mon, 29 Apr 2024 08:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714403085; x=1715007885; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=TBoYdFZFpJunUvgv52P8o/805oLnG0rRdaJVdgyqfIE=; b=ly3b7w2ldh9tt7qi4JOWn/CMOZMz+OYVG6YUlFxRGgCKzoq4hpxr9X/913NxU+opE3 It4LRZgp7qqSYZLLXk74gAHL+aeCnJqVcWpEAK0/Is+hx5HuANk4ZEIfVbqSzXQAX/k1 k/rT+rilwSu/eK7owA9o3wVS3Bina1cD5i0C8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714403085; x=1715007885; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TBoYdFZFpJunUvgv52P8o/805oLnG0rRdaJVdgyqfIE=; b=rJzjHpVkKxCCj6kuxXo4EhGMed9gphvi3P9CbtCDawBEjsKnDDQ7fcGqgSESyVapjp jDm06sZX/WtkmHGHJe7MtdBgOtB2ObYU5OMBu0VF6JFNsItpd54i/1GL+W5oC9JL2nSK WGNSCs/mm+XB1HJ3BWAAnK4gh110yBUbx5lp8Dd8tY4bt/ugmVskG13MJYcsLf3czgN6 kLVf1zLdrhG7HFCyQuFm3tMh2wzW4KfUuhOaYy8VLNLbkpdm6vSBaZP88NOEjt5MsNOn kUN6BpEopAYeYfmAx01yY2Dz7Mm7DGRxlXdjM2v31J8LTOHtJmlFlxNhVsi4zQSZqIBR ycPw== X-Forwarded-Encrypted: i=1; AJvYcCWqVDsgez3Xsxy6m7Cq1VuQc3ZCji3/xqHEI0gNK4ZAcIkduD9gIle6qN6dzxZYW2KKMPmGta7Wu8fGjoH0fJ6gV0aqTQiGbT0k2cnb X-Gm-Message-State: AOJu0Yy4Ii4aRQrcI18wG1zfhZ1tbm2YyOS+ftuUZTBc2IiXXszuiXmW cFgqNp7zant0POoxKgLaZCVmfihDr1fd2l97tlixwwS9jAMfxD3MBCjH1b3XIw== X-Received: by 2002:a05:620a:39d:b0:790:944d:65b3 with SMTP id q29-20020a05620a039d00b00790944d65b3mr8124237qkm.62.1714403084821; Mon, 29 Apr 2024 08:04:44 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id p7-20020a05620a056700b0078d3b9139edsm10568591qkp.97.2024.04.29.08.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:04:44 -0700 (PDT) From: Ricardo Ribalda Date: Mon, 29 Apr 2024 15:04:41 +0000 Subject: [PATCH v3 02/26] media: stb0899: Simplify check Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240429-fix-cocci-v3-2-3c4865f5a4b0@chromium.org> References: <20240429-fix-cocci-v3-0-3c4865f5a4b0@chromium.org> In-Reply-To: <20240429-fix-cocci-v3-0-3c4865f5a4b0@chromium.org> To: Martin Tuma , Mauro Carvalho Chehab , Laurent Pinchart , Hugues Fruchet , Alain Volmat , Maxime Coquelin , Alexandre Torgue , Paul Kocialkowski , Greg Kroah-Hartman , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sakari Ailus , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , Matthias Brugger , AngeloGioacchino Del Regno , Hans Verkuil , Sergey Kozlov , Abylay Ospan , Ezequiel Garcia , Dmitry Osipenko , Benjamin Mugnier , Sylvain Petinot , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.12.4 chip_id is an unsigned number, it can never be < 0 Fixes cocci check: drivers/media/dvb-frontends/stb0899_drv.c:1280:8-15: WARNING: Unsigned expression compared with zero: chip_id > 0 Reviewed-by: Bryan O'Donoghue Signed-off-by: Ricardo Ribalda --- drivers/media/dvb-frontends/stb0899_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/stb0899_drv.c b/drivers/media/dvb-frontends/stb0899_drv.c index 2f4d8fb400cd..35634f9a8ab5 100644 --- a/drivers/media/dvb-frontends/stb0899_drv.c +++ b/drivers/media/dvb-frontends/stb0899_drv.c @@ -1277,7 +1277,7 @@ static int stb0899_get_dev_id(struct stb0899_state *state) dprintk(state->verbose, FE_ERROR, 1, "Demodulator Core ID=[%s], Version=[%d]", (char *) &demod_str, demod_ver); CONVERT32(STB0899_READ_S2REG(STB0899_S2FEC, FEC_CORE_ID_REG), (char *)&fec_str); fec_ver = STB0899_READ_S2REG(STB0899_S2FEC, FEC_VER_ID_REG); - if (! (chip_id > 0)) { + if (!chip_id) { dprintk(state->verbose, FE_ERROR, 1, "couldn't find a STB 0899"); return -ENODEV; -- 2.44.0.769.g3c40516874-goog