Re: [PATCH] net: ethernet: micrel: ksz884x.c: Remove some unused functions

From: David Miller
Date: Fri Jan 02 2015 - 16:36:07 EST


From: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
Date: Thu, 1 Jan 2015 18:00:23 +0100

> Removes some functions that are not used anywhere:
> hw_w_phy_link_md() hw_r_phy_link_md() hw_w_phy_polarity()
> hw_r_phy_polarity() hw_w_phy_crossover() hw_r_phy_crossover()
> hw_r_phy_rem_cap() hw_w_phy_auto_neg() hw_r_phy_auto_neg()
> hw_r_phy_link_stat() sw_get_addr() port_chk_prio() port_chk_replace_vid()
> port_chk_802_1p() port_chk_diffserv() sw_chk_unk_def_port()
> sw_cfg_unk_def_port() sw_cfg_chk_unk_def_deliver() sw_cfg_unk_def_deliver()
> port_chk_in_filter() port_chk_dis_non_vid() port_cfg_in_filter()
> port_cfg_dis_non_vid() port_chk_rmv_tag() port_chk_ins_tag()
> port_cfg_rmv_tag() port_cfg_ins_tag() sw_flush_dyn_mac_table() port_cfg_tx()
> port_cfg_rx() port_chk_force_flow_ctrl() port_chk_back_pressure()
> port_cfg_force_flow_ctrl() port_chk_broad_storm() hw_ena_intr_bit()
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>

This causes a cascade of new warnings because now functions like
phy_chk() are unused in some configurations.

I'm really not thrilled to even review change from you of this nature
if you aren't going to be careful about attending to details like
that.

Just blindly removing functions and not looking at the context or
other potential side effects is not really acceptable.
--
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/