From: Davidlohr Bueso <dave@stgolabs.net>
To: kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Song Liu <song@kernel.org>
Subject: [PATCH] md/raid5: silence sparse warnings wrt struct raid5_percpu
Date: Mon, 7 Feb 2022 14:23:48 -0800 [thread overview]
Message-ID: <20220207222348.wbokxgsdvmxhbidd@offworld> (raw)
In-Reply-To: <202202072158.7y7wxNRC-lkp@intel.com>
Move out the nested declaration of the percpu bits of struct r5conf and
silence sparse complaining about address spaces:
drivers/md/raid5.c:7070:9: sparse: sparse: cast removes address space '__percpu' of expression
drivers/md/raid5.c:7070:9: warning: incorrect type in argument 1 (different address spaces)
drivers/md/raid5.c:7070:9: expected struct lockdep_map *lock
drivers/md/raid5.c:7070:9: got struct lockdep_map [noderef] __percpu *
drivers/md/raid5.c:7070:9: warning: incorrect type in argument 1 (different address spaces)
drivers/md/raid5.c:7070:9: expected struct local_lock_t [usertype] *l
drivers/md/raid5.c:7070:9: got struct local_lock_t [noderef] __percpu *
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
drivers/md/raid5.h | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 9e8486a9e445..125b925e2b0c 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -560,6 +560,17 @@ struct r5pending_data {
struct bio_list bios;
};
+/* 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;
+};
+
struct r5conf {
struct hlist_head *stripe_hashtbl;
/* only protect corresponding hash list and inactive_list */
@@ -634,16 +645,7 @@ struct r5conf {
* Cleared when a sync completes.
*/
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.35.1
prev parent reply other threads:[~2022-02-07 22:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 13:25 drivers/md/raid5.c:7055:9: sparse: sparse: cast removes address space '__percpu' of expression kernel test robot
2022-02-07 22:23 ` Davidlohr Bueso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220207222348.wbokxgsdvmxhbidd@offworld \
--to=dave@stgolabs.net \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®