Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp45877pxh; Thu, 7 Apr 2022 13:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaHWFBEoXn/s1OIJYGFhxc/AG0FVMfib+oo6Djh47rmBHWSDDwLX1ZG4nfZ9lZd3es8hOB X-Received: by 2002:a63:7258:0:b0:398:7298:c4b6 with SMTP id c24-20020a637258000000b003987298c4b6mr12695023pgn.436.1649363484152; Thu, 07 Apr 2022 13:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649363484; cv=none; d=google.com; s=arc-20160816; b=djJaxzcpfirhN2E4hVPtkHgKf5ba+bIqDzoe7xNVxv62i2jE++E8EIOv3S+y/HwWGa g286UT5tsoQIuPxXLvb2CyVRK++jDQx14UQq4tP9L0M3WUQQXT9OG/2NnRIGicmj02E4 cgbAWD/+7jeb4aOp1OVBxQ+PDalPjKqDdBNqtx/4qwXPZHqg3+1rgkbFSiNqzJBMgWP7 SgB86TbekW0adFigHmkIQ0v0E6BvId6T9F03c6pq+biUj54LOq3ffWItnU/fE/TGqzyu Rdblghtutft0RNsKnDzh+opy9nj1z+AXQuuRRudn+RLuUu6YNd+RkpvQkNZO4lWxMjx0 jE1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=ufB2LkWT2Jw65+K7Phw9dSX65Jk1XnoBPX/BNd0+QAU=; b=teOsGYDmvH574b9YNxzoVm/87WS2kvViN6lU7ejv8Keo3aFg0DvNBIJ9P+TmZMhvFn kCuuMXlCsOABHur1yGwFuJTcCOIUnd6Gt0qoJ51ySIZZy0b9eE3I5iBa3VttO9JgByZQ E+NsnvhDNp9AJGhLzKYm2iYQwG/cAEolhK/vcqcTVHRM+M3Kvr57ujrYz/71iXPpObyt nymshmk2X2dXqkLbHrgIPuZY/Hwj5H3jyWKpMKK+w8zSyqP2sUt9FFyF12TzdURQ12NF EPg4DFXuzyyZK5x5g33Dd88e2CA2/Td/haw8ihqQ+EUYD564vibs8/D6ZBXuTlS5hvRb K56w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=jiA9PBwX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u6-20020a17090341c600b00156983f1b99si757511ple.267.2022.04.07.13.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:31:24 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=jiA9PBwX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DD30B385311; Thu, 7 Apr 2022 12:45:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346119AbiDGRYV (ORCPT + 99 others); Thu, 7 Apr 2022 13:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346080AbiDGRX5 (ORCPT ); Thu, 7 Apr 2022 13:23:57 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D92664F4; Thu, 7 Apr 2022 10:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:Cc:To:From:content-disposition; bh=ufB2LkWT2Jw65+K7Phw9dSX65Jk1XnoBPX/BNd0+QAU=; b=jiA9PBwX2dbEkxAmEkfpVbWNjb SLD4FQw2KkNztUq+G4EmSofYkyuwTapK+PYBqiap4XInK75Ne5uOxRA9hlT01/DswjYsdKrEp0/j3 ZesRYekEYuNwEJU8Dh4mHjsFnoiFAemg3rIIIUu62xBam9Br960AXvFMVi9NkPQ5t54flyv4gcMSn uZ2JK0pW1nAgvleHvX0/9V2fz8iJPef8qxHfsitItFIOt+Vekm/qO0tLOlgg4AroqiWGhw1o37QKB jdEUYBZv06ohgg0DyrBQlEfu66Hu7+zypdhKyw/72X77tNPOnau+DTQUXzRfNRzwLjCxaHjx6xia5 iNC0xu6Q==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ncVRf-002CRg-HF; Thu, 07 Apr 2022 10:57:20 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1ncVRf-0002Q4-0w; Thu, 07 Apr 2022 10:57:19 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu Cc: Guoqing Jiang , Logan Gunthorpe Date: Thu, 7 Apr 2022 10:57:08 -0600 Message-Id: <20220407165713.9243-3-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220407165713.9243-1-logang@deltatee.com> References: <20220407165713.9243-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, song@kernel.org, guoqing.jiang@linux.dev, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Subject: [PATCH v1 2/7] md/raid5: Un-nest struct raid5_percpu definition X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports many warnings of the form: drivers/md/raid5.c:1476:16: warning: dereference of noderef expression This is because all struct raid5_percpu definitions get marked as __percpu when really only the pointer in r5conf should have that annotation. Fix this by moving the defnition of raid5_precpu out of the definition of struct r5conf. Signed-off-by: Logan Gunthorpe --- drivers/md/raid5.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index 9e8486a9e445..61bc2e1f1b4e 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h @@ -560,6 +560,16 @@ struct r5pending_data { struct bio_list bios; }; +struct raid5_percpu { + struct page *spare_page; /* Used when checking P/Q in raid6 */ + void *scribble; /* space for constructing buffer + * lists and performing address + * conversions + */ + int scribble_obj_size; + local_lock_t lock; +}; + struct r5conf { struct hlist_head *stripe_hashtbl; /* only protect corresponding hash list and inactive_list */ @@ -635,15 +645,7 @@ struct r5conf { */ int recovery_disabled; /* per cpu variables */ - struct raid5_percpu { - struct page *spare_page; /* Used when checking P/Q in raid6 */ - void *scribble; /* space for constructing buffer - * lists and performing address - * conversions - */ - int scribble_obj_size; - local_lock_t lock; - } __percpu *percpu; + struct raid5_percpu __percpu *percpu; int scribble_disks; int scribble_sectors; struct hlist_node node; -- 2.30.2