* [PATCH] staging: erofs: Fix a unused variable 'arg' warning
@ 2018-09-19 2:16 ` zhong jiang
0 siblings, 0 replies; 6+ messages in thread
From: zhong jiang @ 2018-09-19 2:16 UTC (permalink / raw)
I find the following warning when compiling the kernel.
drivers/staging/erofs/super.c:195:6: warning: unused variable 'arg' [-Wunused-variable]
int arg = 0;
Signed-off-by: zhong jiang <zhongjiang at huawei.com>
---
drivers/staging/erofs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
index 6423592..c04313f 100644
--- a/drivers/staging/erofs/super.c
+++ b/drivers/staging/erofs/super.c
@@ -192,7 +192,9 @@ static int parse_options(struct super_block *sb, char *options)
{
substring_t args[MAX_OPT_ARGS];
char *p;
+#ifdef CONFIG_EROFS_FAULT_INJECTION
int arg = 0;
+#endif
if (!options)
return 0;
--
1.7.12.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] staging: erofs: Fix a unused variable 'arg' warning
@ 2018-09-19 2:16 ` zhong jiang
0 siblings, 0 replies; 6+ messages in thread
From: zhong jiang @ 2018-09-19 2:16 UTC (permalink / raw)
To: gregkh; +Cc: gaoxiang25, yuchao0, linux-erofs, linux-kernel
I find the following warning when compiling the kernel.
drivers/staging/erofs/super.c:195:6: warning: unused variable 'arg' [-Wunused-variable]
int arg = 0;
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
drivers/staging/erofs/super.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
index 6423592..c04313f 100644
--- a/drivers/staging/erofs/super.c
+++ b/drivers/staging/erofs/super.c
@@ -192,7 +192,9 @@ static int parse_options(struct super_block *sb, char *options)
{
substring_t args[MAX_OPT_ARGS];
char *p;
+#ifdef CONFIG_EROFS_FAULT_INJECTION
int arg = 0;
+#endif
if (!options)
return 0;
--
1.7.12.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] staging: erofs: Fix a unused variable 'arg' warning
2018-09-19 2:16 ` zhong jiang
@ 2018-09-19 3:07 ` cgxu519
-1 siblings, 0 replies; 6+ messages in thread
From: cgxu519 @ 2018-09-19 3:07 UTC (permalink / raw)
On 09/19/2018 10:16 AM, zhong jiang wrote:
> I find the following warning when compiling the kernel.
>
> drivers/staging/erofs/super.c:195:6: warning: unused variable 'arg' [-Wunused-variable]
> int arg = 0;
>
> Signed-off-by: zhong jiang <zhongjiang at huawei.com>
> ---
> drivers/staging/erofs/super.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
> index 6423592..c04313f 100644
> --- a/drivers/staging/erofs/super.c
> +++ b/drivers/staging/erofs/super.c
> @@ -192,7 +192,9 @@ static int parse_options(struct super_block *sb, char *options)
> {
> substring_t args[MAX_OPT_ARGS];
> char *p;
> +#ifdef CONFIG_EROFS_FAULT_INJECTION
> int arg = 0;
> +#endif
>
> if (!options)
> return 0;
Hi,
The fix has already included in my patch series "staging: erofs: option
validation for remount and some code cleanups",
so it will be fixed when the series merge into tree and we do not
encourage surrounding the code with macro in option
parsing for this case.
Thanks,
Chengguang
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] staging: erofs: Fix a unused variable 'arg' warning
@ 2018-09-19 3:07 ` cgxu519
0 siblings, 0 replies; 6+ messages in thread
From: cgxu519 @ 2018-09-19 3:07 UTC (permalink / raw)
To: zhong jiang, gregkh; +Cc: gaoxiang25, yuchao0, linux-erofs, linux-kernel
On 09/19/2018 10:16 AM, zhong jiang wrote:
> I find the following warning when compiling the kernel.
>
> drivers/staging/erofs/super.c:195:6: warning: unused variable 'arg' [-Wunused-variable]
> int arg = 0;
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
> drivers/staging/erofs/super.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
> index 6423592..c04313f 100644
> --- a/drivers/staging/erofs/super.c
> +++ b/drivers/staging/erofs/super.c
> @@ -192,7 +192,9 @@ static int parse_options(struct super_block *sb, char *options)
> {
> substring_t args[MAX_OPT_ARGS];
> char *p;
> +#ifdef CONFIG_EROFS_FAULT_INJECTION
> int arg = 0;
> +#endif
>
> if (!options)
> return 0;
Hi,
The fix has already included in my patch series "staging: erofs: option
validation for remount and some code cleanups",
so it will be fixed when the series merge into tree and we do not
encourage surrounding the code with macro in option
parsing for this case.
Thanks,
Chengguang
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] staging: erofs: Fix a unused variable 'arg' warning
2018-09-19 3:07 ` cgxu519
@ 2018-09-19 3:16 ` zhong jiang
-1 siblings, 0 replies; 6+ messages in thread
From: zhong jiang @ 2018-09-19 3:16 UTC (permalink / raw)
On 2018/9/19 11:07, cgxu519 wrote:
> On 09/19/2018 10:16 AM, zhong jiang wrote:
>> I find the following warning when compiling the kernel.
>>
>> drivers/staging/erofs/super.c:195:6: warning: unused variable 'arg' [-Wunused-variable]
>> int arg = 0;
>>
>> Signed-off-by: zhong jiang <zhongjiang at huawei.com>
>> ---
>> drivers/staging/erofs/super.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
>> index 6423592..c04313f 100644
>> --- a/drivers/staging/erofs/super.c
>> +++ b/drivers/staging/erofs/super.c
>> @@ -192,7 +192,9 @@ static int parse_options(struct super_block *sb, char *options)
>> {
>> substring_t args[MAX_OPT_ARGS];
>> char *p;
>> +#ifdef CONFIG_EROFS_FAULT_INJECTION
>> int arg = 0;
>> +#endif
>> if (!options)
>> return 0;
>
> Hi,
>
> The fix has already included in my patch series "staging: erofs: option validation for remount and some code cleanups",
> so it will be fixed when the series merge into tree and we do not encourage surrounding the code with macro in option
> parsing for this case.
>
Fine. Thank you for explaination.
Sincerely,
zhong jiang
> Thanks,
> Chengguang
>
> .
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] staging: erofs: Fix a unused variable 'arg' warning
@ 2018-09-19 3:16 ` zhong jiang
0 siblings, 0 replies; 6+ messages in thread
From: zhong jiang @ 2018-09-19 3:16 UTC (permalink / raw)
To: cgxu519; +Cc: gregkh, gaoxiang25, yuchao0, linux-erofs, linux-kernel
On 2018/9/19 11:07, cgxu519 wrote:
> On 09/19/2018 10:16 AM, zhong jiang wrote:
>> I find the following warning when compiling the kernel.
>>
>> drivers/staging/erofs/super.c:195:6: warning: unused variable 'arg' [-Wunused-variable]
>> int arg = 0;
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>> drivers/staging/erofs/super.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
>> index 6423592..c04313f 100644
>> --- a/drivers/staging/erofs/super.c
>> +++ b/drivers/staging/erofs/super.c
>> @@ -192,7 +192,9 @@ static int parse_options(struct super_block *sb, char *options)
>> {
>> substring_t args[MAX_OPT_ARGS];
>> char *p;
>> +#ifdef CONFIG_EROFS_FAULT_INJECTION
>> int arg = 0;
>> +#endif
>> if (!options)
>> return 0;
>
> Hi,
>
> The fix has already included in my patch series "staging: erofs: option validation for remount and some code cleanups",
> so it will be fixed when the series merge into tree and we do not encourage surrounding the code with macro in option
> parsing for this case.
>
Fine. Thank you for explaination.
Sincerely,
zhong jiang
> Thanks,
> Chengguang
>
> .
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-09-19 3:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-19 2:16 [PATCH] staging: erofs: Fix a unused variable 'arg' warning zhong jiang
2018-09-19 2:16 ` zhong jiang
2018-09-19 3:07 ` cgxu519
2018-09-19 3:07 ` cgxu519
2018-09-19 3:16 ` zhong jiang
2018-09-19 3:16 ` zhong jiang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.