diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-07-02 18:37:40 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-07-17 11:12:33 -0400 |
commit | 0f1e54ae52b950ed79074ae794d027d6c97fd34e (patch) | |
tree | 6eb9319ab13e58b5071184b77fb30e5fed7b2449 /drivers | |
parent | e3ed2bdfc4a5dcdcdf74141e88af9990dc141a4b (diff) |
sfc: Explain why efx_mcdi_exit_assertion() ignores result of efx_mcdi_rpc()
Fix CID 113952 in Coverity report on Linux.
This is the one instance where we don't, and shouldn't, check the
return code from efx_mcdi_rpc(). It wasn't immediately obvious to me
why we didn't, so I think an explanation is in order.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index 17b6463e459c..fc5e7bbcbc9e 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c | |||
@@ -1001,12 +1001,17 @@ static void efx_mcdi_exit_assertion(struct efx_nic *efx) | |||
1001 | { | 1001 | { |
1002 | u8 inbuf[MC_CMD_REBOOT_IN_LEN]; | 1002 | u8 inbuf[MC_CMD_REBOOT_IN_LEN]; |
1003 | 1003 | ||
1004 | /* Atomically reboot the mcfw out of the assertion handler */ | 1004 | /* If the MC is running debug firmware, it might now be |
1005 | * waiting for a debugger to attach, but we just want it to | ||
1006 | * reboot. We set a flag that makes the command a no-op if it | ||
1007 | * has already done so. We don't know what return code to | ||
1008 | * expect (0 or -EIO), so ignore it. | ||
1009 | */ | ||
1005 | BUILD_BUG_ON(MC_CMD_REBOOT_OUT_LEN != 0); | 1010 | BUILD_BUG_ON(MC_CMD_REBOOT_OUT_LEN != 0); |
1006 | MCDI_SET_DWORD(inbuf, REBOOT_IN_FLAGS, | 1011 | MCDI_SET_DWORD(inbuf, REBOOT_IN_FLAGS, |
1007 | MC_CMD_REBOOT_FLAGS_AFTER_ASSERTION); | 1012 | MC_CMD_REBOOT_FLAGS_AFTER_ASSERTION); |
1008 | efx_mcdi_rpc(efx, MC_CMD_REBOOT, inbuf, MC_CMD_REBOOT_IN_LEN, | 1013 | (void) efx_mcdi_rpc(efx, MC_CMD_REBOOT, inbuf, MC_CMD_REBOOT_IN_LEN, |
1009 | NULL, 0, NULL); | 1014 | NULL, 0, NULL); |
1010 | } | 1015 | } |
1011 | 1016 | ||
1012 | int efx_mcdi_handle_assertion(struct efx_nic *efx) | 1017 | int efx_mcdi_handle_assertion(struct efx_nic *efx) |