On 17/12/20 6:25 am, Jacob Keller wrote:
> Commit 81b1e6e6a859 ("platform-msi: Free descriptors in
> platform_msi_domain_free()") introduced for_each_msi_entry_safe as an
> iterator operating on the msi_list using the safe semantics with
> a temporary variable.
> 
> A handful of locations still used the generic iterator instead of the
> specific macro. Fix the 3 remaining cases. Add a cocci script which can
> detect and report any misuse that is introduced in future changes.
> 
> Cc: Rafael J. Wysocki <raf...@kernel.org>
> Cc: Stuart Yoder <stuyo...@gmail.com>
> Cc: Laurentiu Tudor <laurentiu.tu...@nxp.com>
> Cc: Nishanth Menon <n...@ti.com>
> Cc: Tero Kristo <t-kri...@ti.com>
> Cc: Santosh Shilimkar <ssant...@kernel.org>
> Cc: Miquel Raynal <miquel.ray...@bootlin.com>
> Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com>
> ---

[..snip..]

>       }
> diff --git a/drivers/soc/ti/ti_sci_inta_msi.c 
> b/drivers/soc/ti/ti_sci_inta_msi.c
> index 0eb9462f609e..66f9772dcdfa 100644
> --- a/drivers/soc/ti/ti_sci_inta_msi.c
> +++ b/drivers/soc/ti/ti_sci_inta_msi.c
> @@ -64,7 +64,7 @@ static void ti_sci_inta_msi_free_descs(struct device *dev)
>  {
>       struct msi_desc *desc, *tmp;
>  
> -     list_for_each_entry_safe(desc, tmp, dev_to_msi_list(dev), list) {
> +     for_each_msi_entry_safe(desc, tmp, dev) {
>               list_del(&desc->list);
>               free_msi_entry(desc);
>       }

For ti_sci_inta_msi part:

Reviewed-by: Lokesh Vutla <lokeshvu...@ti.com>

Thanks and regards,
Lokesh

Reply via email to