Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2504185pxj; Mon, 17 May 2021 03:13:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXtsZzO7WTW0wEg0POgyy6b/r0O03YD2ZHZiMG31NcuxomstEiQcErZ/1m85Aj8XoVodBA X-Received: by 2002:a05:6402:845:: with SMTP id b5mr8031399edz.9.1621246417995; Mon, 17 May 2021 03:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621246417; cv=none; d=google.com; s=arc-20160816; b=jHbs9jUy7s/aYMoPAVjx8CoLHkpGwTfT65Ocds37AaoAOfBQyQsY9nwlcbJ/WyMklB RQfH6+jTgwWmHZT7CCjbYBGvsgml/4TC9ij45Y9QILiz6irpNaHn6M7xJG+aMO2j1qqG KmM7rccurTWapYhbV9Rr0YNwc4WCWSBJR+P/Uymm/qsdklEJeca8YMzSqukWXWenTQ4Y QFc+XxV+5Mq5wlLz7n2GWNqh4aO0PQ9TT6KhdllK/l+DDMwfRTceAxtMxlEgzyTb8jsi 1yOEXr9K76aig7uO8/aG0ZKa0Tz7kpU650zknY+nrELSVFC8BSOMCZaBKXcom2xi1QiR VfTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=TN4ce1QdPiwlPYC7R3/b3Y0UGRE7NXTUIlt9wImR2bg=; b=F71y5XQRjGrrsfRSLktOwpV3fQYn6YTipWw0F6z/m11tV/6BNMf0z+gWwvvNVuJhhT xq9Ykj0z76L+RHVi1xjDKdu5bjmPu3Zbv8FNCusy1PBsjmmhq6INNQK86MKfscJV7ghj bAQJh1VqAW/KQFKICnqjANhBRhaCWjBRtyoRKE5epUPCyg2yV2B2kYu7VT3ae7ojf1Ik VUE2XspUk0r1vl72X79Nn9ppLe42+cKTC86b0lAaR1ePfI/BID+V0JrSmZ6BdVVmHtO3 QM9lapZD0TMTT+s2TSjivRnor61OmaTjfyasOqZsWxfqEF0qRJlONoiZ+Q7/McdRkvsj QPtw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si13493100edj.314.2021.05.17.03.13.14; Mon, 17 May 2021 03:13:37 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236149AbhEQKNY (ORCPT + 99 others); Mon, 17 May 2021 06:13:24 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:36689 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231658AbhEQKNX (ORCPT ); Mon, 17 May 2021 06:13:23 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UZ7T3sw_1621246318; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UZ7T3sw_1621246318) by smtp.aliyun-inc.com(127.0.0.1); Mon, 17 May 2021 18:12:06 +0800 From: Jiapeng Chong To: jic23@kernel.org Cc: lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] iio: buffer: Remove redundant assignment to in_loc Date: Mon, 17 May 2021 18:11:57 +0800 Message-Id: <1621246317-62725-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable in_loc is being assigned a value from a calculation however the assignment is never read, so this redundant assignment can be removed. Clean up the following clang-analyzer warning: drivers/iio/industrialio-buffer.c:929:3: warning: Value stored to 'in_loc' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/iio/industrialio-buffer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index 10923b4..fdd6234 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -926,7 +926,6 @@ static int iio_buffer_update_demux(struct iio_dev *indio_dev, if (ret) goto error_clear_mux_table; out_loc += length; - in_loc += length; } buffer->demux_bounce = kzalloc(out_loc, GFP_KERNEL); if (buffer->demux_bounce == NULL) { -- 1.8.3.1