Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2866222pxj; Mon, 17 May 2021 11:40:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy95u6lx12BmmKH8AZTQrLGRk7Vk9ReCrZQ3dHgyypIXj7Ry3kdZKcnJ6d9REpRyvu9LnXR X-Received: by 2002:a05:6402:2696:: with SMTP id w22mr1706530edd.223.1621276799972; Mon, 17 May 2021 11:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621276799; cv=none; d=google.com; s=arc-20160816; b=PMCOQbEqu9fOm13BV6RWnCNSwk4OMSIZEZLk4ZhgQ2YN+mSuGZ81MbteYc4AzHNkhy f6LLN2lEqB8fNzbUklWn+ksBH+CSnF1AVSnPimXL91UjPwn/PhGzAn7NUUmbYT5QT9dz cxFJuA4q4rrp6IJwDkPSz9KF6MffIQFGgFofC4MLwL2sb9IgM4W/mOXwQm42KP/R5wbn AYxvcREboaCS5Wh/wE5MSdQcLXZhtjnMBe0SE/PSKAiduSEE4yigVp58nQrzLHT9oG68 vgckBsS4iWrmaaQ/FghWLAENeDp8I9/2CDlVwLiLY/OdWgoA1jCwV2vTadrN5MgGUw01 eOFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=cC7gshKQ/ZOQ+tqHEJuI5kgUxHXyr3ABLDFcYhTPAok=; b=wM+ZYQWuDLR5oUdKmlR7iyZE+A9Xwy4wqbqIHUIAUlgcA9T8kX2FFwwiudl2R7p7L1 /ybL3GJaEvlblG12n58Q/7hNhXQ0Phxi04C97MFVGC6nPXEweA0PY9YqYWqCnzKA9+cx 0pTjiVZZX99RpPCW9fCZrJyciQs7525WYZDXaZTq/IG7LRpHn0zNKIEf1gPXWy7gdIrJ YRJGst5VXo0dd9G7nBPCikK2N3OLZRY+HtbWZt0RVTBc0YVq+kGsapP2m839e0zWEEhW jJIvxPFWOh2QmnnibzX0V6D2FNUqz4lTBOJanvRl663KgwGC/7EYoLqGuk9IGBXMq541 Cqyg== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si8295673eds.410.2021.05.17.11.39.34; Mon, 17 May 2021 11:39:59 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235850AbhEQNWY (ORCPT + 99 others); Mon, 17 May 2021 09:22:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:53372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234106AbhEQNWY (ORCPT ); Mon, 17 May 2021 09:22:24 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7AFC661059; Mon, 17 May 2021 13:21:06 +0000 (UTC) Date: Mon, 17 May 2021 14:22:21 +0100 From: Jonathan Cameron To: Jiapeng Chong Cc: lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: buffer: Remove redundant assignment to in_loc Message-ID: <20210517142221.60680f3f@jic23-huawei> In-Reply-To: <1621246317-62725-1-git-send-email-jiapeng.chong@linux.alibaba.com> References: <1621246317-62725-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 May 2021 18:11:57 +0800 Jiapeng Chong wrote: > 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 Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at it. Thanks, Jonathan > --- > 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) {