Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp821521rdb; Sat, 6 Jan 2024 10:30:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSY+x2Gm8E12/TeBueVPdbxSNLDhwfc8/QQqyYZQ6fX2XitUOj0lTTSTdIApVgV0EQWdNr X-Received: by 2002:a17:906:c112:b0:a27:e264:e114 with SMTP id do18-20020a170906c11200b00a27e264e114mr723631ejc.120.1704565824960; Sat, 06 Jan 2024 10:30:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704565824; cv=none; d=google.com; s=arc-20160816; b=hRvdT1EPPWpc7WOyr5fX2vSl7xMv9ji7aPBd1cwLeWRfTuybuhRqv4Aqe0JWB8q1We fUmwDNKGa5PT7WprMIG0AO9bpKVN8W6U72gQ6M0HGYBpNK4sTxX3VnR5K60gXe1IsKwU pxp1jg/y9JBqkqJkoRMb2Zn4J+jqDk77Spbk6v1QWQ5DfqnvXIMQNVChLr60Y7XGddVf wJ5L2Av9oqDiSmyWogrSCVeqSp7BRZhAlv3eDk+7ESHq2Na1NSZA7z9u8/uIjxCAADIk RS+qmXFm7vZF6J2G3iF3uMOvz0sraCN33K/OmHt3UCJb7rXeo9+PizInfYALYNuoQXNe sgyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=1Zoke3fyBEMbL+/AWQ+yXAfEnMPG0AZbPnTis+gWECY=; fh=F7KVdkwik9bdrN9AVK/NflcD6MyJmC6PF0TdpXrf5s4=; b=UOGVof1t+/GoRxS8OaRlNYHgg6dqWtA4PBrj1FiOATiXZOp3ebOKPgJegByEdL7teI hORYQ+9afcudk/XI7yWS5d++PJC4Cm1TrhYuo4wKm0pyCgx5LCgyqSC9lgbGIY1SqMBG e82WjEu26GvxySZyxHQkdzuLKB8IMsAtdPzkU/nFRAny66Y2td/fO7EdybZTFWo66qq8 dgRPN4NJ7O2BdcTN1+U42sAeA92ScfqgZqeG4XE6ZATS6cQSE7g8x9pL4UeM4us5oc7/ 44YoiHU4c8SE2laEP50pzd/bSo47LxSQwmImyP9Le3m9wfTFVlVbdnsIINKHbn2RTd19 meTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=s9ryCcg+; spf=pass (google.com: domain of linux-kernel+bounces-18692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18692-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ge14-20020a170907908e00b00a29906f2023si1106362ejb.124.2024.01.06.10.30.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 10:30:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=s9ryCcg+; spf=pass (google.com: domain of linux-kernel+bounces-18692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18692-linux.lists.archive=gmail.com@vger.kernel.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 B00611F21952 for ; Sat, 6 Jan 2024 18:30:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DB15F4E9; Sat, 6 Jan 2024 18:30:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lechnology.com header.i=@lechnology.com header.b="s9ryCcg+" X-Original-To: linux-kernel@vger.kernel.org Received: from vern.gendns.com (unknown [98.142.107.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D5B5D521; Sat, 6 Jan 2024 18:30:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lechnology.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lechnology.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1Zoke3fyBEMbL+/AWQ+yXAfEnMPG0AZbPnTis+gWECY=; b=s9ryCcg+cQExxSF1NHjpMW9R58 X3QWA1NYZG4QhamR98RD8koHnfInEQ3ScclPUBHSA40UOwc0HNAoEn/1Hm8l9RkTUvTGGr+Mk0tbs FsHk6ByFWl0Gy2oh2q1q9QAtbAg1DXMQJSIJ0zlSGYREtl7jjbMrYDBy5RVmU/G4S6zJGCZo4idbb 7SPZ29Lp9Z0M0TDvSw1pD12f//muLCVwOZazws79Jr5+rhGO2eqZ77M/iFTnqYUQgZkUsEIHJQETl S86cFOUAQpSYXV/xIUxiSsLX+/ndzYDWAYAX0QgbpXVDgIucIO1ZuOVwy8tpIGd9UWjdjJdA2nPmD xw2cAPyA==; Received: from ip98-183-112-25.ok.ok.cox.net ([98.183.112.25]:45288 helo=[192.168.0.142]) by vern.gendns.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1rMBFj-0006wJ-18; Sat, 06 Jan 2024 13:14:23 -0500 Message-ID: Date: Sat, 6 Jan 2024 12:14:22 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH][next] iio: adc: ti-ads7950: remove redundant assignment to variable ret Content-Language: en-US To: Colin Ian King , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240106152251.54617-1-colin.i.king@gmail.com> From: David Lechner Autocrypt: addr=david@lechnology.com; keydata= xsFNBFFxkZ8BEADXzbnj9t8XSZYxKJGHdHqYgEBVzRElb3+f11qhDZKzVCMsn1+AN+PlHqC7 VrCWLsWTSY7WsHB2fW3aXaoidtac5FYoX2IXAun1Sbv15NcBdapImkMv6zxhAyWz6LqPfdCp QV+3x6qwUPFeLHdmew8mkSq56qTFgDQr9oQhsrXKHkXFD7aIAf5bM6janQCHgGTVDraRDfEO rV9rj7Wu/SfjUCVSCvW/SuWBa3IXTLNgbrNwBfo7Pl/tHuto0jxkVCIJ6J3xa85BKMw1WjA+ jKzh12S6KWrLUfhEUt64G9WJHiZOnVAjxgCR7TUahVM2OQHcp49ouG/JZsGNniulXH4ErA2O Wt6seUEx8XQIm48H96RWgKrwKJ+1WoLEmUcYOJDZUcguMZVc3Astx8aSaRjf6IRBO8XlJSJV OorkguvrTQBZJfjoicuFx7VlpdMggMZayv0cqEvzZMSHUt8DCUG74rLhtab9LCg/9wdCwqyE JEi/8jaV7JWxwiCmzVpw0mHn1DiUlp5kapZT+Hart0Gc1WW915psA4G6KneisFM5DJe+S5mn dUJb5IttTOx37jQQi2igwlSBdSC/M+Zy3sb+DXYJUVjVxK56RGAnlSvjHUx/TkID6V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eCzA2iCDuKx6Zk ybHg7IzNEduqZQ4bkaBpnEt+vwE3Gg5l4dAUFWAs9qY13nyBANQ282FNctziEHCUJZ/Map6T dzHWO6hU1HuvmlwcJSFCOey8yhkt386E6KfVYzrIhwTtabg+DLyMZK40Rop1VcU7Nx0M In-Reply-To: <20240106152251.54617-1-colin.i.king@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: On 1/6/24 9:22 AM, Colin Ian King wrote: > Variable ret is being assigned a value that is never read, the variable > is being re-assigned again a few statements later. Remove it. > > Cleans up clang scan build warning: > warning: Value stored to 'ret' is never read [deadcode.DeadStores] > > Signed-off-by: Colin Ian King > --- > drivers/iio/adc/ti-ads7950.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/iio/adc/ti-ads7950.c b/drivers/iio/adc/ti-ads7950.c > index 263fc3a1b87e..f975de059ba0 100644 > --- a/drivers/iio/adc/ti-ads7950.c > +++ b/drivers/iio/adc/ti-ads7950.c > @@ -441,8 +441,6 @@ static int ti_ads7950_get(struct gpio_chip *chip, unsigned int offset) > if (ret) > goto out; > > - ret = ((st->single_rx >> 12) & BIT(offset)) ? 1 : 0; > - > /* Revert back to original settings */ > st->cmd_settings_bitmask &= ~TI_ADS7950_CR_GPIO_DATA; > st->single_tx = TI_ADS7950_MAN_CMD_SETTINGS(st); This does not look like the correct fix. This is the intended return value of the function in the case of no errors. So we probably need to introduce a new variable instead so that it doesn't get written over.