Skip to content

Commit 5205a4a

Browse files
ColinIanKingaxboe
authored andcommitted
block: partitions: only define function mac_fix_string for CONFIG_PPC_PMAC
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> Link: https://lore.kernel.org/r/20240308133921.2058227-1-colin.i.king@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent d8d6608 commit 5205a4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

block/partitions/mac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ extern void note_bootable_part(dev_t dev, int part, int goodness);
2020
* Code to understand MacOS partition tables.
2121
*/
2222

23+
#ifdef CONFIG_PPC_PMAC
2324
static inline void mac_fix_string(char *stg, int len)
2425
{
2526
int i;
2627

2728
for (i = len - 1; i >= 0 && stg[i] == ' '; i--)
2829
stg[i] = 0;
2930
}
31+
#endif
3032

3133
int mac_partition(struct parsed_partitions *state)
3234
{

0 commit comments

Comments
 (0)