From: Bart Van Assche Date: Thu, 14 Jul 2022 18:06:41 +0000 (-0700) Subject: block/floppy: Fix a sparse warning X-Git-Tag: v6.0-rc1~178^2~72 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=23f8ae7148cc32287364741e32b20f37730114aa;p=tomoyo%2Ftomoyo-test1.git block/floppy: Fix a sparse warning Since the type of request.cmd_flags has been changed from u32 into blk_opf_t, use the __force keyword when casting to an integer type to prevent that sparse warns about this cast. Cc: Denis Efremov Cc: Willy Tarreau Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20220714180729.1065367-16-bvanassche@acm.org Signed-off-by: Jens Axboe --- diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 491e7205a0db..ccad3d7b3ddd 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -2859,7 +2859,7 @@ static blk_status_t floppy_queue_rq(struct blk_mq_hw_ctx *hctx, if (WARN(atomic_read(&usage_count) == 0, "warning: usage count=0, current_req=%p sect=%ld flags=%llx\n", current_req, (long)blk_rq_pos(current_req), - (unsigned long long) current_req->cmd_flags)) + (__force unsigned long long) current_req->cmd_flags)) return BLK_STS_IOERR; if (test_and_set_bit(0, &fdc_busy)) {