public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] elevator: eliminate unused result build warning
@ 2017-05-10 15:29 Firo Yang
  2017-05-10 15:30 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Firo Yang @ 2017-05-10 15:29 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, kernel-janitors, Firo Yang, Firo Yang

Gcc complains about ignoring return value of ‘strstrip’; Fix it by
just using the strstrip() as the function parameter.

Signed-off-by: Firo Yang <firogm@gmail.com>
---
 block/elevator.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/block/elevator.c b/block/elevator.c
index fda6be9..dd0ed19 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;
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] elevator: eliminate unused result build warning
  2017-05-10 15:29 [PATCH] elevator: eliminate unused result build warning Firo Yang
@ 2017-05-10 15:30 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2017-05-10 15:30 UTC (permalink / raw)
  To: Firo Yang; +Cc: linux-block, kernel-janitors, Firo Yang

On 05/10/2017 09:29 AM, Firo Yang wrote:
> Gcc complains about ignoring return value of ‘strstrip’; Fix it by
> just using the strstrip() as the function parameter.

This has already been fixed up.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-10 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-10 15:29 [PATCH] elevator: eliminate unused result build warning Firo Yang
2017-05-10 15:30 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox