Re: [Ksummit-discuss] [PATCH v2 0/3] Maintainer Entry Profiles

Joe Perches
2019-09-13T18:51:31Z

On Fri, 2019-09-13 at 15:26 +0100, Rob Herring wrote:
> On Fri, Sep 13, 2019 at 3:12 PM Joe Perches <joe@perches.com> wrote:
> > On Thu, 2019-09-12 at 13:01 -0700, Bart Van Assche wrote:
> >
> > > Another argument in favor of W=1 is that the formatting of kernel-doc
> > > headers is checked only if W=1 is passed to make.
> >
> > Actually, but for the fact there are far too many
> > to generally enable that warning right now,
> > (an x86-64 defconfig has more than 1000)
> > that sounds pretty reasonable to me.

> It's in the 1000s on arm because W=1 turns on more checks in building
> .dts files. There are lots of duplicates as most of the dts content is
> as an include file (e.g. board dts includes soc dts).

Yeah, dts[i] files in arm compilations are very noisy at W=1
so moving those message types to W=2 seems sensible.

$ { opt="ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi-" ; make $opt clean ; make $opt defconfig ; make $opt W=1 -j4 ; } > arm_make.log 2>&1

$ grep -i -P 'dtsi?:.*warning' arm_make.log | wc -l
69164

Just fyi: for an x86-64 defconfig with gcc 8.3

$ { make clean ; make defconfig ; make -j4 W=1 ; } > make.log 2>&1

There are ~300 W=1 for non kernel-doc -W<foo> warnings.

$ grep -i -P -oh '\[\-W[\w\-]+\]' make.log |sort | uniq -c | sort -rn
163 [-Wmissing-prototypes]
69 [-Wunused-but-set-variable]
16 [-Wempty-body]
10 [-Wtype-limits]
6 [-Woverride-init]
2 [-Wstringop-truncation]
2 [-Wcast-function-type]
1 [-Wunused-but-set-parameter]

And there are ~1000 kernel-doc only messages in various files

$ grep -i 'function parameter' make.log | cut -f1 -d: | sort | uniq -c
6 arch/x86/events/intel/pt.c
2 arch/x86/kernel/apic/apic.c
10 arch/x86/kernel/cpu/mtrr/generic.c
5 arch/x86/kernel/crash_dump_64.c
1 arch/x86/kernel/i8259.c
3 arch/x86/kernel/smpboot.c
3 arch/x86/kernel/tsc.c
2 arch/x86/kernel/uprobes.c
1 arch/x86/lib/cmdline.c
1 arch/x86/lib/insn.c
2 arch/x86/lib/insn-eval.c
4 arch/x86/lib/msr.c
2 arch/x86/lib/usercopy_64.c
1 arch/x86/mm/pat.c
13 arch/x86/mm/pgtable.c
1 arch/x86/pci/i386.c
2 arch/x86/power/cpu.c
2 arch/x86/power/hibernate.c
8 certs/system_keyring.c
4 crypto/asymmetric_keys/asymmetric_type.c
3 crypto/asymmetric_keys/pkcs7_trust.c
16 crypto/jitterentropy.c
3 drivers/acpi/acpi_apd.c
3 drivers/acpi/bus.c
2 drivers/acpi/cppc_acpi.c
5 drivers/acpi/device_sysfs.c
2 drivers/acpi/dock.c
2 drivers/acpi/nvs.c
1 drivers/acpi/pci_root.c
5 drivers/acpi/property.c
4 drivers/acpi/sleep.c
7 drivers/acpi/utils.c
1 drivers/ata/libata-acpi.c
2 drivers/ata/libata-pmp.c
6 drivers/ata/libata-transport.c
4 drivers/ata/pata_amd.c
4 drivers/base/attribute_container.c
1 drivers/base/devcon.c
3 drivers/base/platform-msi.c
3 drivers/base/power/runtime.c
5 drivers/base/power/wakeup.c
2 drivers/char/agp/backend.c
3 drivers/char/agp/generic.c
2 drivers/clk/clk.c
1 drivers/clk/clk-fixed-factor.c
1 drivers/clk/clk-fixed-rate.c
3 drivers/connector/cn_proc.c
31 drivers/cpufreq/cpufreq.c
3 drivers/cpufreq/cpufreq_governor.c
7 drivers/cpufreq/freq_table.c
1 drivers/cpufreq/intel_pstate.c
6 drivers/cpuidle/sysfs.c
1 drivers/dma-buf/dma-buf.c
1 drivers/dma-buf/dma-fence-chain.c
6 drivers/dma/dmaengine.c
7 drivers/firewire/init_ohci1394_dma.c
2 drivers/firmware/efi/memmap.c
1 drivers/firmware/efi/vars.c
20 drivers/gpu/drm/drm_agpsupport.c
8 drivers/hid/hid-core.c
3 drivers/hid/hid-quirks.c
5 drivers/hid/usbhid/hid-pidff.c
3 drivers/input/mouse/synaptics.c
2 drivers/iommu/amd_iommu_init.c
2 drivers/iommu/dmar.c
1 drivers/iommu/intel-pasid.c
1 drivers/iommu/iommu.c
2 drivers/leds/led-class.c
2 drivers/mailbox/pcc.c
6 drivers/net/ethernet/intel/e1000/e1000_hw.c
21 drivers/net/ethernet/intel/e1000/e1000_main.c
1 drivers/net/ethernet/intel/e1000e/80003es2lan.c
6 drivers/net/ethernet/intel/e1000e/ich8lan.c
42 drivers/net/ethernet/intel/e1000e/netdev.c
3 drivers/net/ethernet/intel/e1000e/phy.c
2 drivers/net/ethernet/intel/e1000e/ptp.c
1 drivers/net/netconsole.c
3 drivers/net/phy/mdio-boardinfo.c
2 drivers/net/phy/mdio_device.c
2 drivers/pci/ats.c
3 drivers/pci/hotplug/acpi_pcihp.c
4 drivers/pci/pcie/aer.c
2 drivers/pci/pcie/pme.c
1 drivers/pci/setup-bus.c
1 drivers/pci/vc.c
22 drivers/pcmcia/cistpl.c
13 drivers/pcmcia/pcmcia_cis.c
13 drivers/pcmcia/pcmcia_resource.c
11 drivers/pcmcia/rsrc_nonstatic.c
1 drivers/pnp/system.c
11 drivers/rtc/interface.c
3 drivers/rtc/sysfs.c
2 drivers/thermal/step_wise.c
2 drivers/thermal/user_space.c
6 drivers/tty/n_tty.c
4 drivers/tty/pty.c
7 drivers/tty/tty_audit.c
7 drivers/tty/tty_baudrate.c
13 drivers/tty/tty_buffer.c
25 drivers/tty/tty_io.c
5 drivers/tty/tty_jobctrl.c
6 drivers/tty/tty_ldisc.c
6 drivers/tty/tty_port.c
5 drivers/tty/vt/consolemap.c
4 drivers/tty/vt/vt.c
3 drivers/tty/vt/vt_ioctl.c
12 drivers/usb/common/debug.c
1 drivers/usb/host/pci-quirks.c
1 drivers/usb/host/xhci.c
6 drivers/usb/host/xhci-mem.c
2 drivers/video/backlight/backlight.c
1 drivers/video/fbdev/core/fbmon.c
2 drivers/video/fbdev/core/fb_notify.c
7 fs/devpts/inode.c
4 fs/direct-io.c
3 fs/eventpoll.c
6 fs/fat/dir.c
3 fs/fat/misc.c
6 fs/fat/nfs.c
4 fs/fs_context.c
1 fs/fs_parser.c
2 fs/fs-writeback.c
5 fs/ioctl.c
1 fs/libfs.c
3 fs/namespace.c
2 fs/nfs_common/grace.c
2 fs/open.c
3 fs/posix_acl.c
1 fs/proc/proc_net.c
2 fs/proc/vmcore.c
2 fs/read_write.c
1 fs/super.c
5 fs/xattr.c
2 kernel/cgroup/cpuset.c
1 kernel/cpu.c
4 kernel/events/core.c
2 kernel/events/hw_breakpoint.c
5 kernel/fork.c
27 kernel/irq/irqdomain.c
3 kernel/irq/matrix.c
1 kernel/kprobes.c
5 kernel/locking/rtmutex.c
1 kernel/notifier.c
3 kernel/power/main.c
2 kernel/power/qos.c
51 kernel/power/snapshot.c
2 kernel/power/suspend.c
14 kernel/power/swap.c
1 kernel/reboot.c
4 kernel/seccomp.c
2 kernel/stacktrace.c
4 kernel/time/alarmtimer.c
1 kernel/time/clockevents.c
4 kernel/time/posix-cpu-timers.c
1 kernel/time/tick-broadcast.c
6 kernel/time/tick-oneshot.c
3 kernel/time/tick-sched.c
3 kernel/time/timeconv.c
23 kernel/time/timekeeping.c
9 kernel/trace/ring_buffer.c
8 kernel/trace/trace_events_filter.c
2 kernel/trace/trace_events_trigger.c
1 kernel/trace/trace_seq.c
1 lib/argv_split.c
1 lib/cpumask.c
5 lib/genalloc.c
4 lib/iov_iter.c
2 lib/nlattr.c
3 lib/percpu_counter.c
6 lib/radix-tree.c
2 lib/scatterlist.c
3 lib/win_minmax.c
1 mm/compaction.c
2 mm/oom_kill.c
1 mm/page_vma_mapped.c
2 mm/swap_state.c
1 mm/vmalloc.c
1 mm/vmscan.c
8 net/ipv4/cipso_ipv4.c
3 net/ipv4/ipmr.c
1 net/ipv4/tcp_input.c
5 net/ipv4/tcp_output.c
2 net/ipv4/tcp_timer.c
3 net/ipv4/udp.c
4 net/ipv6/calipso.c
1 net/ipv6/exthdrs.c
1 net/ipv6/ip6_output.c
3 net/ipv6/udp.c
1 net/mac80211/tx.c
5 net/netlabel/netlabel_calipso.c
2 net/netlabel/netlabel_domainhash.c
3 net/sched/ematch.c
1 net/socket.c
1 net/wireless/radiotap.c
4 net/wireless/reg.c
6 security/commoncap.c
1 security/lsm_audit.c
12 security/selinux/avc.c
7 security/selinux/netlabel.c
2 security/selinux/netport.c
4 security/selinux/ss/mls.c
34 security/selinux/ss/services.c
3 sound/hda/hdac_bus.c
1 sound/hda/hdac_component.c
2 sound/hda/hdac_controller.c
10 sound/hda/hdac_device.c
2 sound/hda/hdac_stream.c
1 sound/pci/hda/hda_codec.c