Re: [PATCH -next] firmware: imx: se_ctrl: serialize command receiver registration

From: kernel test robot

Date: Fri May 29 2026 - 00:44:57 EST


Hi Pankaj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20260527]

url: https://github.com/intel-lab-lkp/linux/commits/Pankaj-Gupta/firmware-imx-se_ctrl-serialize-command-receiver-registration/20260528-172942
base: next-20260527
patch link: https://lore.kernel.org/r/20260528091634.3331090-1-pankaj.gupta%40nxp.com
patch subject: [PATCH -next] firmware: imx: se_ctrl: serialize command receiver registration
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260529/202605291206.NC4J51NQ-lkp@xxxxxxxxx/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260529/202605291206.NC4J51NQ-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605291206.NC4J51NQ-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/firmware/imx/se_ctrl.c:673:16: warning: result of comparison of constant 18446744073709551608 with expression of type '__u32' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
673 | if (io.length > SIZE_MAX - 7) {
| ~~~~~~~~~ ^ ~~~~~~~~~~~~
>> drivers/firmware/imx/se_ctrl.c:934:4: warning: label at end of compound statement is a C23 extension [-Wc23-extensions]
934 | }
| ^
2 warnings generated.


vim +934 drivers/firmware/imx/se_ctrl.c

3ae9dcce8400f0 Pankaj Gupta 2026-01-22 905
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 906 /* IOCTL entry point of a character device */
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 907 static long se_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 908 {
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 909 struct se_if_device_ctx *dev_ctx = fp->private_data;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 910 struct se_if_priv *priv = dev_ctx->priv;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 911 void __user *uarg = (void __user *)arg;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 912 long err;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 913
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 914 /* Prevent race during change of device context */
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 915 scoped_cond_guard(mutex_intr, return -EBUSY, &dev_ctx->fops_lock) {
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 916 switch (cmd) {
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 917 case SE_IOCTL_ENABLE_CMD_RCV:
8aff20bcff5290 Pankaj Gupta 2026-05-28 918 scoped_guard(mutex, &priv->priv_dev_ctx->fops_lock) {
8aff20bcff5290 Pankaj Gupta 2026-05-28 919 if (priv->cmd_receiver_clbk_hdl.dev_ctx) {
8aff20bcff5290 Pankaj Gupta 2026-05-28 920 err = -EBUSY;
8aff20bcff5290 Pankaj Gupta 2026-05-28 921 goto out_enable_cmd_rcv;
8aff20bcff5290 Pankaj Gupta 2026-05-28 922 }
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 923 priv->cmd_receiver_clbk_hdl.rx_msg =
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 924 kzalloc(MAX_NVM_MSG_LEN,
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 925 GFP_KERNEL);
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 926 if (!priv->cmd_receiver_clbk_hdl.rx_msg) {
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 927 err = -ENOMEM;
8aff20bcff5290 Pankaj Gupta 2026-05-28 928 goto out_enable_cmd_rcv;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 929 }
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 930 priv->cmd_receiver_clbk_hdl.rx_msg_sz = MAX_NVM_MSG_LEN;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 931 priv->cmd_receiver_clbk_hdl.dev_ctx = dev_ctx;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 932 err = 0;
8aff20bcff5290 Pankaj Gupta 2026-05-28 933 out_enable_cmd_rcv:
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 @934 }
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 935 break;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 936 case SE_IOCTL_GET_MU_INFO:
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 937 err = se_ioctl_get_mu_info(dev_ctx, uarg);
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 938 break;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 939 case SE_IOCTL_SETUP_IOBUF:
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 940 err = se_ioctl_setup_iobuf_handler(dev_ctx, uarg);
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 941 break;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 942 case SE_IOCTL_GET_SOC_INFO:
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 943 err = se_ioctl_get_se_soc_info_handler(dev_ctx, uarg);
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 944 break;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 945 case SE_IOCTL_CMD_SEND_RCV_RSP:
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 946 err = se_ioctl_cmd_snd_rcv_rsp_handler(dev_ctx, uarg);
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 947 break;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 948 default:
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 949 err = -EINVAL;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 950 dev_dbg(priv->dev, "%s: IOCTL %.8x not supported.",
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 951 dev_ctx->devname, cmd);
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 952 }
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 953 }
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 954
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 955 return err;
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 956 }
3ae9dcce8400f0 Pankaj Gupta 2026-01-22 957

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