[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<KL1PR0601MB4726E09FD2A35DC81E7B16F09D77A@KL1PR0601MB4726.apcprd06.prod.outlook.com>
Date: Fri, 13 Jun 2025 12:33:38 +0000
From: Hans Zhang <Hans.Zhang@...tech.com>
To: Niklas Cassel <cassel@...nel.org>, Hans Zhang <18255117159@....com>
CC: "lpieralisi@...nel.org" <lpieralisi@...nel.org>, "bhelgaas@...gle.com"
<bhelgaas@...gle.com>, "mani@...nel.org" <mani@...nel.org>,
"kwilczynski@...nel.org" <kwilczynski@...nel.org>, "robh@...nel.org"
<robh@...nel.org>, "jingoohan1@...il.com" <jingoohan1@...il.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject:
回复: [PATCH 01/13] PCI: dwc: Add dw_pcie_clear_and_set_dword() for register bit manipulation
Hi Niklas,
I have replied to Bjorn. For the next version, I will send the patches of this series using the company's environment.
Please look at this link. Could you please also help review it? Thank you very much.
https://lore.kernel.org/linux-pci/c31c3834-247d-4a28-bd2c-4a39ea719625@163.com/
Best regards,
Hans
-----邮件原件-----
发件人: Niklas Cassel <cassel@...nel.org>
发送时间: 2025年6月13日 20:03
收件人: Hans Zhang <18255117159@....com>
抄送: lpieralisi@...nel.org; bhelgaas@...gle.com; mani@...nel.org; kwilczynski@...nel.org; robh@...nel.org; jingoohan1@...il.com; linux-pci@...r.kernel.org; linux-kernel@...r.kernel.org
主题: Re: [PATCH 01/13] PCI: dwc: Add dw_pcie_clear_and_set_dword() for register bit manipulation
EXTERNAL EMAIL
On Thu, Jun 12, 2025 at 12:30:57AM +0800, Hans Zhang wrote:
> DesignWare PCIe controller drivers implement register bit manipulation
> through explicit read-modify-write sequences. These patterns appear
> repeatedly across multiple drivers with minor variations, creating
> code duplication and maintenance overhead.
>
> Implement dw_pcie_clear_and_set_dword() helper to encapsulate atomic
> register modification. The function reads the current register value,
> clears specified bits, sets new bits, and writes back the result in a
> single operation. This abstraction hides bitwise manipulation details
> while ensuring consistent behavior across all usage sites.
>
> Centralizing this logic reduces future maintenance effort when
> modifying register access patterns and minimizes the risk of
> implementation divergence between drivers.
>
> Signed-off-by: Hans Zhang <18255117159@....com>
No cover-letter?
Usually for things like this, it is nice to see the diffstat, which is usually part of the cover-letter.
Kind regards,
Niklas
Powered by blists - more mailing lists