aboutsummaryrefslogtreecommitdiff
path: root/mm/swap.c
diff options
context:
space:
mode:
authorSoren Brinkmann2013-12-10 20:57:57 -0800
committerDavid S. Miller2013-12-11 00:19:17 -0500
commit9319e47c18c41f2748c4140b0ac32097a56f36c1 (patch)
treeccad60e27e3a1ecdd84785f4f26d201fef56fdaf /mm/swap.c
parentfcfa1a1722722de0d6c125723d1772780525a19a (diff)
net: macb: Fix build warning
When adjusting the link speed, the target frequency is determined by a 'swith (LINK_SPEED)' statement, that assigns the target rate only for valid and expected LINK_SPEED values. This incomplete switch statement leads to the following build warning: drivers/net/ethernet/cadence/macb.c: In function 'macb_handle_link_change': >> drivers/net/ethernet/cadence/macb.c:241:14: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized] netdev_warn(dev, "unable to generate target frequency: %ld Hz\n", ^ drivers/net/ethernet/cadence/macb.c:215:13: note: 'rate' was declared here long ferr, rate, rate_rounded; Fixing this by bailing out of that function in the switch's default case before the rate variable is used. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/swap.c')
0 files changed, 0 insertions, 0 deletions