Re: [PATCH v2 35/63] md/raid10: Use the new blk_opf_t type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 29, 2022 at 4:32 PM Bart Van Assche <bvanassche@xxxxxxx> wrote:
>
> Improve static type checking by using the new blk_opf_t type for
> variables that represent a request flags.
>
> Cc: Song Liu <song@xxxxxxxxxx>
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
Acked-by: Song Liu <song@xxxxxxxxxx>

> ---
>  drivers/md/raid10.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index 910d3cd73105..ac8bc7d2565a 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -1136,8 +1136,8 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio,
>  {
>         struct r10conf *conf = mddev->private;
>         struct bio *read_bio;
> -       const int op = bio_op(bio);
> -       const unsigned long do_sync = (bio->bi_opf & REQ_SYNC);
> +       const enum req_op op = bio_op(bio);
> +       const blk_opf_t do_sync = bio->bi_opf & REQ_SYNC;
>         int max_sectors;
>         struct md_rdev *rdev;
>         char b[BDEVNAME_SIZE];
> @@ -1230,9 +1230,9 @@ static void raid10_write_one_disk(struct mddev *mddev, struct r10bio *r10_bio,
>                                   struct bio *bio, bool replacement,
>                                   int n_copy)
>  {
> -       const int op = bio_op(bio);
> -       const unsigned long do_sync = (bio->bi_opf & REQ_SYNC);
> -       const unsigned long do_fua = (bio->bi_opf & REQ_FUA);
> +       const enum req_op op = bio_op(bio);
> +       const blk_opf_t do_sync = bio->bi_opf & REQ_SYNC;
> +       const blk_opf_t do_fua = bio->bi_opf & REQ_FUA;
>         unsigned long flags;
>         struct blk_plug_cb *cb;
>         struct raid1_plug_cb *plug = NULL;



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux