[PATCH v6 04/12] platform/x86/intel/pmt: mutex clean up

Ilpo Järvinen ilpo.jarvinen at linux.intel.com
Mon Jul 7 13:16:44 UTC 2025


On Thu, 3 Jul 2025, Michael J. Ruhl wrote:

> The header file for mutex usage and mutex_destroy() cleanup code is
> absent from this module.

Hi Michael,

While not end of the world, it's generally better to spell out what 
module (/driver/etc.) you're talking about instead of using "this" even if 
the change will contain other references that will tell what the module is.

No need to send another version of this series just because of that unlees 
there are going to be other changes.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>


> Add the header file and mutex_destroy().
> 
> Signed-off-by: Michael J. Ruhl <michael.j.ruhl at intel.com>
> ---
>  drivers/platform/x86/intel/pmt/crashlog.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/pmt/crashlog.c b/drivers/platform/x86/intel/pmt/crashlog.c
> index d40c8e212733..6e32fc1f8f1d 100644
> --- a/drivers/platform/x86/intel/pmt/crashlog.c
> +++ b/drivers/platform/x86/intel/pmt/crashlog.c
> @@ -12,6 +12,7 @@
>  #include <linux/intel_vsec.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/mutex.h>
>  #include <linux/pci.h>
>  #include <linux/slab.h>
>  #include <linux/uaccess.h>
> @@ -262,8 +263,12 @@ static void pmt_crashlog_remove(struct auxiliary_device *auxdev)
>  	struct pmt_crashlog_priv *priv = auxiliary_get_drvdata(auxdev);
>  	int i;
>  
> -	for (i = 0; i < priv->num_entries; i++)
> -		intel_pmt_dev_destroy(&priv->entry[i].entry, &pmt_crashlog_ns);
> +	for (i = 0; i < priv->num_entries; i++) {
> +		struct crashlog_entry *crashlog = &priv->entry[i];
> +
> +		intel_pmt_dev_destroy(&crashlog->entry, &pmt_crashlog_ns);
> +		mutex_destroy(&crashlog->control_mutex);
> +	}
>  }
>  
>  static int pmt_crashlog_probe(struct auxiliary_device *auxdev,
> 

-- 
 i.


More information about the Intel-xe mailing list