Re: [PATCH v4 03/11] PCI: pciehp: Use RMW accessors for changing LNKCTL

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

 



On Thu, Jul 13, 2023 at 03:44:57PM +0300, Ilpo Järvinen wrote:
> As hotplug is not the only driver touching LNKCTL, use the RMW
> capability accessor which handles concurrent changes correctly.

...

> +	pcie_capability_clear_and_set_word(pdev, PCI_EXP_LNKCTL,
> +					   PCI_EXP_LNKCTL_LD,
> +					   !enable ? PCI_EXP_LNKCTL_LD : 0);

					   enable ? 0 : PCI_EXP_LNKCTL_LD);

easier to read and get.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux