All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [kkdwivedi:fermata 405/441] block/blk-mq-bpf.c:96:49: sparse: sparse: incorrect type in argument 2 (different base types)
Date: Sun, 29 Nov 2026 13:23:45 +0100	[thread overview]
Message-ID: <20261129132314.emPBVYCm-lkp@intel.com> (raw)

tree:   https://github.com/kkdwivedi/linux fermata
head:   71012f36d1d04ec653daeebbce8dccf19aeb205d
commit: d5bba177f44e1b88a35c94a49ed7e550587927d0 [405/441] block: Let a BPF struct_ops choose where a disk's requests go
config: mips-randconfig-r2311-20261129 (https://download.01.org/0day-ci/archive/20261129/20261129132314.emPBVYCm-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 16.2.0
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261129/20261129132314.emPBVYCm-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261129132314.emPBVYCm-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> block/blk-mq-bpf.c:96:49: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] opf @@     got restricted blk_opf_t [usertype] opf @@
   block/blk-mq-bpf.c:96:49: sparse:     expected unsigned int [usertype] opf
   block/blk-mq-bpf.c:96:49: sparse:     got restricted blk_opf_t [usertype] opf

vim +96 block/blk-mq-bpf.c

    80	
    81	/*
    82	 * The hardware context the extension chooses for a request of the attached disk's queue
    83	 * @q, without an elevator, submitted on @cpu, and in *@ctxp the software one, or NULL
    84	 * where the request is the kernel's.
    85	 */
    86	static struct blk_mq_hw_ctx *blk_mq_place_hctx(struct request_queue *q, blk_opf_t opf,
    87						       unsigned int cpu, struct blk_mq_ctx **ctxp)
    88	{
    89		enum req_op op = opf & REQ_OP_MASK;
    90		struct blk_mq_ctx *ctx;
    91		unsigned int type;
    92		u32 ret;
    93	
    94		if ((op != REQ_OP_READ && op != REQ_OP_WRITE) || (opf & (REQ_PREFLUSH | REQ_FUA)))
    95			return NULL;
  > 96		ret = static_call(blk_mq_place_call)(q, opf, get_current_ioprio(), cpu);
    97		if (!(ret & BPF_BLK_MQ_PLACED))
    98			return NULL;
    99		cpu = ret & BPF_BLK_MQ_CPU_MASK;
   100		type = (ret & ~BPF_BLK_MQ_PLACED) >> BPF_BLK_MQ_TYPE_SHIFT;
   101		if (cpu >= nr_cpu_ids || !cpu_online(cpu) || type >= q->tag_set->nr_maps ||
   102		    !q->tag_set->map[type].nr_queues || (type == HCTX_TYPE_POLL) != !!(opf & REQ_POLLED))
   103			return NULL;
   104		ctx = per_cpu_ptr(q->queue_ctx, cpu);
   105		*ctxp = ctx;
   106		return ctx->hctxs[type];
   107	}
   108	

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

                 reply	other threads:[~2026-11-29 12:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261129132314.emPBVYCm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=memxor@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.