mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* block/blk-core.c:141:33: sparse: sparse: cast to restricted blk_opf_t
@ 2026-09-22 15:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-22 15:45 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: oe-kbuild-all, linux-kernel, Jens Axboe, Keith Busch,
	Damien Le Moal, Hannes Reinecke, Md Haris Iqbal

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f0100363d8c374bd8e9ea7c9ba02744f0b802ca4
commit: d39a63ead381c7ee93cd938ea2d759c17343b522 block: add a str_to_blk_op helper
date:   3 months ago
config: x86_64-randconfig-1300-20260922 (https://download.01.org/0day-ci/archive/20260922/202609222319.5RyqLCpp-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260922/202609222319.5RyqLCpp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: d39a63ead381 ("block: add a str_to_blk_op helper")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609222319.5RyqLCpp-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   block/blk-core.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/block.h):
   include/trace/events/block.h:244:1: sparse: sparse: restricted blk_mq_req_flags_t degrades to integer
   block/blk-core.c: note: in included file (through include/trace/perf.h, include/trace/define_trace.h, include/trace/events/block.h):
   include/trace/events/block.h:244:1: sparse: sparse: restricted blk_mq_req_flags_t degrades to integer
>> block/blk-core.c:141:33: sparse: sparse: cast to restricted blk_opf_t

vim +141 block/blk-core.c

   134	
   135	enum req_op str_to_blk_op(const char *op)
   136	{
   137		int i;
   138	
   139		for (i = 0; i < ARRAY_SIZE(blk_op_name); i++)
   140			if (blk_op_name[i] && !strcmp(blk_op_name[i], op))
 > 141				return (enum req_op)i;
   142		return REQ_OP_LAST;
   143	}
   144	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-22 15:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 15:45 block/blk-core.c:141:33: sparse: sparse: cast to restricted blk_opf_t kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®