Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp519721lqt; Fri, 19 Apr 2024 02:50:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU54coqSl1GGD4XRa6qamJhc1pK+2YrVh6olzL9l0wqm4k6Hl0Nt5g7E2q6gc9YO71HWBV0SYbqejpjhdlbf5VTFrtvF1fA36vmkpVpAw== X-Google-Smtp-Source: AGHT+IGS+dAAbC21Od/DwivPnyM/iv2FJbyScB4qHlqPg+sFIyZa3qI5qt/Qhf4QiguoNMgiI2AS X-Received: by 2002:ac8:5789:0:b0:437:ae7c:ebd with SMTP id v9-20020ac85789000000b00437ae7c0ebdmr1831315qta.28.1713520200190; Fri, 19 Apr 2024 02:50:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713520200; cv=pass; d=google.com; s=arc-20160816; b=OpWybzrtj1BSHJbIv6cSvYAGhKS+ecNgB07SZGhKNkxicwGjTVk6tvS+8zjYp0MmBh pqxfTjjtblvdzamJTz1KOkCPIMk4nhO90GCSYnxMM4rfTyu9neIuPbR32aiOq5F0J6G5 8Y5m2g9LVNCDVktfzwnyT7Sccp0cMoRTErw9WSK67X3rMFGXtLtcbeB47awtfkUWsZE4 quI8B0M3NpvjSMkWfCCfYxrOBTWTEuDm/EnRptCX+o+VwItvYDyjRgBm1rdwbR3zywh5 qWtd60VMzyfstK3DQhz++onI5AQoUvmyWxHwYndSTQAT31emq4JKNbLzz5tb5zbdwiHW 9vEw== 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=xe5eM9+2rh+qYMrEZDkgx2/xN2LnDn/yiZVZC6+s6fs=; fh=ipYMID+Ubk8u550HCvLzjJJzqYLkhaQ3EhcuGoFvvIA=; b=PdS4g5Yxnek9RdPmp+8o+8I+McFzHgXSJxRpbaUPAxAtlYTZmUrpDnu6+7gtKmwH9/ nD5dMdwZeSF4VIY2A9ljSU5M+wPAStsWEzxh0RPlR05Ou9OlTp7OSjjTlzJ6sXKAzXER jmXv//cpIVyTkDHdC445o9CZGD5DRp+vYJC4kvWGKEumgxTHpZTa+SaNQZpV2I5bvTXy Cez79/tqE0WZNzgCjyfDRIwTZURVZ4+wqnwR8DbdwBBjScAoOpk/MIuCjDoBZpqGMCVV 7ptTHi60krMUHYPHh8qt15TVH0v8IdiWAUwokpCfuBj5ywD12h/xc420dpqLAbddeQQ6 n9YQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=e8JZWmxy; 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-151249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151249-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fw12-20020a05622a4a8c00b004347cd2f31fsi3653261qtb.74.2024.04.19.02.50.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=e8JZWmxy; 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-151249-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151249-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E5E3B1C213E9 for ; Fri, 19 Apr 2024 09:49:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DEBD7E58E; Fri, 19 Apr 2024 09:49:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="e8JZWmxy" Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (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 B2B037C0A9 for ; Fri, 19 Apr 2024 09:49:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713520163; cv=none; b=O9cuj1woddl4fV4VMXfTMVToKSwBjSQibcIMrvbMhCVCFXxbavcHTjFpoRW9R5YpumKL1NaVsm6N7GIlby19MhPG5dmOjZ//2EtwNAdYEqB7Mw1eihNMRYB2Pcfn3K/SopgiqztGBfqDDQp5PTEOUwA0hXPT+zNDNj1+cW8mivQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713520163; c=relaxed/simple; bh=Oy36FoyBGe72y+nQ9C/xUGn3HkAwEUaNB0CeLr8vc+w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Tk686wlBrmrbv1dFItW/nV5llZ7mWAl09jwNoq5yoTchg0I7Pwixhrg0BT5vXc6sjKSopGHyM9qfEY3WdPIdgriJVtMyQdzxxz/gxyjEpYsoX4Hihm44Y3z68g/0fpe8n7Lno2+7THwm2E7E/a9vkulnt5hLAm8VDzGDNGiNShI= 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=e8JZWmxy; arc=none smtp.client-ip=209.85.222.171 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-f171.google.com with SMTP id af79cd13be357-78efd533a00so105605385a.0 for ; Fri, 19 Apr 2024 02:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713520160; x=1714124960; 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=xe5eM9+2rh+qYMrEZDkgx2/xN2LnDn/yiZVZC6+s6fs=; b=e8JZWmxyofnDazG93BvCeq1J2pZysTZUwMS2Obi4PMx42Tytz857AQxhLTiXRWNKWG SN2u/My91DWhbn0tZ20qRZTwm/Zi5RAlaLv0Tzkv9ljd55QRfWDhmhdLtl9ONFLnI2nm iq5wk46Ex3bKFLxs6uDzoUXtpn92IFrS5Gm9Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713520160; x=1714124960; 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=xe5eM9+2rh+qYMrEZDkgx2/xN2LnDn/yiZVZC6+s6fs=; b=OgbVPyibOlFLjuBqsWfOPxsCSD8cSRswpmRX9QR/xhGjtNKhX+v5tLqICahSN0UBhj ujkyKaDAqfSg0TMBczHD4OR68RxxMUQZJLgiDsJEgELtAHjRnWEGq3p+kZzmZ4kishld Zdtl8w1qbV+0rdT5BlCkhYyCinyoiu0M5RrEvlESC5TZ1NBfBzth/MXz7oeUxnSBNBJA 0SNaYlIRFWs7uCEA1PhmvQE3jXH70Enm/v5WMhP5gAGKmlOYk1CD+J7oLiWSB0lmN2Ss zgLAWqTOE0v5P9X0Zp8UpxcoW44XCqd3JdHsR6JdD2w4fXDKPKZB64v1l4B33f2P8DfC oSSg== X-Forwarded-Encrypted: i=1; AJvYcCWCsC87NhR6+R8vxd5kltLq4iBrn6XJHws8+LHQL43NTH/6XgSbW/gGkSzSXfZNptvNyktclacxlOPUVzksVqoQafxe6s/DLglIC5xx X-Gm-Message-State: AOJu0YyGBm1OuztqUtAr+hRQwLHG2+DdWd6A0Jiv5dpMgJGkZTxSbWFX XyGI9xEX9D5/K5t+7U3VmHUCsi3TdYM8seRmG/0hAD7HLITUWC6jQKqZJyOZrA== X-Received: by 2002:ae9:c119:0:b0:78e:ca95:81c5 with SMTP id z25-20020ae9c119000000b0078eca9581c5mr1646405qki.77.1713520160591; Fri, 19 Apr 2024 02:49:20 -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 dt14-20020a05620a478e00b0078d735ca917sm1434532qkb.123.2024.04.19.02.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:49:19 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 19 Apr 2024 09:47:48 +0000 Subject: [PATCH v2 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: <20240419-fix-cocci-v2-2-2119e692309c@chromium.org> References: <20240419-fix-cocci-v2-0-2119e692309c@chromium.org> In-Reply-To: <20240419-fix-cocci-v2-0-2119e692309c@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 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