Re: [GIT PULL] core/locking changes for v3.1

From: Ingo Molnar
Date: Mon Jul 25 2011 - 15:05:41 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Mon, Jul 25, 2011 at 3:09 AM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> >
> > Argh, I really need -Werror to even see warnings, compiler output just
> > flies by waaaaaay too fast.
>
> Do what I do:
>
> make -j32 > ../makes
>
> that way the only thing you see is the warnings (and the final link report).
>
> That pattern was one reason why I wanted me default compile to be
> warning-clean. Of course, then gcc started adding more warnings,
> and it's not clean any more ("warning: statement with no effect"
> from the fact that we just define many functions to '(0)' when they
> are disabled) but my current personal compile config only gets four
> warnings.
>
> I realize there are *many* more warnings once you start enabling
> more special code - as usual, the core code tends to be better
> quality, and the further away from that base you get, the worse
> things get.
>
> But it would definitely be good if most kernel developers did the
> above. Do it for just your personal config - at least you'll see
> the warnings in code you write (because presumably your personal
> config will have that code enabled ;)

Here is what i see on 'make defconfig' (which enables common core and
common drivers):

sound/pci/hda/patch_sigmatel.c: In function âstac92xx_initâ:
sound/pci/hda/patch_sigmatel.c:4385:3: warning: statement with no
effect [-Wunused-value]
sound/pci/hda/patch_sigmatel.c: In function âstac92xx_resumeâ:
sound/pci/hda/patch_sigmatel.c:4925:3: warning: statement with no
effect [-Wunused-value]
sound/pci/hda/patch_realtek.c: In function âalc_initâ:
sound/pci/hda/patch_realtek.c:4176:2: warning: statement with no
effect [-Wunused-value]
sound/pci/hda/patch_realtek.c: In function âalc_resumeâ:
sound/pci/hda/patch_realtek.c:4558:2: warning: statement with no
effect [-Wunused-value]
sound/pci/hda/patch_realtek.c: In function âalc269_resumeâ:
sound/pci/hda/patch_realtek.c:14878:2: warning: statement with no
effect [-Wunused-value]
net/sched/sch_generic.c: In function âdev_graft_qdiscâ:
net/sched/sch_generic.c:678:2: warning: the comparison will always
evaluate as âtrueâ for the address of ânoop_qdiscâ will never be NULL
[-Waddress]
net/netfilter/nf_conntrack_core.c: In function ânf_conntrack_initâ:
net/netfilter/nf_conntrack_core.c:1579:3: warning: the comparison
will always evaluate as âtrueâ for the address of
ânf_conntrack_attachâ will never be NULL [-Waddress]
net/netfilter/nf_conntrack_core.c:1580:3: warning: the comparison
will always evaluate as âtrueâ for the address of âdestroy_conntrackâ
will never be NULL [-Waddress]
sound/pci/hda/hda_codec.c: In function
âsnd_hda_mixer_amp_switch_putâ:
sound/pci/hda/hda_codec.c:2320:2: warning: statement with no effect
[-Wunused-value]
net/netfilter/nf_conntrack_proto.c: In function
ânf_conntrack_l3proto_unregisterâ:
net/netfilter/nf_conntrack_proto.c:210:2: warning: the comparison
will always evaluate as âtrueâ for the address of
ânf_conntrack_l3proto_genericâ will never be NULL [-Waddress]
net/netfilter/nf_conntrack_proto.c: In function
ânf_conntrack_l4proto_unregisterâ:
net/netfilter/nf_conntrack_proto.c:345:2: warning: the comparison
will always evaluate as âtrueâ for the address of
ânf_conntrack_l4proto_genericâ will never be NULL [-Waddress]
net/netfilter/nf_conntrack_proto.c: In function
ânf_conntrack_proto_initâ:
net/netfilter/nf_conntrack_proto.c:370:3: warning: the comparison
will always evaluate as âtrueâ for the address of
ânf_conntrack_l3proto_genericâ will never be NULL [-Waddress]
drivers/md/dm.c: In function âsplit_bvecâ:
drivers/md/dm.c:1052:3: warning: statement with no effect
[-Wunused-value]
drivers/md/dm.c: In function âclone_bioâ:
drivers/md/dm.c:1079:3: warning: statement with no effect
[-Wunused-value]
drivers/md/dm-table.c: In function âdm_table_set_integrityâ:
drivers/md/dm-table.c:1193:2: warning: statement with no effect
[-Wunused-value]
net/ipv4/netfilter/nf_nat_standalone.c: In function
ânf_nat_standalone_initâ:
net/ipv4/netfilter/nf_nat_standalone.c:287:2: warning: the comparison
will always evaluate as âtrueâ for the address of
ânat_decode_sessionâ will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_core.c: In function
ânf_nat_protocol_unregisterâ:
net/ipv4/netfilter/nf_nat_core.c:528:2: warning: the comparison will
always evaluate as âtrueâ for the address of
ânf_nat_unknown_protocolâ will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_core.c: In function ânf_nat_initâ:
net/ipv4/netfilter/nf_nat_core.c:739:3: warning: the comparison will
always evaluate as âtrueâ for the address of
ânf_nat_unknown_protocolâ will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_core.c:740:2: warning: the comparison will
always evaluate as âtrueâ for the address of ânf_nat_protocol_tcpâ
will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_core.c:741:2: warning: the comparison will
always evaluate as âtrueâ for the address of ânf_nat_protocol_udpâ
will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_core.c:742:2: warning: the comparison will
always evaluate as âtrueâ for the address of ânf_nat_protocol_icmpâ
will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_core.c:751:2: warning: the comparison will
always evaluate as âtrueâ for the address of ânf_nat_seq_adjustâ will
never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_core.c:753:2: warning: the comparison will
always evaluate as âtrueâ for the address of
ânfnetlink_parse_nat_setupâ will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_core.c:756:2: warning: the comparison will
always evaluate as âtrueâ for the address of ânf_nat_get_offsetâ will
never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_ftp.c: In function ânf_nat_ftp_initâ:
net/ipv4/netfilter/nf_nat_ftp.c:123:2: warning: the comparison will
always evaluate as âtrueâ for the address of ânf_nat_ftpâ will never
be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_irc.c: In function ânf_nat_irc_initâ:
net/ipv4/netfilter/nf_nat_irc.c:85:2: warning: the comparison will
always evaluate as âtrueâ for the address of âhelpâ will never be
NULL [-Waddress]
In file included from drivers/usb/host/ohci-hcd.c:101:0:
drivers/usb/host/ohci-dbg.c: In function âfill_registers_bufferâ:
drivers/usb/host/ohci-dbg.c:642:2: warning: the comparison will
always evaluate as âtrueâ for the address of ânextâ will never be
NULL [-Waddress]
drivers/usb/host/ohci-dbg.c:661:3: warning: the comparison will
always evaluate as âtrueâ for the address of ânextâ will never be
NULL [-Waddress]
net/ipv4/netfilter/nf_nat_sip.c: In function ânf_nat_sip_initâ:
net/ipv4/netfilter/nf_nat_sip.c:550:2: warning: the comparison will
always evaluate as âtrueâ for the address of âip_nat_sipâ will never
be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_sip.c:551:2: warning: the comparison will
always evaluate as âtrueâ for the address of âip_nat_sip_seq_adjustâ
will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_sip.c:552:2: warning: the comparison will
always evaluate as âtrueâ for the address of âip_nat_sip_expectâ will
never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_sip.c:553:2: warning: the comparison will
always evaluate as âtrueâ for the address of âip_nat_sdp_addrâ will
never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_sip.c:554:2: warning: the comparison will
always evaluate as âtrueâ for the address of âip_nat_sdp_portâ will
never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_sip.c:555:2: warning: the comparison will
always evaluate as âtrueâ for the address of âip_nat_sdp_sessionâ
will never be NULL [-Waddress]
net/ipv4/netfilter/nf_nat_sip.c:556:2: warning: the comparison will
always evaluate as âtrueâ for the address of âip_nat_sdp_mediaâ will
never be NULL [-Waddress]
Setup is 15260 bytes (padded to 15360 bytes).
System is 4654 kB
CRC 43bdb86

Not pretty :-/

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/