Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638485 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2017-05-10 03:30 +0200 |
| Last post | 2017-05-10 05:30 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
linux-next: build warning after merge of the block tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-05-10 03:30 +0200
Re: linux-next: build warning after merge of the block tree Markus Trippelsdorf <markus@trippelsdorf.de> - 2017-05-10 04:30 +0200
Re: linux-next: build warning after merge of the block tree Jens Axboe <axboe@kernel.dk> - 2017-05-10 05:10 +0200
Re: linux-next: build warning after merge of the block tree Markus Trippelsdorf <markus@trippelsdorf.de> - 2017-05-10 08:20 +0200
Re: linux-next: build warning after merge of the block tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-05-10 05:30 +0200
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-05-10 03:30 +0200 |
| Subject | linux-next: build warning after merge of the block tree |
| Message-ID | <tFoBX-1nx-3@gated-at.bofh.it> |
Hi Jens,
After merging the block tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:
block/elevator.c: In function 'elv_iosched_store':
block/elevator.c:1102:2: warning: ignoring return value of 'strstrip', declared with attribute warn_unused_result [-Wunused-result]
strstrip(elevator_name);
^
Introduced by commit
d0f6e2da5871 ("block: Remove leading whitespace and trailing newline in elevator switch error message")
--
Cheers,
Stephen Rothwell
[toc] | [next] | [standalone]
| From | Markus Trippelsdorf <markus@trippelsdorf.de> |
|---|---|
| Date | 2017-05-10 04:30 +0200 |
| Message-ID | <tFpy1-28H-3@gated-at.bofh.it> |
| In reply to | #1638485 |
On 2017.05.10 at 11:24 +1000, Stephen Rothwell wrote:
> Hi Jens,
>
> After merging the block tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>
> block/elevator.c: In function 'elv_iosched_store':
> block/elevator.c:1102:2: warning: ignoring return value of 'strstrip', declared with attribute warn_unused_result [-Wunused-result]
> strstrip(elevator_name);
> ^
>
> Introduced by commit
>
> d0f6e2da5871 ("block: Remove leading whitespace and trailing newline in elevator switch error message")
Yes, it was missing a (void) like "(void)strlcpy(...)". But Jens
unfortunately removed both warnings, so the following patch should now
be enough:
diff --git a/block/elevator.c b/block/elevator.c
index fda6be933130..dd0ed19e4fb7 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -1099,8 +1099,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name,
return count;
strlcpy(elevator_name, skip_spaces(name), sizeof(elevator_name));
- strstrip(elevator_name);
- ret = __elevator_change(q, elevator_name);
+ ret = __elevator_change(q, strstrip(elevator_name));
if (!ret)
return count;
--
Markus
[toc] | [prev] | [next] | [standalone]
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Date | 2017-05-10 05:10 +0200 |
| Message-ID | <tFqaK-2Ri-3@gated-at.bofh.it> |
| In reply to | #1638499 |
On 05/09/2017 08:20 PM, Markus Trippelsdorf wrote:
> On 2017.05.10 at 11:24 +1000, Stephen Rothwell wrote:
>> Hi Jens,
>>
>> After merging the block tree, today's linux-next build (arm
>> multi_v7_defconfig) produced this warning:
>>
>> block/elevator.c: In function 'elv_iosched_store':
>> block/elevator.c:1102:2: warning: ignoring return value of 'strstrip', declared with attribute warn_unused_result [-Wunused-result]
>> strstrip(elevator_name);
>> ^
>>
>> Introduced by commit
>>
>> d0f6e2da5871 ("block: Remove leading whitespace and trailing newline in elevator switch error message")
>
> Yes, it was missing a (void) like "(void)strlcpy(...)". But Jens
> unfortunately removed both warnings, so the following patch should now
> be enough:
>
> diff --git a/block/elevator.c b/block/elevator.c
> index fda6be933130..dd0ed19e4fb7 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -1099,8 +1099,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name,
> return count;
>
> strlcpy(elevator_name, skip_spaces(name), sizeof(elevator_name));
> - strstrip(elevator_name);
> - ret = __elevator_change(q, elevator_name);
> + ret = __elevator_change(q, strstrip(elevator_name));
> if (!ret)
> return count;
Care to send that as a proper patch? I don't see that warning here, fwiw.
--
Jens Axboe
[toc] | [prev] | [next] | [standalone]
| From | Markus Trippelsdorf <markus@trippelsdorf.de> |
|---|---|
| Date | 2017-05-10 08:20 +0200 |
| Message-ID | <tFt8B-5Ab-15@gated-at.bofh.it> |
| In reply to | #1638520 |
On 2017.05.09 at 21:00 -0600, Jens Axboe wrote:
> On 05/09/2017 08:20 PM, Markus Trippelsdorf wrote:
> > On 2017.05.10 at 11:24 +1000, Stephen Rothwell wrote:
> >> Hi Jens,
> >>
> >> After merging the block tree, today's linux-next build (arm
> >> multi_v7_defconfig) produced this warning:
> >>
> >> block/elevator.c: In function 'elv_iosched_store':
> >> block/elevator.c:1102:2: warning: ignoring return value of 'strstrip', declared with attribute warn_unused_result [-Wunused-result]
> >> strstrip(elevator_name);
> >> ^
> >>
> >> Introduced by commit
> >>
> >> d0f6e2da5871 ("block: Remove leading whitespace and trailing newline in elevator switch error message")
> >
> > Yes, it was missing a (void) like "(void)strlcpy(...)". But Jens
> > unfortunately removed both warnings, so the following patch should now
> > be enough:
> >
> > diff --git a/block/elevator.c b/block/elevator.c
> > index fda6be933130..dd0ed19e4fb7 100644
> > --- a/block/elevator.c
> > +++ b/block/elevator.c
> > @@ -1099,8 +1099,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name,
> > return count;
> >
> > strlcpy(elevator_name, skip_spaces(name), sizeof(elevator_name));
> > - strstrip(elevator_name);
> > - ret = __elevator_change(q, elevator_name);
> > + ret = __elevator_change(q, strstrip(elevator_name));
> > if (!ret)
> > return count;
>
> Care to send that as a proper patch? I don't see that warning here, fwiw.
I don't see it either. But no, I don't want to send a proper patch.
Please just drop my original patch (d0f6e2da5871), because its only
reason was to improve the two debug printks that you have removed later.
--
Markus
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-05-10 05:30 +0200 |
| Message-ID | <tFqu5-34C-9@gated-at.bofh.it> |
| In reply to | #1638499 |
Hi Markus, On Wed, 10 May 2017 04:20:54 +0200 Markus Trippelsdorf <markus@trippelsdorf.de> wrote: > > Yes, it was missing a (void) like "(void)strlcpy(...)". But Jens > unfortunately removed both warnings, so the following patch should now > be enough: > > diff --git a/block/elevator.c b/block/elevator.c > index fda6be933130..dd0ed19e4fb7 100644 > --- a/block/elevator.c > +++ b/block/elevator.c > @@ -1099,8 +1099,7 @@ ssize_t elv_iosched_store(struct request_queue *q, const char *name, > return count; > > strlcpy(elevator_name, skip_spaces(name), sizeof(elevator_name)); > - strstrip(elevator_name); > - ret = __elevator_change(q, elevator_name); > + ret = __elevator_change(q, strstrip(elevator_name)); > if (!ret) > return count; I think you (or someone) needs to do a proper patch submission to Jens, please. -- Cheers, Stephen Rothwell
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web