Re: [PATCH 01/10] block/rnbd: kill rnbd_flags_supported

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

 



On Tue, May 23, 2023 at 9:53 AM Guoqing Jiang <guoqing.jiang@xxxxxxxxx> wrote:
>
> This routine is not called since added. Then the two flags
> (RNBD_OP_LAST and RNBD_F_ALL) can be removed too after kill
> rnbd_flags_supported.
>
> Signed-off-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxx>
Acked-by: Jack Wang <jinpu.wang@xxxxxxxxx>
> ---
>  drivers/block/rnbd/rnbd-proto.h | 22 ----------------------
>  1 file changed, 22 deletions(-)
>
> diff --git a/drivers/block/rnbd/rnbd-proto.h b/drivers/block/rnbd/rnbd-proto.h
> index da1d0542d7e2..84fd69844b7d 100644
> --- a/drivers/block/rnbd/rnbd-proto.h
> +++ b/drivers/block/rnbd/rnbd-proto.h
> @@ -185,7 +185,6 @@ struct rnbd_msg_io {
>  enum rnbd_io_flags {
>
>         /* Operations */
> -
>         RNBD_OP_READ            = 0,
>         RNBD_OP_WRITE           = 1,
>         RNBD_OP_FLUSH           = 2,
> @@ -193,15 +192,9 @@ enum rnbd_io_flags {
>         RNBD_OP_SECURE_ERASE    = 4,
>         RNBD_OP_WRITE_SAME      = 5,
>
> -       RNBD_OP_LAST,
> -
>         /* Flags */
> -
>         RNBD_F_SYNC  = 1<<(RNBD_OP_BITS + 0),
>         RNBD_F_FUA   = 1<<(RNBD_OP_BITS + 1),
> -
> -       RNBD_F_ALL   = (RNBD_F_SYNC | RNBD_F_FUA)
> -
>  };
>
>  static inline u32 rnbd_op(u32 flags)
> @@ -214,21 +207,6 @@ static inline u32 rnbd_flags(u32 flags)
>         return flags & ~RNBD_OP_MASK;
>  }
>
> -static inline bool rnbd_flags_supported(u32 flags)
> -{
> -       u32 op;
> -
> -       op = rnbd_op(flags);
> -       flags = rnbd_flags(flags);
> -
> -       if (op >= RNBD_OP_LAST)
> -               return false;
> -       if (flags & ~RNBD_F_ALL)
> -               return false;
> -
> -       return true;
> -}
> -
>  static inline blk_opf_t rnbd_to_bio_flags(u32 rnbd_opf)
>  {
>         blk_opf_t bio_opf;
> --
> 2.35.3
>




[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