提交 ad3a9ee0 编写于 作者: M Mao Wenan 提交者: David S. Miller

ocelot: remove unused variable 'rc' in vcap_cmd()

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/mscc/ocelot_ace.c: In function ‘vcap_cmd’:
drivers/net/ethernet/mscc/ocelot_ace.c:108:6: warning: variable ‘rc’ set
but not used [-Wunused-but-set-variable]
  int rc;
      ^
It's never used since introduction in commit b5962294 ("net: mscc:
ocelot: Add support for tcam")
Signed-off-by: NMao Wenan <maowenan@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c67b8555
...@@ -105,7 +105,6 @@ static void vcap_cmd(struct ocelot *oc, u16 ix, int cmd, int sel) ...@@ -105,7 +105,6 @@ static void vcap_cmd(struct ocelot *oc, u16 ix, int cmd, int sel)
u32 value = (S2_CORE_UPDATE_CTRL_UPDATE_CMD(cmd) | u32 value = (S2_CORE_UPDATE_CTRL_UPDATE_CMD(cmd) |
S2_CORE_UPDATE_CTRL_UPDATE_ADDR(ix) | S2_CORE_UPDATE_CTRL_UPDATE_ADDR(ix) |
S2_CORE_UPDATE_CTRL_UPDATE_SHOT); S2_CORE_UPDATE_CTRL_UPDATE_SHOT);
int rc;
if ((sel & VCAP_SEL_ENTRY) && ix >= vcap_is2.entry_count) if ((sel & VCAP_SEL_ENTRY) && ix >= vcap_is2.entry_count)
return; return;
...@@ -120,7 +119,7 @@ static void vcap_cmd(struct ocelot *oc, u16 ix, int cmd, int sel) ...@@ -120,7 +119,7 @@ static void vcap_cmd(struct ocelot *oc, u16 ix, int cmd, int sel)
value |= S2_CORE_UPDATE_CTRL_UPDATE_CNT_DIS; value |= S2_CORE_UPDATE_CTRL_UPDATE_CNT_DIS;
ocelot_write(oc, value, S2_CORE_UPDATE_CTRL); ocelot_write(oc, value, S2_CORE_UPDATE_CTRL);
rc = readx_poll_timeout(vcap_s2_read_update_ctrl, oc, value, readx_poll_timeout(vcap_s2_read_update_ctrl, oc, value,
(value & S2_CORE_UPDATE_CTRL_UPDATE_SHOT) == 0, (value & S2_CORE_UPDATE_CTRL_UPDATE_SHOT) == 0,
10, 100000); 10, 100000);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册