Re: [PATCH -mm 1/2] nilfs2: use integer type instead of enum req_op for event tracing header

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

 



On Thu, May 2, 2024 at 12:30 AM Ryusuke Konishi wrote:
>
> 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

Hi Bart,

Sorry, I didn't realize you were digging into the issue and talking
with the sparse and kbuild teams to resolve the issue.

Is there any hope for a solution?

If you haven't given up yet on solving the underlying problem, I would
like to withdraw this patch.

Thanks,
Ryusuke Konishi





[Index of Archives]     [Linux Filesystem Development]     [Linux BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux