mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] block: partitions: mac: Mark mac_fix_string() as __maybe_unused
@ 2017-05-19  1:24 Matthias Kaehlcke
  2017-05-19 15:27 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2017-05-19  1:24 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, linux-kernel, Matthias Kaehlcke

The function is only used when CONFIG_PPC_PMAC=y. Adding the attribute
fixes the following warning when building with clang:

block/partitions/mac.c:22:20: error: unused function 'mac_fix_string'
    [-Werror,-Wunused-function]

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 block/partitions/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/partitions/mac.c b/block/partitions/mac.c
index 621317ac4d59..57483faddaac 100644
--- a/block/partitions/mac.c
+++ b/block/partitions/mac.c
@@ -19,7 +19,7 @@ extern void note_bootable_part(dev_t dev, int part, int goodness);
  * Code to understand MacOS partition tables.
  */
 
-static inline void mac_fix_string(char *stg, int len)
+static inline void __maybe_unused mac_fix_string(char *stg, int len)
 {
 	int i;
 
-- 
2.13.0.303.g4ebf302169-goog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-19 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19  1:24 [PATCH] block: partitions: mac: Mark mac_fix_string() as __maybe_unused Matthias Kaehlcke
2017-05-19 15:27 ` Jens Axboe

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®