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 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] 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

Reply via email to