Re: [PATCH] x86/pci: Annotate 'pci_root_ops' with __ro_after_init

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

 



On Mon, Nov 05, 2018 at 12:17:35PM -0800, Zubin Mithra wrote:
> When CONFIG_X86_INTEL_MID is set pci_root_ops is written to inside
> intel_mid_pci_init(which is marked __init) and not modified after. This
> makes pci_root_ops a suitable candidate for annotating as
> __ro_after_init.

Yikes.  pci_root_ops really should be const to start with, and we
should use a separate struct for MID.  Having structures that contain
function pointers not marked const is generally a bad idea to start with.



[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