> -----邮件原件----- > 发件人: Fabio Estevam <feste...@gmail.com> > 发送时间: 2025年4月11日 20:46 > 收件人: Alice Guo (OSS) <alice....@oss.nxp.com> > 抄送: ma...@denx.de; tr...@konsulko.com; u-boot@lists.denx.de > 主题: Re: [PATCH RESEND] firmware: scmi: support to manage SCMI protocol > drivers with a linker-genetated array > > On Wed, Apr 9, 2025 at 4:54 AM Alice Guo (OSS) <alice....@oss.nxp.com> > wrote: > > > +static struct driver *scmi_proto_driver_get(unsigned int proto_id) { > > + struct scmi_proto_driver *start, *entry; > > + int n_ents; > > + > > + start = ll_entry_start(struct scmi_proto_driver, scmi_proto_driver); > > + n_ents = ll_entry_count(struct scmi_proto_driver, > > + scmi_proto_driver); > > + > > + for (entry = start; entry != start + n_ents; entry++) { > > + if (entry->match->proto_id == proto_id) > > + return entry->driver; > > + } > > + > > + return NULL; > > Please send this with an actual usage. Otherwise, we get: > > sandbox: + sandbox > 102+drivers/firmware/scmi/scmi_agent-uclass.c:355:23: error: > ‘scmi_proto_driver_get’ defined but not used [-Werror=unused-function] > 103+ 355 | static struct driver *scmi_proto_driver_get(unsigned int > 103+ proto_id) > 104+ | ^~~~~~~~~~~~~~~~~~~~~ > 105+cc1: all warnings being treated as errors > 106+make[4]: *** [scripts/Makefile.build:256: > drivers/firmware/scmi/scmi_agent-uclass.o] Error 1 > 107+make[3]: *** [scripts/Makefile.build:398: drivers/firmware/scmi] > 107+Error 2 > 108+make[2]: *** [scripts/Makefile.build:398: drivers/firmware] Error 2 > 109+make[1]: *** [Makefile:1919: drivers] Error 2 > 110+make: *** [Makefile:177: sub-make] Error 2
Hi Fabio, Actual usage is in this patch. https://patchwork.ozlabs.org/project/uboot/patch/20250411080707.602371-2-alice....@oss.nxp.com/ Best Regards, Alice Guo