[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKFNMomCzNMU0tjLkEchr=GQwSVW1zr1GAq7vUToeOvX-M3eVg@mail.gmail.com>
Date: Thu, 2 May 2024 00:30:52 +0900
From: Ryusuke Konishi <konishi.ryusuke@...il.com>
To: Bart Van Assche <bvanassche@....org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-nilfs@...r.kernel.org,
linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH -mm 1/2] nilfs2: use integer type instead of enum req_op
for event tracing header
On Wed, May 1, 2024 at 11:42 PM Bart Van Assche wrote:
>
> On 4/30/24 10:00, Ryusuke Konishi wrote:
> > trace_nilfs2_mdt_submit_block(inode, inode->i_ino, blkoff,
> > - opf & REQ_OP_MASK);
> > + (__force int)(opf & REQ_OP_MASK));
>
> Please keep the enum req_op type instead of casting that type away with
> "__force int".
>
> Thanks,
>
> Bart.
Hi Bart,
No, this type cast is necessary to prevent the following sparse warning:
CC [M] fs/nilfs2/mdt.o
CHECK fs/nilfs2/mdt.c
fs/nilfs2/mdt.c:155:43: warning: incorrect type in argument 4
(different base types)
fs/nilfs2/mdt.c:155:43: expected int mode
fs/nilfs2/mdt.c:155:43: got restricted blk_opf_t
What we're doing here is just changing the event tracing type back to
int, and keeping blk_opf_t and enum req_op in the rest of the code.
I understand if you have enough reason to ignore the warnings, but
Why do you have to keep enum req_op type instead of int for event tracing?
Regards,
Ryusuke Konishi
Powered by blists - more mailing lists