1. 14 12月, 2013 13 次提交
  2. 13 12月, 2013 17 次提交
  3. 12 12月, 2013 9 次提交
  4. 11 12月, 2013 1 次提交
    • S
      net: macb: Fix build warning · 9319e47c
      Soren Brinkmann 提交于
      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: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NSoren Brinkmann <soren.brinkmann@xilinx.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9319e47c