Re: constification and cocci / kernel build test robot ?

Julia Lawall
2016-08-28T17:46:53Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1677 bytes --]

On Sun, 28 Aug 2016, Joe Perches wrote:

> On Sun, 2016-08-28 at 15:13 +0200, Julia Lawall wrote:
> > [Adding Kees, in case it's of interest]
>
> > Below is the list of types of top-level initialized structures and the
> > number that are const.  For quicker reading, here are some that are
> > sometimes const (numerator), but not always (denominator):
>
> []
>
> And here is the checkpatch list:
>
> # check for various structs that are normally const (ops, kgdb, device_tree)
> my $const_structs = qr{
> acpi_dock_ops|
> address_space_operations|
> backlight_ops|
> block_device_operations|
> dentry_operations|
> dev_pm_ops|
> dma_map_ops|
> extent_io_ops|
> file_lock_operations|
> file_operations|
> hv_ops|
> ide_dma_ops|
> intel_dvo_dev_ops|
> item_operations|
> iwl_ops|
> kgdb_arch|
> kgdb_io|
> kset_uevent_ops|
> lock_manager_operations|
> microcode_ops|
> mtrr_ops|
> neigh_ops|
> nlmsvc_binding|
> of_device_id|
> pci_raw_ops|
> pipe_buf_operations|
> platform_hibernation_ops|
> platform_suspend_ops|
> proto_ops|
> rpc_pipe_ops|
> seq_operations|
> snd_ac97_build_ops|
> soc_pcmcia_socket_ops|
> stacktrace_ops|
> sysfs_ops|
> tty_operations|
> uart_ops|
> usb_mon_operations|
> wd_ops}x;
>
> While I don't know that Julia's "always const" list is
> completely appropriate given possible local naming clashes,
> maybe checkpatch can use some separate file with the
> structs enumerated like a .checkpatch_const_structs file or
> similar to make this more easily editable.

Could be a good idea.

julia