linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] block: Make request_queue.rpm_status an enum
@ 2020-08-19 12:34 Geert Uytterhoeven
  2020-08-19 12:55 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-08-19 12:34 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Bart Van Assche, linux-block, linux-kernel, Geert Uytterhoeven

request_queue.rpm_status is assigned values of the rpm_status enum only,
so reflect that in its type.

Note that including <linux/pm.h> is (currently) a no-op, as it is
already included through <linux/genhd.h> and <linux/device.h>, but it is
better to play it safe.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
v3:
  - #include <linux/pm.h>, as requested by Bart,

v2:
  - Add Acked-by.
---
 include/linux/blkdev.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index bb5636cc17b91a75..0a1730b30ad210b4 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -24,6 +24,7 @@
 #include <linux/percpu-refcount.h>
 #include <linux/scatterlist.h>
 #include <linux/blkzoned.h>
+#include <linux/pm.h>
 
 struct module;
 struct scsi_ioctl_command;
@@ -458,7 +459,7 @@ struct request_queue {
 
 #ifdef CONFIG_PM
 	struct device		*dev;
-	int			rpm_status;
+	enum rpm_status		rpm_status;
 	unsigned int		nr_pending;
 #endif
 
-- 
2.17.1


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

* Re: [PATCH v3] block: Make request_queue.rpm_status an enum
  2020-08-19 12:34 [PATCH v3] block: Make request_queue.rpm_status an enum Geert Uytterhoeven
@ 2020-08-19 12:55 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2020-08-19 12:55 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Bart Van Assche, linux-block, linux-kernel

On 8/19/20 5:34 AM, Geert Uytterhoeven wrote:
> request_queue.rpm_status is assigned values of the rpm_status enum only,
> so reflect that in its type.
> 
> Note that including <linux/pm.h> is (currently) a no-op, as it is
> already included through <linux/genhd.h> and <linux/device.h>, but it is
> better to play it safe.

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2020-08-19 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 12:34 [PATCH v3] block: Make request_queue.rpm_status an enum Geert Uytterhoeven
2020-08-19 12:55 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).