lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202506271642.aFdjzjw7-lkp@intel.com>
Date: Fri, 27 Jun 2025 16:20:29 +0800
From: kernel test robot <lkp@...el.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	robh@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, krzk+dt@...nel.org, conor+dt@...nel.org,
	matthias.bgg@...il.com, angelogioacchino.delregno@...labora.com,
	sudeep.holla@....com, cristian.marussi@....com,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, arm-scmi@...r.kernel.org,
	kernel@...labora.com
Subject: Re: [PATCH v1 2/2] firmware: arm_scmi: Add MediaTek TinySYS SCMI
 Protocol support

Hi AngeloGioacchino,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v6.16-rc3 next-20250626]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/AngeloGioacchino-Del-Regno/dt-bindings-firmware-Add-MediaTek-TinySYS-SCMI-Extension-protocol/20250623-201014
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20250623120136.109311-3-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH v1 2/2] firmware: arm_scmi: Add MediaTek TinySYS SCMI Protocol support
config: csky-randconfig-r111-20250627 (https://download.01.org/0day-ci/archive/20250627/202506271642.aFdjzjw7-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.1.0
reproduce: (https://download.01.org/0day-ci/archive/20250627/202506271642.aFdjzjw7-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506271642.aFdjzjw7-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:83:34: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] attributes @@     got unsigned int @@
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:83:34: sparse:     expected restricted __le32 [usertype] attributes
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:83:34: sparse:     got unsigned int
>> drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:84:36: sparse: sparse: incorrect type in assignment (different base types) @@     expected int num_domains @@     got restricted __le32 [usertype] attributes @@
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:84:36: sparse:     expected int num_domains
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:84:36: sparse:     got restricted __le32 [usertype] attributes
>> drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:119:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] fid @@     got unsigned int [usertype] src_id @@
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:119:27: sparse:     expected restricted __le32 [usertype] fid
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:119:27: sparse:     got unsigned int [usertype] src_id
>> drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:145:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __le32 const [usertype] fid @@
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:145:33: sparse:     expected unsigned int [usertype]
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:145:33: sparse:     got restricted __le32 const [usertype] fid
>> drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:176:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 @@     got unsigned int [usertype] ctrl_id @@
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:176:21: sparse:     expected restricted __le32
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:176:21: sparse:     got unsigned int [usertype] ctrl_id
>> drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:177:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 @@     got unsigned int [usertype] cmd @@
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:177:21: sparse:     expected restricted __le32
   drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c:177:21: sparse:     got unsigned int [usertype] cmd

vim +83 drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c

    67	
    68	static int scmi_mtk_tinysys_attributes_get(const struct scmi_protocol_handle *ph,
    69						   struct scmi_mtk_tinysys_info *tinfo)
    70	{
    71		struct scmi_mtk_tinysys_protocol_attributes *attr;
    72		struct scmi_xfer *t;
    73		int ret;
    74	
    75		ret = ph->xops->xfer_get_init(ph, PROTOCOL_ATTRIBUTES, 0, sizeof(*attr), &t);
    76		if (ret)
    77			return ret;
    78	
    79		attr = t->rx.buf;
    80	
    81		ret = ph->xops->do_xfer(ph, t);
    82		if (!ret) {
  > 83			attr->attributes = get_unaligned_le32(t->rx.buf);
  > 84			tinfo->num_domains = attr->attributes;
    85		}
    86	
    87		ph->xops->xfer_put(ph, t);
    88	
    89		return ret;
    90	}
    91	
    92	static int scmi_mtk_tinysys_get_num_sources(const struct scmi_protocol_handle *ph)
    93	{
    94		struct scmi_mtk_tinysys_info *tinfo = ph->get_priv(ph);
    95	
    96		if (!tinfo)
    97			return -EINVAL;
    98	
    99		return tinfo->num_domains;
   100	}
   101	
   102	static int scmi_mtk_tinysys_set_notify_enabled(const struct scmi_protocol_handle *ph,
   103						       u8 evt_id, u32 src_id, bool enable)
   104	{
   105		struct scmi_mtk_tinysys_pwrst_notify *pwrst_notify;
   106		struct scmi_xfer *t;
   107		int ret;
   108	
   109		/* There's only one possible event for now */
   110		if (evt_id != 0)
   111			return -EINVAL;
   112	
   113		ret = ph->xops->xfer_get_init(ph, MTK_TINYSYS_POWER_STATE_NOTIFY,
   114					      sizeof(*pwrst_notify), 0, &t);
   115		if (ret)
   116			return ret;
   117	
   118		pwrst_notify = t->tx.buf;
 > 119		pwrst_notify->fid = src_id;
   120		pwrst_notify->enable = cpu_to_le32(enable);
   121	
   122		ret = ph->xops->do_xfer(ph, t);
   123		ph->xops->xfer_put(ph, t);
   124		return ret;
   125	}
   126	
   127	static void *scmi_mtk_tinysys_fill_custom_report(const struct scmi_protocol_handle *ph,
   128							 u8 evt_id, ktime_t timestamp,
   129							 const void *payld, size_t payld_sz,
   130							 void *report, u32 *src_id)
   131	{
   132		const struct scmi_mtk_tinysys_notify_payld *p = payld;
   133		struct scmi_mtk_tinysys_notif_report *r = report;
   134		int i;
   135	
   136		if (sizeof(*p) != payld_sz)
   137			return NULL;
   138	
   139		if (evt_id == SCMI_EVENT_MTK_TINYSYS_NOTIFIER) {
   140			r->timestamp = timestamp;
   141			r->fid = le32_to_cpu(p->fid);
   142			for (i = 0; i < SCMI_MTK_MSG_NOTIF_ST_BYTES; i++)
   143				r->status[i] = le32_to_cpu(p->param[i]);
   144			if (src_id)
 > 145				*src_id = p->fid;
   146		} else {
   147			WARN_ON_ONCE(1);
   148			return NULL;
   149		}
   150	
   151		return r;
   152	}
   153	
   154	static const struct scmi_event scmi_mtk_tinysys_events[] = {
   155		{
   156			.id = SCMI_EVENT_MTK_TINYSYS_NOTIFIER,
   157			.max_payld_sz =	sizeof(struct scmi_mtk_tinysys_notify_payld),
   158			.max_report_sz = sizeof(struct scmi_mtk_tinysys_notif_report),
   159		},
   160	};
   161	
   162	static int scmi_mtk_tinysys_common_get(const struct scmi_protocol_handle *ph,
   163					       u32 ctrl_id, u32 cmd,
   164					       struct scmi_mtk_tinysys_status *retval)
   165	{
   166		struct scmi_mtk_tinysys_common_get_payld *p;
   167		struct scmi_xfer *t;
   168		int ret;
   169	
   170		ret = ph->xops->xfer_get_init(ph, MTK_TINYSYS_COMMON_GET,
   171					      sizeof(*p), sizeof(*retval), &t);
   172		if (ret)
   173			return ret;
   174	
   175		p = t->tx.buf;
 > 176		p->param[0] = ctrl_id;
 > 177		p->param[1] = cmd;
   178	
   179		ret = ph->xops->do_xfer(ph, t);
   180		if (!ret) {
   181			if (t->rx.len == sizeof(*retval))
   182				memcpy(retval, t->rx.buf, sizeof(*retval));
   183			else
   184				ret = -EINVAL;
   185		}
   186	
   187		ph->xops->xfer_put(ph, t);
   188		return ret;
   189	}
   190	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ