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>
This commit is contained in:
parent
d8d6608b76
commit
5205a4aa8f
@ -20,6 +20,7 @@ extern void note_bootable_part(dev_t dev, int part, int goodness);
|
|||||||
* Code to understand MacOS partition tables.
|
* Code to understand MacOS partition tables.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef CONFIG_PPC_PMAC
|
||||||
static inline void mac_fix_string(char *stg, int len)
|
static inline void mac_fix_string(char *stg, int len)
|
||||||
{
|
{
|
||||||
int i;
|
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--)
|
for (i = len - 1; i >= 0 && stg[i] == ' '; i--)
|
||||||
stg[i] = 0;
|
stg[i] = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int mac_partition(struct parsed_partitions *state)
|
int mac_partition(struct parsed_partitions *state)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user