Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4294453pxj; Wed, 12 May 2021 02:20:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgLbC+8DXYyAqdzjAZ0Lf97dvQHHkt5vucZrWU0fsUJKU7zTvrQaKFNbOrIhR/DK8Ya9s6 X-Received: by 2002:a17:906:9381:: with SMTP id l1mr36049938ejx.45.1620811216854; Wed, 12 May 2021 02:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620811216; cv=none; d=google.com; s=arc-20160816; b=JRBsqpCn6ZI/ys/ZQKouAC57wfJBjwlMDQ41Y7my19Us60B3IP5+UMlQ0NjzJM7zun XKQdQVZRBA2AdhztLD+TvX9MJhh3ar1YZQdQA2BKnHb0MIRztfosRcQ8Hmi+p8j7kE2F y8Q1L6Nlh8jG0KZV69MCp2ChAP0hV/6pIVBnU4op0YS7fHK6BT/CbPjPgx3wtZVw21rn zlcJrXXkXeWamqvz/499NDxdsKUbG0bIwvhjNMBozThzOTuhp7fZwBOwbSNxOoSV0Md+ kk96fG+woeth8ez6Oe95wJi8iJxhH/rFNHeVVVdV2m50evpY4KKezs49KRvJcn4iQT03 kS6g== 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=jjMwR+O9gncKs2wODhZVDKjZtSRcFfRbt7fxkVLWhTo=; b=zQ28AzK1g3RoLy2UD1OGb9QXPCh7fGGqJi8awODB8XBZNul2GynatettF4/9YEiXL8 PHb+na/TbioSZMBQQjRr/S+njK5iVX2p3afoRhLhzAO/SiKI8m6z9qWYUSHJ4uBIi08I paWtR/lw1tz5cUFV6kwKk8sw1KqIFuh1w5AbUXGoaa7sVXzrBJhow73oTTfSiWN+to8n FMCxRJhBPmmvAXtUPvcNPq3uuFg2VD90ijF99IWoYY9zKpY2QT1/mNF7E2Ta+F5N8Sjt UIpif5V0A5DNOLqGWxoOO8+XdkZLUMgiXHwCU3lRcfjR3sXtnBZYPdNq63aUT6qyPERs 0nHw== 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 w7si17166110edd.50.2021.05.12.02.19.53; Wed, 12 May 2021 02:20:16 -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 S230202AbhELJTX (ORCPT + 99 others); Wed, 12 May 2021 05:19:23 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:46676 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbhELJTX (ORCPT ); Wed, 12 May 2021 05:19:23 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R291e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UYdurAx_1620811081; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UYdurAx_1620811081) by smtp.aliyun-inc.com(127.0.0.1); Wed, 12 May 2021 17:18:02 +0800 From: Yang Li To: jlbec@evilplan.org Cc: hch@lst.de, nathan@kernel.org, ndesaulniers@google.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] configfs: Remove redundant initialization of 'len' Date: Wed, 12 May 2021 17:17:59 +0800 Message-Id: <1620811079-105280-1-git-send-email-yang.lee@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 'len' is being initialized however this value is never read as 'len' is assigned a new value in if statement. Remove the redundant assignment. At the same time, adjust the declarations order of variables to keep the "upside-down x-mas tree" look of them. Cleans up clang warning: fs/configfs/file.c:147:10: warning: Value stored to 'len' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Fixes: 'commit fa60ce2cb450 ("treewide: remove editor modelines and cruft")' Signed-off-by: Yang Li --- fs/configfs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/configfs/file.c b/fs/configfs/file.c index e26060d..1551b3d 100644 --- a/fs/configfs/file.c +++ b/fs/configfs/file.c @@ -141,10 +141,10 @@ static int fill_read_buffer(struct file *file, struct configfs_buffer *buffer) configfs_read_bin_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct configfs_fragment *frag = to_frag(file); struct configfs_buffer *buffer = file->private_data; + struct configfs_fragment *frag = to_frag(file); ssize_t retval = 0; - ssize_t len = min_t(size_t, count, PAGE_SIZE); + ssize_t len; mutex_lock(&buffer->mutex); -- 1.8.3.1