Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1645018 > unrolled thread
| Started by | Matthias Kaehlcke <mka@chromium.org> |
|---|---|
| First post | 2017-05-19 03:30 +0200 |
| Last post | 2017-05-19 17:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] block: partitions: mac: Mark mac_fix_string() as __maybe_unused Matthias Kaehlcke <mka@chromium.org> - 2017-05-19 03:30 +0200
Re: [PATCH] block: partitions: mac: Mark mac_fix_string() as __maybe_unused Jens Axboe <axboe@kernel.dk> - 2017-05-19 17:30 +0200
| From | Matthias Kaehlcke <mka@chromium.org> |
|---|---|
| Date | 2017-05-19 03:30 +0200 |
| Subject | [PATCH] block: partitions: mac: Mark mac_fix_string() as __maybe_unused |
| Message-ID | <tIETU-39a-33@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Date | 2017-05-19 17:30 +0200 |
| Subject | Re: [PATCH] block: partitions: mac: Mark mac_fix_string() as __maybe_unused |
| Message-ID | <tIS0O-44i-5@gated-at.bofh.it> |
| In reply to | #1645018 |
On 05/18/2017 07:24 PM, Matthias Kaehlcke wrote:
> 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;
>
Or just put the function inside an CONFIG_PPC_PMAC section?
--
Jens Axboe
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web