linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel Shahrouzi <gshahrouzi@gmail.com>
To: Coly Li <colyli@kernel.org>, Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org,
	skhan@linuxfoundation.org,
	kernelmentees@lists.linuxfoundation.org, gshahrouzi@gmail.com
Subject: [PATCH 1/2] bcache: Fix undeclared symbol warning for bcache_is_reboot
Date: Mon,  7 Apr 2025 23:33:21 -0400	[thread overview]
Message-ID: <20250408033322.401680-2-gshahrouzi@gmail.com> (raw)
In-Reply-To: <20250408033322.401680-1-gshahrouzi@gmail.com>

Add extern declaration for bcache_is_reboot to bcache.h. Ensure proper
visibility for use across multiple files (super.c, sysfs.c) and follow
the declaration pattern for other forward declarations.

Signed-off-by: Gabriel Shahrouzi <gshahrouzi@gmail.com>
---
 drivers/md/bcache/bcache.h | 1 +
 drivers/md/bcache/sysfs.c  | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h
index 785b0d9008fac..531933351b8b8 100644
--- a/drivers/md/bcache/bcache.h
+++ b/drivers/md/bcache/bcache.h
@@ -1007,6 +1007,7 @@ extern struct workqueue_struct *bch_journal_wq;
 extern struct workqueue_struct *bch_flush_wq;
 extern struct mutex bch_register_lock;
 extern struct list_head bch_cache_sets;
+extern bool bcache_is_reboot;
 
 extern const struct kobj_type bch_cached_dev_ktype;
 extern const struct kobj_type bch_flash_dev_ktype;
diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index e8f696cb58c05..47ef0167b9d23 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -17,8 +17,6 @@
 #include <linux/sort.h>
 #include <linux/sched/clock.h>
 
-extern bool bcache_is_reboot;
-
 /* Default is 0 ("writethrough") */
 static const char * const bch_cache_modes[] = {
 	"writethrough",
-- 
2.43.0


  reply	other threads:[~2025-04-08  3:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08  3:33 [PATCH 0/2] bcache: Fix symbol visibility and type assignment Gabriel Shahrouzi
2025-04-08  3:33 ` Gabriel Shahrouzi [this message]
2025-04-08  4:55   ` [PATCH 1/2] bcache: Fix undeclared symbol warning for bcache_is_reboot Coly Li
2025-04-08  5:42     ` Gabriel Shahrouzi
2025-04-08  3:33 ` [PATCH 2/2] bcache: Fix warnings for incorrect type in assignments Gabriel Shahrouzi
2025-04-08  4:58   ` Coly Li
2025-04-08  7:15     ` Gabriel Shahrouzi
2025-04-08 10:39       ` Coly Li
2025-04-08 13:27         ` Gabriel Shahrouzi

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=20250408033322.401680-2-gshahrouzi@gmail.com \
    --to=gshahrouzi@gmail.com \
    --cc=colyli@kernel.org \
    --cc=kent.overstreet@linux.dev \
    --cc=kernelmentees@lists.linuxfoundation.org \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.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;
as well as URLs for NNTP newsgroup(s).