Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Wang Yugui <wangyugui@e16-tech.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: A sparse(make C=1) warning in btrfs about the 'blk_opf_t'
Date: Sat, 13 Aug 2022 08:25:45 -0700	[thread overview]
Message-ID: <e129b7aa-9589-242e-b259-298b73382002@acm.org> (raw)
In-Reply-To: <20220813125331.3F71.409509F4@e16-tech.com>

On 8/12/22 21:53, Wang Yugui wrote:
> both '__field(enum req_op,opf)' and '__field(blk_opf_t,opf)' failed to work.
> 
> ./include/trace/events/btrfs.h:2327:1: warning: incorrect type in assignment (different base types)
> ./include/trace/events/btrfs.h:2327:1:    expected unsigned int [usertype] opf
> ./include/trace/events/btrfs.h:2327:1:    got restricted blk_opf_t enum req_op
> 
> /ssd/git/os/linux-5.19/fs/btrfs/super.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/btrfs.h):
> ./include/trace/events/btrfs.h:2327:1: warning: cast to restricted blk_opf_t
> ./include/trace/events/btrfs.h:2327:1: warning: cast to restricted blk_opf_t
> ./include/trace/events/btrfs.h:2327:1: warning: restricted blk_opf_t degrades to integer
> ./include/trace/events/btrfs.h:2327:1: warning: restricted blk_opf_t degrades to integer

 From https://en.wikipedia.org/wiki/Posting_style:

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

Regarding the warnings reported above: please apply patch "[PATCH] 
tracing: Suppress sparse warnings triggered by is_signed_type()" before 
testing my patch.

Thanks,

Bart.

  reply	other threads:[~2022-08-13 15:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13  0:00 A sparse(make C=1) warning in btrfs about the 'blk_opf_t' Wang Yugui
2022-08-13  0:22 ` Bart Van Assche
2022-08-13  1:13   ` Wang Yugui
2022-08-13  3:02     ` Bart Van Assche
2022-08-13  4:53       ` Wang Yugui
2022-08-13 15:25         ` Bart Van Assche [this message]
2022-08-13 16:03           ` Wang Yugui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e129b7aa-9589-242e-b259-298b73382002@acm.org \
    --to=bvanassche@acm.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wangyugui@e16-tech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox