diff mbox series

block: Make request_queue.rpm_status an enum

Message ID 20191206132350.29040-1-geert+renesas@glider.be (mailing list archive)
State Not Applicable, archived
Headers show
Series block: Make request_queue.rpm_status an enum | expand

Commit Message

Geert Uytterhoeven Dec. 6, 2019, 1:23 p.m. UTC
request_queue.rpm_status is assigned values of the rpm_status enum only,
so reflect that in its type.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Perhaps this was done to avoid the need to #include <linux/pm.h>?
Let's see what kbuild has to report about this...
---
 include/linux/blkdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki Dec. 9, 2019, 12:18 p.m. UTC | #1
On Friday, December 6, 2019 2:23:50 PM CET Geert Uytterhoeven wrote:
> request_queue.rpm_status is assigned values of the rpm_status enum only,
> so reflect that in its type.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
> Perhaps this was done to avoid the need to #include <linux/pm.h>?
> Let's see what kbuild has to report about this...
> ---
>  include/linux/blkdev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 397bb9bc230b6349..6419cd9523c370f8 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -466,7 +466,7 @@ struct request_queue {
>  
>  #ifdef CONFIG_PM
>  	struct device		*dev;
> -	int			rpm_status;
> +	enum rpm_status		rpm_status;
>  	unsigned int		nr_pending;
>  #endif
>  
>
diff mbox series

Patch

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 397bb9bc230b6349..6419cd9523c370f8 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -466,7 +466,7 @@  struct request_queue {
 
 #ifdef CONFIG_PM
 	struct device		*dev;
-	int			rpm_status;
+	enum rpm_status		rpm_status;
 	unsigned int		nr_pending;
 #endif