Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

block/rnbd: kill rnbd_flags_supported

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.

Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Link: https://lore.kernel.org/r/20230524070026.2932-2-guoqing.jiang@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Guoqing Jiang and committed by
Jens Axboe
b0488411 bb91a7d9

-22
-22
drivers/block/rnbd/rnbd-proto.h
··· 185 185 enum rnbd_io_flags { 186 186 187 187 /* Operations */ 188 - 189 188 RNBD_OP_READ = 0, 190 189 RNBD_OP_WRITE = 1, 191 190 RNBD_OP_FLUSH = 2, ··· 192 193 RNBD_OP_SECURE_ERASE = 4, 193 194 RNBD_OP_WRITE_SAME = 5, 194 195 195 - RNBD_OP_LAST, 196 - 197 196 /* Flags */ 198 - 199 197 RNBD_F_SYNC = 1<<(RNBD_OP_BITS + 0), 200 198 RNBD_F_FUA = 1<<(RNBD_OP_BITS + 1), 201 - 202 - RNBD_F_ALL = (RNBD_F_SYNC | RNBD_F_FUA) 203 - 204 199 }; 205 200 206 201 static inline u32 rnbd_op(u32 flags) ··· 205 212 static inline u32 rnbd_flags(u32 flags) 206 213 { 207 214 return flags & ~RNBD_OP_MASK; 208 - } 209 - 210 - static inline bool rnbd_flags_supported(u32 flags) 211 - { 212 - u32 op; 213 - 214 - op = rnbd_op(flags); 215 - flags = rnbd_flags(flags); 216 - 217 - if (op >= RNBD_OP_LAST) 218 - return false; 219 - if (flags & ~RNBD_F_ALL) 220 - return false; 221 - 222 - return true; 223 215 } 224 216 225 217 static inline blk_opf_t rnbd_to_bio_flags(u32 rnbd_opf)