* [PATCH v2] block: Make request_queue.rpm_status an enum
@ 2020-05-05 14:03 Geert Uytterhoeven
2020-05-05 17:55 ` Bart Van Assche
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-05-05 14:03 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, linux-pm, linux-kernel, Geert Uytterhoeven
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...
v2:
- Add Acked-by.
---
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 f00bd4042295967d..1e2c6f7a188941f1 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -454,7 +454,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 v2] block: Make request_queue.rpm_status an enum
2020-05-05 14:03 [PATCH v2] block: Make request_queue.rpm_status an enum Geert Uytterhoeven
@ 2020-05-05 17:55 ` Bart Van Assche
0 siblings, 0 replies; 2+ messages in thread
From: Bart Van Assche @ 2020-05-05 17:55 UTC (permalink / raw)
To: Geert Uytterhoeven, Jens Axboe; +Cc: linux-block, linux-pm, linux-kernel
On 2020-05-05 07:03, 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...
>
> v2:
> - Add Acked-by.
> ---
> 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 f00bd4042295967d..1e2c6f7a188941f1 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -454,7 +454,7 @@ struct request_queue {
>
> #ifdef CONFIG_PM
> struct device *dev;
> - int rpm_status;
> + enum rpm_status rpm_status;
> unsigned int nr_pending;
> #endif
Forward declarations of enums are not supported by the C language as far
as I know. Relying on kbuild to decide whether or not to include
<linux/pm.h> seems wrong to me. Please either add #include <linux/pm.h>
or drop this patch.
Thanks,
Bart.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-05 17:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 14:03 [PATCH v2] block: Make request_queue.rpm_status an enum Geert Uytterhoeven
2020-05-05 17:55 ` Bart Van Assche
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).