From: kernel test robot <lkp@intel.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
robh@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, krzk+dt@kernel.org,
conor+dt@kernel.org, matthias.bgg@gmail.com,
angelogioacchino.delregno@collabora.com, sudeep.holla@arm.com,
cristian.marussi@arm.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, arm-scmi@vger.kernel.org,
kernel@collabora.com
Subject: Re: [PATCH v1 2/2] firmware: arm_scmi: Add MediaTek TinySYS SCMI Protocol support
Date: Fri, 27 Jun 2025 16:20:29 +0800 [thread overview]
Message-ID: <202506271642.aFdjzjw7-lkp@intel.com> (raw)
In-Reply-To: <20250623120136.109311-3-angelogioacchino.delregno@collabora.com>
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@intel.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
next prev parent reply other threads:[~2025-06-27 8:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 12:01 [PATCH v1 0/2] firmware: Add MediaTek TinySYS SCMI Protocol AngeloGioacchino Del Regno
2025-06-23 12:01 ` [PATCH v1 1/2] dt-bindings: firmware: Add MediaTek TinySYS SCMI Extension protocol AngeloGioacchino Del Regno
2025-06-27 10:19 ` Cristian Marussi
2025-06-27 20:14 ` Rob Herring
2025-06-23 12:01 ` [PATCH v1 2/2] firmware: arm_scmi: Add MediaTek TinySYS SCMI Protocol support AngeloGioacchino Del Regno
2025-06-23 12:16 ` Sudeep Holla
2025-06-24 3:01 ` Peng Fan
2025-06-27 8:20 ` kernel test robot [this message]
2025-06-27 11:43 ` Cristian Marussi
2025-06-23 12:17 ` [PATCH v1 0/2] firmware: Add MediaTek TinySYS SCMI Protocol Cristian Marussi
2025-06-23 12:32 ` AngeloGioacchino Del Regno
2025-06-23 13:30 ` Cristian Marussi
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=202506271642.aFdjzjw7-lkp@intel.com \
--to=lkp@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arm-scmi@vger.kernel.org \
--cc=conor+dt@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sudeep.holla@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).