Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1897119lqp; Tue, 16 Apr 2024 00:32:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVea5EgyMjsFAc3PgA2HAbGf3Pl3QE9wC3o1MxoO4+XI4VPcXAtTGdUhW++KIiqzWwRIUZQuyrzoNR/Z3pMNnOwlWUSwMdDOr+5u7xu+Q== X-Google-Smtp-Source: AGHT+IE51nsCM7jRHGWjuTjmdFFkzs9l+olXoLUpb4BNFdaF6bsqXWgvnaVoIhuCl7zLsuRuu14H X-Received: by 2002:a05:6214:4c01:b0:69b:a44:bb71 with SMTP id qh1-20020a0562144c0100b0069b0a44bb71mr10509990qvb.54.1713252755383; Tue, 16 Apr 2024 00:32:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713252755; cv=pass; d=google.com; s=arc-20160816; b=m/p2ko/ButoB4V0B271u7PBgDJBxo1h7DgbcvPyacnqmsHcLMUOGdrPP4bEmL6KNLb LWWzcsup40+KvJviK3rj54IdoDmgA+yqga3hDMlggK5sgbwbCtVtx1Nu9lUzVapI0D7d UZwCURdAFcv8N6AtHDdmqOjoa/MlCeYCskwA5FeGdVeT8l4jxAN77TkHJbq9TX0eHbtt nwNes6IJ7YQExfc1bY1cp1IxPpOrpZodNocIeAZGZpzLlFS4Bc0tZeZFPTfZ1BZ3Uv4y Kvc7tDgpvGxVZVN78LDb+P8QTPxdMq/NP6Wo/NND3IMrpkayDi95dKLOpYR7iIe3GOv9 gWLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8R9bVOGo16amHaHdQgn3vohiOg/80cUEYV+3t7qlHzM=; fh=xkXINY2G5cT8p1roKvwyPjIIYfT1H/w3IHuKyjoDfIQ=; b=f56tkagJhTd808l+2+Xccr5BjQluQzM6KrROl3pYjSSKznI65Wao87vkPLII1Y4VDC jfIX+Je1vM/voLjFJsj6MnhuTXBurWdDcCg6UTtsQY1SucXa5j/qtUG13f86272p8rEu mIqF7ObD76DLKfR7sfWRNRyZW5jr/ehOMz9xz5ltjJAgsxi0puUtCikOFMLr3knZmSz5 fqr2O/4XVowo8QxA1a9NCDA9sfrekSeLv0Uah+vUmPoCpidRBBsqi1N/chGQA98J1phF J/EK2ZqnfoO2C04Iq1XL/tSPFJMicGPkt0WJ54lw/fwLQmnnam/txFCnzamA72tvq4L5 E+PQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jHdVgNVw; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-146431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 e5-20020ad44185000000b0069b7ed3fca1si3327684qvp.615.2024.04.16.00.32.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 00:32:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146431-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=@linaro.org header.s=google header.b=jHdVgNVw; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-146431-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 106D21C218C0 for ; Tue, 16 Apr 2024 07:32:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71CF93B78B; Tue, 16 Apr 2024 07:32:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jHdVgNVw" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 EDE5A78C66 for ; Tue, 16 Apr 2024 07:32:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713252742; cv=none; b=Ll3ZYxRV4SsEcM//0mgodnqvtsIULwo6pfAovz07FZTQfNsFeAA/t5obZsGYETD0xjrn6vYOLo7jiM6QWvkm04KkQf03MKyzwRY4rK1N/X+NlCS0Q29eL0xDTWIBIDm4sZBQAJ8nkaqWRiJStVONMzfihtO1XXdkzoNHfa5Vb3g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713252742; c=relaxed/simple; bh=Cs1dgXPtyii2K9Gr9D0keZ57yvHI7OfDP8UWsuFVXPo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GDCcdgEh3AZXKdmfqBdMF9QhoddEKrOqmIwKdiDXVHDZMDDd56JimCH7qJZgyiP2w8zOAvQkVMNn0fJmM4eZvOxrHNl01DvmWPBjj4peudibgfEHGn+dywxasEtk78rT/r7xANVKsPAjxWqdk0KJVwPWlegDiL+7Cecn9XhXaZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jHdVgNVw; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a51beae2f13so459191666b.1 for ; Tue, 16 Apr 2024 00:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713252739; x=1713857539; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8R9bVOGo16amHaHdQgn3vohiOg/80cUEYV+3t7qlHzM=; b=jHdVgNVw0xBVycy6FryZ/6a/Xi0qXaubIU5rhNKkprqtgwmPi9meLe5k4zG6cyYM0+ mY7rWYsVMxd3whSYm19DgwcmIc8NovyyQ33uncARihnb9WImpyt1/tUMQKa5UqBBQI01 xYqlJRLWJulSbW1m5uNb2RhM32xcQzwI7X8Z4rENT55gwpQrHd8f95D8E/sDi5JWSDEz 6+7Sw2KGcjHP4AW4DtljQ+oRJZ0wsRQa3Euy/BaYS5P1ihyr8PCverM5GBIGfxhp+AwX ky4CjKOxkjS/mR3Eh0iST5+t9O2wF2V/72j27kIEtnM4yzrrochKOVihGlJtYM5qaQNQ hqKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713252739; x=1713857539; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8R9bVOGo16amHaHdQgn3vohiOg/80cUEYV+3t7qlHzM=; b=roMCRrqGrWwSGEiYl22vh8Z6SIqYxF9Etvuj1xmg5soDon44FJNf6GPhB7njavB5xn ReUQzYQ63L8CiXXToCP9OkwLoi66o8jpIg/XD2SI9lxhqh39wPb0S2tmfenn2Fq5QWs1 C9rylkNXiwH6BORyRiQQUNVrf07UAbmweYlMkCqx8xDSKa4za4IgFvGA/szGE9akVsFn vmEs7LW207yTCbfC1A056aZQ2P1CrWO8vekhKCmCc/BRPVJNLVR2X0Hi6gE0/ubNWLaE H4w/PFYnYEibnXxdQbuBZFb9opmUSf8tKgCYrWK01XqLwRdS1tNLNpp/kojtSuZb5nYn Zpnw== X-Forwarded-Encrypted: i=1; AJvYcCUP4KW0W+30T+exeRuIz7euN11CZi/0oFapq+Rbo//bKWEDRDMQwEidYe8b0OYE/HKgGI0ZcidVwZ/HBS/Rf93dCYt8o6ZMyaTM7ZMb X-Gm-Message-State: AOJu0YzgJJuEQPlZZyBeuUwG9xkYT54khYgRqmkXU2nddQOA2t37oTBR ynCjV55n2fKTWGzJzM1F9FZ5vD8x2IQlqOJmJGo7tpFbmEsmyVrqVLUu5zYrfPA= X-Received: by 2002:a17:906:57d6:b0:a52:6c4e:25ae with SMTP id u22-20020a17090657d600b00a526c4e25aemr2620587ejr.44.1713252739010; Tue, 16 Apr 2024 00:32:19 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id qb11-20020a1709077e8b00b00a51ab065bf0sm6421883ejc.202.2024.04.16.00.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 00:32:18 -0700 (PDT) Date: Tue, 16 Apr 2024 10:32:14 +0300 From: Dan Carpenter To: Ricardo Ribalda Cc: Martin Tuma , Mauro Carvalho Chehab , Laurent Pinchart , Hans Verkuil , 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 , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Bjorn Andersson , Konrad Dybcio , Benjamin Mugnier , Sylvain Petinot , Jacopo Mondi , Kieran Bingham , Laurent Pinchart , Niklas =?iso-8859-1?Q?S=F6derlund?= , Pavel Machek , 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 Subject: Re: [PATCH 02/35] media: stb0899: Remove unreacheable code Message-ID: References: <20240415-fix-cocci-v1-0-477afb23728b@chromium.org> <20240415-fix-cocci-v1-2-477afb23728b@chromium.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240415-fix-cocci-v1-2-477afb23728b@chromium.org> On Mon, Apr 15, 2024 at 07:34:19PM +0000, Ricardo Ribalda wrote: > 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 | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/media/dvb-frontends/stb0899_drv.c b/drivers/media/dvb-frontends/stb0899_drv.c > index 2f4d8fb400cd..222b5476ebfd 100644 > --- a/drivers/media/dvb-frontends/stb0899_drv.c > +++ b/drivers/media/dvb-frontends/stb0899_drv.c > @@ -1277,11 +1277,6 @@ 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)) { This is not dead code. It's possible for chip_id to be equal to 0. regards, dan carpenter > - dprintk(state->verbose, FE_ERROR, 1, "couldn't find a STB 0899"); > - > - return -ENODEV; > - } > dprintk(state->verbose, FE_ERROR, 1, "FEC Core ID=[%s], Version=[%d]", (char*) &fec_str, fec_ver);