Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3163085rdb; Wed, 13 Sep 2023 04:15:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJK6A0LZTO+OzJFB5tm73qwrDq2O7qZ8cjtpEOUuHsXVnWihBnj/RMGz1+IfrbnsJJBnqL X-Received: by 2002:aa7:88c8:0:b0:68c:10c:1c52 with SMTP id k8-20020aa788c8000000b0068c010c1c52mr2896292pff.9.1694603716838; Wed, 13 Sep 2023 04:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694603716; cv=none; d=google.com; s=arc-20160816; b=K0aaZTaaYUA/btEgbNHIuOLZmVstz3lArwl8HRv637jT4xj5OzVoDPtXzJnvFJacnY nCxR6iGwJjpd3+r8OlAZeu/be8rCItjT/BHWOIAzu1ZSmiJXIYPPZiRvqI4eAIGpo2Em qrghgVDxWaVFqqWrLIGKWALsdfjDRuqzBxQkm4O7LhT2W49HsBDexUktvGhTFhxgnjX1 AGzVvXnDUvWvbg7Gm3JFh+PWCe+EsmK3EwqlifJSeg8rKIPX5iWIMN0t//CFaK0YiuI5 C/RWcnWFU5g4M18Q2+sVVa5J5pGPO7Z3kuoShG6dHnmFPPRfi9J1e7LWeS9Y8sOWnj0l gaAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mCauJ2JPTDHGJ7v9BUNHMOumUIcgKDrRn67wyDy6PRA=; fh=cMNnuqV5WLYmfgPWmGTwi8rFSDju2LG6010pY4IegvQ=; b=MiWReqLUZTcOjBYy5GCtg+RbyE54hebP6/Dhja7HcWuSdeqf2ETjDzUEH9WAFa7M5k kltkieHHdV3LUqUpOOK3ErmciLg6JI13OWZTagMJ8sXnwQXJ0eceJ0lo+NHXPFNaQW6I woYYveki8yuOFSTS/eQQ4Jgv7WI8JlJrC8GgXEBEx9RaGtxapBTRIdtBZ0gPk5q7DfYA DL0FT/5kJMu/PfrqVvPWlkLuzdBvJcPYAyi562zpuA6yBFclv+KTjaoL72/UI0MLnBEu qfk/MEAM8x5NChkbDl0SectMxELt3zBUBgu2Q2gAa4ViTzbQyax4FaffGHdyWFSoMVMo Jczg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gEkdnT6D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id m4-20020a633f04000000b00573f9a427cesi9834643pga.47.2023.09.13.04.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 04:15:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gEkdnT6D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AB1EE81CEB32; Tue, 12 Sep 2023 06:53:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235575AbjILNxF (ORCPT + 99 others); Tue, 12 Sep 2023 09:53:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235742AbjILNw7 (ORCPT ); Tue, 12 Sep 2023 09:52:59 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5A3CF10D1 for ; Tue, 12 Sep 2023 06:52:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694526725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mCauJ2JPTDHGJ7v9BUNHMOumUIcgKDrRn67wyDy6PRA=; b=gEkdnT6D+QUbhQJOV37VeuOo27Mfwk1sAWssvHWVEYS07i/2v0LUz7k87xf0P9iNMsMEf4 OrVEyHKYyc8/ZqKL+Q2rIXJwsF4FwMxTzUTmfTNs6V2fspJLX0b1eF7l9DN5oxMnLz3koD 6IkkHNzuvYLY/U4/KHCS3pDH8Z7Kki4= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-655-OjZRpXLhO_Wmbbdndr6loQ-1; Tue, 12 Sep 2023 09:52:04 -0400 X-MC-Unique: OjZRpXLhO_Wmbbdndr6loQ-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-655d8978597so36670856d6.2 for ; Tue, 12 Sep 2023 06:52:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694526723; x=1695131523; 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=mCauJ2JPTDHGJ7v9BUNHMOumUIcgKDrRn67wyDy6PRA=; b=GiEttsTQkM7OI5kaRP2D6DYSw8LbXMgkdOLysrr3i9z8Nf2uCbIvkVl/kORaSER1L8 vgqw3oSqssEwsrALdGtuJUgYbV3+/5lEWRJ95tYgj1OSkUls4G6FB3X1TCRVy2ZUPft6 Gkajc5JqAkdPeWXi+8B834KEx92Ti6ON/ClgiOFkAjfB1H9zTRykYBxNCFmGZj68ozvL 8jaSg75QGVAV9Ip4CbM9Xxi53VBzlIWTMKeApuf+YsdRn5/b+a6t3/Q+nKaYyBmEo8hb w/JVzO2Vpx7OJU3iNfoLuA1UlMZgj3KJfXtBXdIVjP0oToxbu4J9H5HFgh+oPcyHfP2j otfw== X-Gm-Message-State: AOJu0YwiEDLV/09qNPZJaQ5Xod2puGiHvR+AzOyxFKepxNadH/3Ox3Bu kHwItii9gjbtjvbqrayEPH6fTQgGM6m7AmvxJoGro01mIGBwe0YencgCAzkOWQh6YagKePCv36Z 2nvJD35rH6h8xEc6DokSp0eAO X-Received: by 2002:a0c:f281:0:b0:63d:476:8e4 with SMTP id k1-20020a0cf281000000b0063d047608e4mr13459704qvl.50.1694526723597; Tue, 12 Sep 2023 06:52:03 -0700 (PDT) X-Received: by 2002:a0c:f281:0:b0:63d:476:8e4 with SMTP id k1-20020a0cf281000000b0063d047608e4mr13459693qvl.50.1694526723383; Tue, 12 Sep 2023 06:52:03 -0700 (PDT) Received: from bfoster (c-24-60-61-41.hsd1.ma.comcast.net. [24.60.61.41]) by smtp.gmail.com with ESMTPSA id z17-20020a0c8f11000000b0064f378f89a7sm3717053qvd.73.2023.09.12.06.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 06:52:03 -0700 (PDT) Date: Tue, 12 Sep 2023 09:52:15 -0400 From: Brian Foster To: Colin Ian King Cc: Kent Overstreet , linux-bcachefs@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5][next] bcachefs: remove redundant initialization of pointer dst Message-ID: References: <20230912123744.3929609-1-colin.i.king@gmail.com> <20230912123744.3929609-3-colin.i.king@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230912123744.3929609-3-colin.i.king@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 12 Sep 2023 06:53:07 -0700 (PDT) On Tue, Sep 12, 2023 at 01:37:41PM +0100, Colin Ian King wrote: > The pointer dst is being initialized with a value that is never read, > it is being re-assigned later on when it is used in a while-loop > The initialization is redundant and can be removed. > > Cleans up clang-scan build warning: > fs/bcachefs/disk_groups.c:186:30: warning: Value stored to 'dst' during > its initialization is never read [deadcode.DeadStores] > > Signed-off-by: Colin Ian King > --- > fs/bcachefs/disk_groups.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/bcachefs/disk_groups.c b/fs/bcachefs/disk_groups.c > index f36472c4a781..9fa8d7d49f3e 100644 > --- a/fs/bcachefs/disk_groups.c > +++ b/fs/bcachefs/disk_groups.c > @@ -183,8 +183,7 @@ int bch2_sb_disk_groups_to_cpu(struct bch_fs *c) > > for (i = 0; i < c->disk_sb.sb->nr_devices; i++) { > struct bch_member *m = mi->members + i; > - struct bch_disk_group_cpu *dst = > - &cpu_g->entries[BCH_MEMBER_GROUP(m)]; > + struct bch_disk_group_cpu *dst; Nit: kind of seems like this variable could just be lifted to the top of the function given that it's used in two loops, but the patch seems fine to me either way. Brian > > if (!bch2_member_exists(m)) > continue; > -- > 2.39.2 >