On 3/11/2024 8:34 AM, Dmitry Baryshkov wrote:
> +/**
> + * qmi_del_server() - register a service with the name service
s/register/deregister/g
> + * @qmi: qmi handle
> + * @service: type of the service
> + * @instance: instance of the service
> + * @version: version of the service
> + *
> + * Remove registration of the service with the name service. This notifies
> + * clients that they should no longer send messages to the client associated
> + * with @qmi.
> + *
> + * Return: 0 on success, negative errno on failure.
> + */
> +int qmi_del_server(struct qmi_handle *qmi, unsigned int service,
> + unsigned int version, unsigned int instance)
> +{
> + struct qmi_service *svc;
> + struct qmi_service *tmp;
> +
> + list_for_each_entry_safe(svc, tmp, &qmi->services, list_node) {
> + if (svc->service != service ||
> + svc->version != version ||
> + svc->instance != instance)
> + continue;
> +
> + qmi_send_del_server(qmi, svc);
> + list_del(&svc->list_node);
> + kfree(svc);
> +
> + return 0;
> + }
> +
is list_for_each_entry_safe required if we stop iterating and return
after we find the first instance of the service?
> + return -EINVAL;
> +}
> +EXPORT_SYMBOL_GPL(qmi_del_server);
- [PATCH v4 0/7] soc: qcom: add in-kernel pd-mapper impleme... Dmitry Baryshkov
- [PATCH v4 1/7] soc: qcom: pdr: protect locator_addr ... Dmitry Baryshkov
- Re: [PATCH v4 1/7] soc: qcom: pdr: protect locat... Chris Lew
- Re: [PATCH v4 1/7] soc: qcom: pdr: protect l... Dmitry Baryshkov
- [PATCH v4 2/7] soc: qcom: qmi: add a way to remove r... Dmitry Baryshkov
- Re: [PATCH v4 2/7] soc: qcom: qmi: add a way to ... Konrad Dybcio
- Re: [PATCH v4 2/7] soc: qcom: qmi: add a way... Dmitry Baryshkov
- Re: [PATCH v4 2/7] soc: qcom: qmi: add a way to ... Chris Lew
- Re: [PATCH v4 2/7] soc: qcom: qmi: add a way... Dmitry Baryshkov
- [PATCH v4 4/7] remoteproc: qcom: pas: correct data i... Dmitry Baryshkov
- [PATCH v4 5/7] remoteproc: qcom: adsp: add configura... Dmitry Baryshkov
- Re: [PATCH v4 5/7] remoteproc: qcom: adsp: add c... Bjorn Andersson
- [PATCH v4 3/7] soc: qcom: add pd-mapper implementati... Dmitry Baryshkov
- Re: [PATCH v4 3/7] soc: qcom: add pd-mapper impl... Konrad Dybcio
- Re: [PATCH v4 3/7] soc: qcom: add pd-mapper ... Johan Hovold
- Re: [PATCH v4 3/7] soc: qcom: add pd-mapper impl... Johan Hovold
- Re: [PATCH v4 3/7] soc: qcom: add pd-mapper impl... Chris Lew
