lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25b88913-8d52-4d0f-8906-699544d4abb7@amd.com>
Date: Tue, 3 Jun 2025 22:25:00 -0400
From: "Nirujogi, Pratap" <pnirujog@....com>
To: Randy Dunlap <rdunlap@...radead.org>,
 Pratap Nirujogi <pratap.nirujogi@....com>, andi.shyti@...nel.org,
 hdegoede@...hat.com, ilpo.jarvinen@...ux.intel.com,
 mario.limonciello@....com, sfr@...b.auug.org.au, linux-next@...r.kernel.org
Cc: linux-i2c@...r.kernel.org, platform-driver-x86@...r.kernel.org,
 linux-kernel@...r.kernel.org, benjamin.chan@....com, bin.du@....com,
 gjorgji.rosikopulos@....com, king.li@....com, dantony@....com
Subject: Re: [PATCH v2 1/3] i2c: designware: Initialize adapter name only when
 not set



On 6/3/2025 6:50 PM, Randy Dunlap wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> On 6/3/25 2:40 PM, Pratap Nirujogi wrote:
>> Check if the adapter name is already set in the driver prior
>> to initializing with generic name in i2c_dw_probe_master().
> 
> That explains what but not why. Commits should also explain
> why they are doing something.
> 
Thanks Randy. I will take care of updating the commit text explaining 
why this change is needed in the next patch.

>>
>> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@....com>
> 
> Tested-by: Randy Dunlap <rdunlap@...radead.org>
> 
> Thanks.
> 
> 
>> ---
>>   drivers/i2c/busses/i2c-designware-master.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
>> index c5394229b77f..9d7d9e47564a 100644
>> --- a/drivers/i2c/busses/i2c-designware-master.c
>> +++ b/drivers/i2c/busses/i2c-designware-master.c
>> @@ -1042,8 +1042,9 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev)
>>        if (ret)
>>                return ret;
>>
>> -     snprintf(adap->name, sizeof(adap->name),
>> -              "Synopsys DesignWare I2C adapter");
>> +     if (!adap->name[0])
>> +             scnprintf(adap->name, sizeof(adap->name),
>> +                       "Synopsys DesignWare I2C adapter");
>>        adap->retries = 3;
>>        adap->algo = &i2c_dw_algo;
>>        adap->quirks = &i2c_dw_quirks;
> 
> --
> ~Randy


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ