* [PATCH][next] block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC
@ 2024-03-08 13:39 Colin Ian King
2024-03-13 20:27 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-03-08 13:39 UTC (permalink / raw)
To: Jens Axboe, linux-block; +Cc: kernel-janitors, linux-kernel
The helper function mac_fix_string is only required with CONFIG_PPC_PMAC,
add #if CONFIG_PPC_PMAC and #endif around the function.
Cleans up clang scan build warning:
block/partitions/mac.c:23:20: warning: unused function 'mac_fix_string' [-Wunused-function]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
block/partitions/mac.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/partitions/mac.c b/block/partitions/mac.c
index 7b521df00a39..c80183156d68 100644
--- a/block/partitions/mac.c
+++ b/block/partitions/mac.c
@@ -20,6 +20,7 @@ extern void note_bootable_part(dev_t dev, int part, int goodness);
* Code to understand MacOS partition tables.
*/
+#ifdef CONFIG_PPC_PMAC
static inline void mac_fix_string(char *stg, int len)
{
int i;
@@ -27,6 +28,7 @@ static inline void mac_fix_string(char *stg, int len)
for (i = len - 1; i >= 0 && stg[i] == ' '; i--)
stg[i] = 0;
}
+#endif
int mac_partition(struct parsed_partitions *state)
{
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC
2024-03-08 13:39 [PATCH][next] block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC Colin Ian King
@ 2024-03-13 20:27 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2024-03-13 20:27 UTC (permalink / raw)
To: linux-block, Colin Ian King; +Cc: kernel-janitors, linux-kernel
On Fri, 08 Mar 2024 13:39:21 +0000, Colin Ian King wrote:
> The helper function mac_fix_string is only required with CONFIG_PPC_PMAC,
> add #if CONFIG_PPC_PMAC and #endif around the function.
>
> Cleans up clang scan build warning:
> block/partitions/mac.c:23:20: warning: unused function 'mac_fix_string' [-Wunused-function]
>
>
> [...]
Applied, thanks!
[1/1] block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC
commit: 5205a4aa8fc9454853b705b69611c80e9c644283
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-13 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 13:39 [PATCH][next] block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC Colin Ian King
2024-03-13 20: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;
as well as URLs for NNTP newsgroup(s).