diff mbox series

[49/51] PM: Use the enum req_op and blk_opf_t types

Message ID 20220623180528.3595304-50-bvanassche@acm.org (mailing list archive)
State New, archived
Headers show
Series Improve static type checking for request flags | expand

Commit Message

Bart Van Assche June 23, 2022, 6:05 p.m. UTC
Improve static type checking by using the enum req_op type for variables
that represent a request operation and the new blk_opf_t type for
variables that represent request flags.

Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 kernel/power/swap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Wysocki, Rafael J June 27, 2022, 1:04 p.m. UTC | #1
On 6/23/2022 8:05 PM, Bart Van Assche wrote:
> Improve static type checking by using the enum req_op type for variables
> that represent a request operation and the new blk_opf_t type for
> variables that represent request flags.
>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

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

Or if you want me to pick it up, please resend it with a CC to 
linux-pm@vger.kernel.org.

Thanks!


> ---
>   kernel/power/swap.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/power/swap.c b/kernel/power/swap.c
> index 91fffdd2c7fb..db01cac40a4c 100644
> --- a/kernel/power/swap.c
> +++ b/kernel/power/swap.c
> @@ -269,8 +269,8 @@ static void hib_end_io(struct bio *bio)
>   	bio_put(bio);
>   }
>   
> -static int hib_submit_io(int op, int op_flags, pgoff_t page_off, void *addr,
> -		struct hib_bio_batch *hb)
> +static int hib_submit_io(enum req_op op, blk_opf_t op_flags,
> +			 pgoff_t page_off, void *addr, struct hib_bio_batch *hb)
>   {
>   	struct page *page = virt_to_page(addr);
>   	struct bio *bio;
diff mbox series

Patch

diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 91fffdd2c7fb..db01cac40a4c 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -269,8 +269,8 @@  static void hib_end_io(struct bio *bio)
 	bio_put(bio);
 }
 
-static int hib_submit_io(int op, int op_flags, pgoff_t page_off, void *addr,
-		struct hib_bio_batch *hb)
+static int hib_submit_io(enum req_op op, blk_opf_t op_flags,
+			 pgoff_t page_off, void *addr, struct hib_bio_batch *hb)
 {
 	struct page *page = virt_to_page(addr);
 	struct bio *bio;