+ nilfs2-use-integer-type-instead-of-enum-req_op-for-event-tracing-header.patch added to mm-nonmm-unstable branch

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

 



The patch titled
     Subject: nilfs2: use integer type instead of enum req_op for event tracing header
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     nilfs2-use-integer-type-instead-of-enum-req_op-for-event-tracing-header.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/nilfs2-use-integer-type-instead-of-enum-req_op-for-event-tracing-header.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
Subject: nilfs2: use integer type instead of enum req_op for event tracing header
Date: Tue, 30 Apr 2024 17:00:18 +0900

Patch series "nilfs2: reduce build warnings with "make C=1""

These two are cleanups that eliminate the warnings output by sparse (not
including common one related to refcount_dec_and_lock).  Neither is a
bugfix.  


This patch (of 2):

The sparse check with "make C=1" outputs warnings regarding references to
the header file "include/trace/events/nilfs2.h" for event tracing:

 fs/nilfs2/segment.c: note: in included file (through
   include/trace/trace_events.h, include/trace/define_trace.h,
   include/trace/events/nilfs2.h):
 ./include/trace/events/nilfs2.h:191:1: warning: cast to restricted
   blk_opf_t
 ./include/trace/events/nilfs2.h:191:1: warning: restricted blk_opf_t
   degrades to integer
 ./include/trace/events/nilfs2.h:191:1: warning: restricted blk_opf_t
   degrades to integer

Fix this issue by reverting the type of the parameter related to the bio
operation mode in the event tracing definition from "enum req_op" to
"int".

In order to prevent sparse warnings on the caller side (where
trace_nilfs2_mdt_submit_block() is used), also add a typecast to an
argument passed to the tracepoint.

Link: https://lkml.kernel.org/r/20240430080019.4242-1-konishi.ryusuke@xxxxxxxxx
Link: https://lkml.kernel.org/r/20240430080019.4242-2-konishi.ryusuke@xxxxxxxxx
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202401092241.I4mm9OWl-lkp@xxxxxxxxx/
Fixes: ed4512590bd5 ("fs/nilfs2: Use the enum req_op and blk_opf_t types")
Cc: Bart Van Assche <bvanassche@xxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/nilfs2/mdt.c               |    2 +-
 include/trace/events/nilfs2.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/fs/nilfs2/mdt.c~nilfs2-use-integer-type-instead-of-enum-req_op-for-event-tracing-header
+++ a/fs/nilfs2/mdt.c
@@ -152,7 +152,7 @@ nilfs_mdt_submit_block(struct inode *ino
 	ret = 0;
 
 	trace_nilfs2_mdt_submit_block(inode, inode->i_ino, blkoff,
-				      opf & REQ_OP_MASK);
+				      (__force int)(opf & REQ_OP_MASK));
  out:
 	get_bh(bh);
 	*out_bh = bh;
--- a/include/trace/events/nilfs2.h~nilfs2-use-integer-type-instead-of-enum-req_op-for-event-tracing-header
+++ a/include/trace/events/nilfs2.h
@@ -192,7 +192,7 @@ TRACE_EVENT(nilfs2_mdt_submit_block,
 	    TP_PROTO(struct inode *inode,
 		     unsigned long ino,
 		     unsigned long blkoff,
-		     enum req_op mode),
+		     int mode),
 
 	    TP_ARGS(inode, ino, blkoff, mode),
 
@@ -200,7 +200,7 @@ TRACE_EVENT(nilfs2_mdt_submit_block,
 		    __field(struct inode *, inode)
 		    __field(unsigned long, ino)
 		    __field(unsigned long, blkoff)
-		    __field(enum req_op, mode)
+		    __field(int, mode)
 	    ),
 
 	    TP_fast_assign(
_

Patches currently in -mm which might be from konishi.ryusuke@xxxxxxxxx are

nilfs2-use-integer-type-instead-of-enum-req_op-for-event-tracing-header.patch
nilfs2-make-superblock-data-array-index-computation-sparse-friendly.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux