All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Nathan Chancellor <nathan@kernel.org>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Gurucharan G <gurucharanx.g@intel.com>
Subject: [PATCH net-next 8/9] ice: Fix clang -Wimplicit-fallthrough in ice_pull_qvec_from_rc()
Date: Thu, 28 Oct 2021 11:06:58 -0700	[thread overview]
Message-ID: <20211028180659.218912-9-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20211028180659.218912-1-anthony.l.nguyen@intel.com>

From: Nathan Chancellor <nathan@kernel.org>

Clang warns:

drivers/net/ethernet/intel/ice/ice_lib.c:1906:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        default:
        ^
drivers/net/ethernet/intel/ice/ice_lib.c:1906:2: note: insert 'break;' to avoid fall-through
        default:
        ^
        break;
1 error generated.

Clang is a little more pedantic than GCC, which does not warn when
falling through to a case that is just break or return. Clang's version
is more in line with the kernel's own stance in deprecated.rst, which
states that all switch/case blocks must end in either break,
fallthrough, continue, goto, or return. Add the missing break to silence
the warning.

Link: https://github.com/ClangBuiltLinux/linux/issues/1482
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 77dceab9fbbe..159c52b9b9d4 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1983,6 +1983,7 @@ static struct ice_q_vector *ice_pull_qvec_from_rc(struct ice_ring_container *rc)
 	case ICE_TX_CONTAINER:
 		if (rc->tx_ring)
 			return rc->tx_ring->q_vector;
+		break;
 	default:
 		break;
 	}
-- 
2.31.1


  parent reply	other threads:[~2021-10-28 18:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 18:06 [PATCH net-next 0/9][pull request] 100GbE Intel Wired LAN Driver Updates 2021-10-28 Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 1/9] ice: support for indirect notification Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 2/9] ice: VXLAN and Geneve TC support Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 3/9] ice: low level support for tunnels Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 4/9] ice: support for GRE in eswitch Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 5/9] ice: send correct vc status in switchdev Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 6/9] ice: Add support for changing MTU on PR in switchdev mode Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 7/9] ice: Add support to print error on PHY FW load failure Tony Nguyen
2021-10-28 18:06 ` Tony Nguyen [this message]
2021-10-28 18:06 ` [PATCH net-next 9/9] ice: fix error return code in ice_get_recp_frm_fw() Tony Nguyen
2021-10-29 12:10 ` [PATCH net-next 0/9][pull request] 100GbE Intel Wired LAN Driver Updates 2021-10-28 patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211028180659.218912-9-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=gurucharanx.g@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=nathan@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.