Re: [PATCH v2 16/19] platform/x86/intel/tpmi: Use DEFINE_SHOW_STORE_ATTRIBUTE() for mem_write
From: Andy Shevchenko
Date: Thu Sep 24 2026 - 17:16:11 EST
On Thu, Sep 24, 2026 at 11:23:38AM -0700, Kuppuswamy Sathyanarayanan wrote:
> The mem_write debugfs file open handler and file_operations are written
> out by hand, which is what DEFINE_SHOW_STORE_ATTRIBUTE() exists for. Use
> it, and rename the write callback to mem_write_write() to match the name
> the macro derives.
>
> The other two files in this driver already come from
> DEFINE_SHOW_ATTRIBUTE(), so this also gives mem_write the
> .owner = THIS_MODULE that the open coded file_operations was missing.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko