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] [day] [month] [year] [list]
Message-ID: <a2f02857-34b9-4abd-8315-9279f31f6e91@163.com>
Date: Thu, 26 Jun 2025 22:51:33 +0800
From: Hans Zhang <18255117159@....com>
To: Manivannan Sadhasivam <mani@...nel.org>
Cc: lpieralisi@...nel.org, bhelgaas@...gle.com, kwilczynski@...nel.org,
 robh@...nel.org, jingoohan1@...il.com, linux-pci@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 00/13] PCI: dwc: Refactor register access with
 dw_pcie_clear_and_set_dword helper



On 2025/6/26 05:00, Manivannan Sadhasivam wrote:
> On Wed, Jun 18, 2025 at 11:20:59PM +0800, Hans Zhang wrote:
>> Register bit manipulation in DesignWare PCIe controllers currently
>> uses repetitive read-modify-write sequences across multiple drivers.
>> This pattern leads to code duplication and increases maintenance
>> complexity as each driver implements similar logic with minor variations.
>>
>> This series introduces dw_pcie_clear_and_set_dword() to centralize atomic
>> register modification. The helper performs read-clear-set-write operations
>> in a single function, replacing open-coded implementations. Subsequent
>> patches refactor individual drivers to use this helper, eliminating
>> redundant code and ensuring consistent bit handling.
>>
>> The change reduces overall code size by ~350 lines while improving
>> maintainability. Each controller driver is updated in a separate
>> patch to preserve bisectability and simplify review.
>>
> 
> Thanks for the cleanup! I spotted a typo in patch 13/13. Apart from that, I only
> have one comment. You are initializing the temp variable like 'val' to 0 and
> then ORing it with some fields. Here the initialization part is not necessary.
> You could just write the first field directly instead of ORing with a 0
> initialized variable.
> 
> Rest LGTM!

Dear Mani,

Thank you very much for your reply and reminder.

Will fix.

Best regards,
Hans

> 
> - Mani
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ