Re: [PATCH] ata: libata-core: Simplify ata_print_version_once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11.04.2025 02:00, Damien Le Moal wrote:
> On 4/11/25 06:45, Heiner Kallweit wrote:
>> Use dev_dbg_once() instead of open-coding the once functionality.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
>> ---
>>  drivers/ata/libata-core.c |  6 +++---
>>  include/linux/libata.h    | 13 +------------
>>  2 files changed, 4 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
>> index 773799cfd..e58a22e83 100644
>> --- a/drivers/ata/libata-core.c
>> +++ b/drivers/ata/libata-core.c
>> @@ -6682,11 +6682,11 @@ const struct ata_port_info ata_dummy_port_info = {
>>  };
>>  EXPORT_SYMBOL_GPL(ata_dummy_port_info);
>>  
>> -void ata_print_version(const struct device *dev, const char *version)
>> +void ata_print_version_once(const struct device *dev, const char *version)
>>  {
>> -	dev_printk(KERN_DEBUG, dev, "version %s\n", version);
>> +	dev_dbg_once(dev, "version %s\n", version);
>>  }
>> -EXPORT_SYMBOL(ata_print_version);
>> +EXPORT_SYMBOL(ata_print_version_once);
> 
> Overall, looks good, but I really do not see the point of having this as an
> exported function. So while at it, can you change it to be inline in libata.h ?
> 
Right, this would be better. I'll submit a v2.




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux