* Re: [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs
From: David Miller @ 2018-08-08 0:59 UTC (permalink / raw)
To: gustavo
Cc: netdev, linux-kernel, linux-net-drivers, ecree, bkenward, jes,
linux-acenic, michael.chan, nicolas.ferre, derek.chickles,
satananda.burla, felix.manlunas, raghu.vatsavayi, ganeshgr,
santosh, sgoutham, rric, linux-arm-kernel, linux-parisc,
sathya.perla, ajit.khaparde, sriharsha.basavapatna, somnath.kotur,
yisen.zhuang, salil.mehta, jeffrey.t.kirsher, intel-wired-lan,
tariqt, l
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Tue, 7 Aug 2018 18:09:00 -0500
> In preparation to enabling -Wimplicit-fallthrough, this patchset aims
> to add some annotations in order to mark switch cases where we are
> expecting to fall through.
Ok, I went through all of these and they look good.
If any are not correct we can revert/fix.
Series applied, thanks.
^ permalink raw reply
* Re: [RFC] spi: add spi multiplexing functions for dt
From: Ben Whitten @ 2018-08-07 22:03 UTC (permalink / raw)
To: Andreas Färber; +Cc: 潘建宏, hasnain.virk, netdev
In-Reply-To: <89395911-b928-6af8-f6a7-7b1d5ac6b701@suse.de>
On Tue, 7 Aug 2018 at 22:17, Andreas Färber <afaerber@suse.de> wrote:
>
> Hi Ben,
>
> Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> > Like I2C busses SPI devices can also sit behind multiplexers.
> > This patch adds is based off the I2C implementation and allows
> > description in the devicetree.
> >
> > Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
> > ---
> > drivers/spi/Kconfig | 10 +++
> > drivers/spi/Makefile | 3 +
> > drivers/spi/spi-mux.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++
> > include/linux/spi-mux.h | 55 +++++++++++++++
> > 4 files changed, 249 insertions(+)
> > create mode 100644 drivers/spi/spi-mux.c
> > create mode 100644 include/linux/spi-mux.h
>
> Did this get sent by mistake? It needs to go to linux-spi list and
> maintainers.
It certainly did, didn't spot it in my outgoing patches directory.
Please disregard, sorry for the noise.
> Tip: git config sendemail.cccmd "scripts/get_maintainer.pl
> --nogit-fallback --norolestats"
Thanks for the tip
Cheers,
Ben
^ permalink raw reply
* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
From: Jason A. Donenfeld @ 2018-08-07 23:48 UTC (permalink / raw)
To: Andy Lutomirski
Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
Linux Crypto Mailing List, LKML, Netdev, David Miller,
Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
Karthikeyan Bhargavan
In-Reply-To: <CALCETrWo-vCt_bHMBPAEHEr3P4=AJq-95Bf=00aAEAcE839wLw@mail.gmail.com>
Hey Andy,
On Tue, Aug 7, 2018 at 12:43 PM Andy Lutomirski <luto@amacapital.net> wrote:
> For "zinc: add simd helper", I think it should be in include/linux,
> and include/linux/simd.h should (immediately or maybe in the future)
> include <asm/simd.h> to pick up arch-specific stuff. And the patch
> should get sent to linux-arch@vger.kernel.org.
I guess you saw my prompt about that in the previous commit message?
Based on your encouragement, I implemented it:
https://git.zx2c4.com/linux-dev/commit/?h=simd This is _far_ more
invasive than I wanted to be, as I don't want this patch submission to
grow unwieldy and never be merged, but I guess we can roll with this
for now...
> In your blake2s_arch() implementation, you're not passing in a
> simd_context_t. Is that still a work in progress? I thought the plan
> was to pass it in rather than doing the check in the _arch()
> functions.
I'm inclined to do the explicit context passing only when a function
is likely to be used in that kind of environment, and adjust as
needed. Long term, anyway, that API will be removed once the x86 guys
figure out lazy FPU restoration and the amortization doesn't add
anything.
Jason
^ permalink raw reply
* Re: [PATCH lora-next 02/10] net: lora: add methods for devm registration
From: Andreas Färber @ 2018-08-07 21:25 UTC (permalink / raw)
To: Ben Whitten; +Cc: starnight, hasnain.virk, netdev, Ben Whitten
In-Reply-To: <1533663131-16313-4-git-send-email-ben.whitten@gmail.com>
Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> From: Ben Whitten <ben.whitten@lairdtech.com>
>
> Follow the devm model so that we can avoid lengthy unwind code.
>
> Signed-off-by: Ben Whitten <ben.whitten@lairdtech.com>
> ---
> drivers/net/lora/dev.c | 20 ++++++++++++++++++++
> include/linux/lora/dev.h | 1 +
> 2 files changed, 21 insertions(+)
>
> diff --git a/drivers/net/lora/dev.c b/drivers/net/lora/dev.c
> index 8c01106..69a8b52 100644
> --- a/drivers/net/lora/dev.c
> +++ b/drivers/net/lora/dev.c
> @@ -84,6 +84,26 @@ void free_loradev(struct net_device *dev)
> }
> EXPORT_SYMBOL_GPL(free_loradev);
>
> +static void devm_lora_unregister(struct device *dev, void *res)
> +{
> + free_loradev(*(struct net_device **)res);
Suggest to use a variable.
> +}
> +
> +int devm_lora_register_netdev(struct device *dev, struct net_device *net)
Nice idea, but why a separate registration function? Suggest to instead
introduce devm_alloc_loradev(). If you then reorder those two patches to
the front of the series, I'll queue them immediately.
Thanks,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply
* Re: [RFC] spi: add spi multiplexing functions for dt
From: Andreas Färber @ 2018-08-07 21:17 UTC (permalink / raw)
To: Ben Whitten; +Cc: starnight, hasnain.virk, netdev
In-Reply-To: <1533663131-16313-3-git-send-email-ben.whitten@gmail.com>
Hi Ben,
Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> Like I2C busses SPI devices can also sit behind multiplexers.
> This patch adds is based off the I2C implementation and allows
> description in the devicetree.
>
> Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
> ---
> drivers/spi/Kconfig | 10 +++
> drivers/spi/Makefile | 3 +
> drivers/spi/spi-mux.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++
> include/linux/spi-mux.h | 55 +++++++++++++++
> 4 files changed, 249 insertions(+)
> create mode 100644 drivers/spi/spi-mux.c
> create mode 100644 include/linux/spi-mux.h
Did this get sent by mistake? It needs to go to linux-spi list and
maintainers.
Tip: git config sendemail.cccmd "scripts/get_maintainer.pl
--nogit-fallback --norolestats"
Cheers,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply
* [PATCH 33/33] net: ethernet: ti: cpts: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:32 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114813 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/ti/cpts.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index b4ea58d..b96b93c 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -161,6 +161,7 @@ static int cpts_fifo_read(struct cpts *cpts, int match)
*/
break;
}
+ /* fall through */
case CPTS_EV_PUSH:
case CPTS_EV_RX:
list_del_init(&event->list);
--
2.7.4
^ permalink raw reply related
* [PATCH 32/33] net: tlan: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:31 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Samuel Chessman
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 141440 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/ti/tlan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index c769cd9..93d1428 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -966,6 +966,7 @@ static int tlan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
switch (cmd) {
case SIOCGMIIPHY: /* get address of MII PHY in use. */
data->phy_id = phy;
+ /* fall through */
case SIOCGMIIREG: /* read MII PHY register. */
--
2.7.4
^ permalink raw reply related
* [PATCH 31/33] net: sfc: falcon: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:31 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Solarflare linux maintainers, Edward Cree, Bert Kenward
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1384500 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/sfc/falcon/ethtool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/sfc/falcon/ethtool.c b/drivers/net/ethernet/sfc/falcon/ethtool.c
index 5604915..1ccdb7a 100644
--- a/drivers/net/ethernet/sfc/falcon/ethtool.c
+++ b/drivers/net/ethernet/sfc/falcon/ethtool.c
@@ -963,6 +963,7 @@ ef4_ethtool_get_rxnfc(struct net_device *net_dev,
switch (info->flow_type) {
case TCP_V4_FLOW:
info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+ /* Fall through */
case UDP_V4_FLOW:
case SCTP_V4_FLOW:
case AH_ESP_V4_FLOW:
--
2.7.4
^ permalink raw reply related
* [PATCH 30/33] net: ethernet: sxgbe: mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:30 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Byungho An, Girish K S, Vipul Pandya
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1357414 ("Missing break in switch")
Addresses-Coverity-ID: 1357415 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
index 542b67d..c9aad0e 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
@@ -319,6 +319,7 @@ static int sxgbe_get_rss_hash_opts(struct sxgbe_priv_data *priv,
case TCP_V4_FLOW:
case UDP_V4_FLOW:
cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+ /* Fall through */
case SCTP_V4_FLOW:
case AH_ESP_V4_FLOW:
case AH_V4_FLOW:
@@ -329,6 +330,7 @@ static int sxgbe_get_rss_hash_opts(struct sxgbe_priv_data *priv,
case TCP_V6_FLOW:
case UDP_V6_FLOW:
cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+ /* Fall through */
case SCTP_V6_FLOW:
case AH_ESP_V6_FLOW:
case AH_V6_FLOW:
--
2.7.4
^ permalink raw reply related
* [PATCH 29/33] qlge: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:29 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Harish Patil, Manish Chopra, Dept-GELinuxNICDev
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114811 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/qlogic/qlge/qlge_mpi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
index 4be65d6..957c729 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
@@ -1176,6 +1176,7 @@ void ql_mpi_idc_work(struct work_struct *work)
case MB_CMD_PORT_RESET:
case MB_CMD_STOP_FW:
ql_link_off(qdev);
+ /* Fall through */
case MB_CMD_SET_PORT_CFG:
/* Signal the resulting link up AEN
* that the frame routing and mac addr
--
2.7.4
^ permalink raw reply related
* [PATCH 28/33] qlcnic: Mark expected switch fall-througs
From: Gustavo A. R. Silva @ 2018-08-07 23:28 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Harish Patil, Manish Chopra, Dept-GELinuxNICDev
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1410181 ("Missing break in switch")
Addresses-Coverity-ID: 1410184 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 7f7deea..3b0adda 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -351,9 +351,9 @@ static int qlcnic_82xx_get_link_ksettings(struct qlcnic_adapter *adapter,
case QLCNIC_BRDTYPE_P3P_REF_QG:
case QLCNIC_BRDTYPE_P3P_4_GB:
case QLCNIC_BRDTYPE_P3P_4_GB_MM:
-
supported |= SUPPORTED_Autoneg;
advertising |= ADVERTISED_Autoneg;
+ /* fall through */
case QLCNIC_BRDTYPE_P3P_10G_CX4:
case QLCNIC_BRDTYPE_P3P_10G_CX4_LP:
case QLCNIC_BRDTYPE_P3P_10000_BASE_T:
@@ -377,6 +377,7 @@ static int qlcnic_82xx_get_link_ksettings(struct qlcnic_adapter *adapter,
supported |= SUPPORTED_TP;
check_sfp_module = netif_running(adapter->netdev) &&
ahw->has_link_events;
+ /* fall through */
case QLCNIC_BRDTYPE_P3P_10G_XFP:
supported |= SUPPORTED_FIBRE;
advertising |= ADVERTISED_FIBRE;
--
2.7.4
^ permalink raw reply related
* [PATCH 26/33] netxen_nic: Mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:26 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Manish Chopra, Rahul Verma, Dept-GELinuxNICDev
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1410182 ("Missing break in switch")
Addresses-Coverity-ID: 1410183 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
index 3157f97..3c1be87 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
@@ -167,9 +167,9 @@ netxen_nic_get_link_ksettings(struct net_device *dev,
case NETXEN_BRDTYPE_P3_REF_QG:
case NETXEN_BRDTYPE_P3_4_GB:
case NETXEN_BRDTYPE_P3_4_GB_MM:
-
supported |= SUPPORTED_Autoneg;
advertising |= ADVERTISED_Autoneg;
+ /* fall through */
case NETXEN_BRDTYPE_P2_SB31_10G_CX4:
case NETXEN_BRDTYPE_P3_10G_CX4:
case NETXEN_BRDTYPE_P3_10G_CX4_LP:
@@ -198,6 +198,7 @@ netxen_nic_get_link_ksettings(struct net_device *dev,
supported |= SUPPORTED_TP;
check_sfp_module = netif_running(dev) &&
adapter->has_link_events;
+ /* fall through */
case NETXEN_BRDTYPE_P2_SB31_10G:
case NETXEN_BRDTYPE_P3_10G_XFP:
supported |= SUPPORTED_FIBRE;
--
2.7.4
^ permalink raw reply related
* [PATCH 25/33] qed: qed_dev: Mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:25 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Ariel Elior, everest-linux-l2
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that in this particular case, I replaced the code comments with
a proper "fall through" annotation, which is what GCC is expecting
to find.
Addresses-Coverity-ID: 114809 ("Missing break in switch")
Addresses-Coverity-ID: 114810 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 6a0b46f..2f42df3 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -1709,14 +1709,14 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params)
p_hwfn->hw_info.hw_mode);
if (rc)
break;
- /* Fall into */
+ /* Fall through */
case FW_MSG_CODE_DRV_LOAD_PORT:
rc = qed_hw_init_port(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn->hw_info.hw_mode);
if (rc)
break;
- /* Fall into */
+ /* Fall through */
case FW_MSG_CODE_DRV_LOAD_FUNCTION:
rc = qed_hw_init_pf(p_hwfn, p_hwfn->p_main_ptt,
p_params->p_tunn,
--
2.7.4
^ permalink raw reply related
* [PATCH 24/33] net/mlx5e: Mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:25 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Saeed Mahameed, Leon Romanovsky, linux-rdma
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114808 ("Missing break in switch")
Addresses-Coverity-ID: 114802 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
index 1881468..ad6d471 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
@@ -91,9 +91,11 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di,
return true;
default:
bpf_warn_invalid_xdp_action(act);
+ /* fall through */
case XDP_ABORTED:
xdp_abort:
trace_xdp_exception(rq->netdev, prog, act);
+ /* fall through */
case XDP_DROP:
rq->stats->xdp_drop++;
return true;
--
2.7.4
^ permalink raw reply related
* [PATCH 23/33] vxge: Mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:24 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Jon Mason
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114796 ("Missing break in switch")
Addresses-Coverity-ID: 114804 ("Missing break in switch")
Addresses-Coverity-ID: 114806 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/neterion/vxge/vxge-config.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
index a2c0a93..ae81498 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c
@@ -3783,17 +3783,20 @@ vxge_hw_rts_rth_data0_data1_get(u32 j, u64 *data0, u64 *data1,
VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM0_ENTRY_EN |
VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM0_BUCKET_DATA(
itable[j]);
+ /* fall through */
case 2:
*data0 |=
VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM1_BUCKET_NUM(j)|
VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM1_ENTRY_EN |
VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM1_BUCKET_DATA(
itable[j]);
+ /* fall through */
case 3:
*data1 = VXGE_HW_RTS_ACCESS_STEER_DATA1_RTH_ITEM0_BUCKET_NUM(j)|
VXGE_HW_RTS_ACCESS_STEER_DATA1_RTH_ITEM0_ENTRY_EN |
VXGE_HW_RTS_ACCESS_STEER_DATA1_RTH_ITEM0_BUCKET_DATA(
itable[j]);
+ /* fall through */
case 4:
*data1 |=
VXGE_HW_RTS_ACCESS_STEER_DATA1_RTH_ITEM1_BUCKET_NUM(j)|
--
2.7.4
^ permalink raw reply related
* Re: possible deadlock in rds_wake_sk_sleep
From: Sowmini Varadhan @ 2018-08-07 21:07 UTC (permalink / raw)
To: syzbot
Cc: davem, linux-kernel, linux-rdma, netdev, rds-devel,
santosh.shilimkar, syzkaller-bugs
In-Reply-To: <000000000000fb5cd90572de7ebd@google.com>
On (08/07/18 13:47), syzbot wrote:
> Possible unsafe locking scenario:
>
> CPU0 CPU1
> ---- ----
> lock(&(&rm->m_rs_lock)->rlock);
> lock(&rs->rs_recv_lock);
> lock(&(&rm->m_rs_lock)->rlock);
> lock(&rs->rs_recv_lock);
>
> *** DEADLOCK ***
looks like a valid find, I think the deadlock should be avoided
by having rds_clear_recv_queue do something like
get rs_recv_lock
un-tether the rs_recv_queue into a temporary list
releease rs_recv_lock
purge the rds_incoming temporary list
I can give this a shot later this week.
--Sowmini
^ permalink raw reply
* [PATCH 19/33] igb_main: Mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:22 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Jeff Kirsher, intel-wired-lan
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 200521 ("Missing break in switch")
Addresses-Coverity-ID: 114797 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 636d805..d03c2f0 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -5175,6 +5175,7 @@ bool igb_has_link(struct igb_adapter *adapter)
case e1000_media_type_copper:
if (!hw->mac.get_link_status)
return true;
+ /* fall through */
case e1000_media_type_internal_serdes:
hw->mac.ops.check_for_link(hw);
link_active = !hw->mac.get_link_status;
@@ -5835,6 +5836,7 @@ static void igb_tx_csum(struct igb_ring *tx_ring, struct igb_tx_buffer *first)
type_tucmd = E1000_ADVTXD_TUCMD_L4T_SCTP;
break;
}
+ /* fall through */
default:
skb_checksum_help(skb);
goto csum_failed;
--
2.7.4
^ permalink raw reply related
* [PATCH 17/33] net/mlx4/mcg: Mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:21 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Tariq Toukan, linux-rdma
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114792 ("Missing break in switch")
Addresses-Coverity-ID: 114793 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/mellanox/mlx4/mcg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index 4c5306d..ffed2d4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -1412,6 +1412,7 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
case MLX4_STEERING_MODE_A0:
if (prot == MLX4_PROT_ETH)
return 0;
+ /* fall through */
case MLX4_STEERING_MODE_B0:
if (prot == MLX4_PROT_ETH)
@@ -1441,6 +1442,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
case MLX4_STEERING_MODE_A0:
if (prot == MLX4_PROT_ETH)
return 0;
+ /* fall through */
case MLX4_STEERING_MODE_B0:
if (prot == MLX4_PROT_ETH)
--
2.7.4
^ permalink raw reply related
* Re: [RFC bpf-next v2 3/3] docs: Split filter.txt into separate documents.
From: Tobin C. Harding @ 2018-08-07 23:19 UTC (permalink / raw)
To: Jonathan Corbet
Cc: Daniel Borkmann, Alexei Starovoitov, David S. Miller, linux-doc,
netdev, linux-kernel
In-Reply-To: <20180807071405.58d38277@lwn.net>
On Tue, Aug 07, 2018 at 07:14:05AM -0600, Jonathan Corbet wrote:
> On Tue, 7 Aug 2018 12:48:44 +1000
> "Tobin C. Harding" <me@tobin.cc> wrote:
>
> > How about these steps:
> >
> > 1. start with foo.txt
> > 2. do typo and grammar fixes (any number of patches).
> > 3. rename to foo.rst, do whitespace changes, code snippet
> > indentation, heading adornments, update references to this file.
> > (single patch).
> > 4. Fix up references in the file text to use RST (i.e :ref: blah)
> > 5. Fix up RST markers (backticks etc). (any number of patches)
>
> That can certainly work; just don't call it foo.rst until it actually is a
> valid RST file.
>
> And, of course, go easy with the later steps and try to avoid the
> temptation to mark up everything; we really want to preserve the
> readability of the plain-text files.
Yeah I get over zealous sometimes, I'll keep it in mind.
What is the current view on references embedded in the text versus a
local label with the full reference at the bottom of the file. I've
seen both and do not know which is _more_ readable?
1. some random text referencing
:ref:`Documentation/path/to/file.rst <label>` and more text
2. some random text referencing `file`_ and more text
...
.. Links
.. _file path/to/file.rst:
Although the later form is found in Documentation/ it does not seem work
for local build (since the path is relative) or am I doing something
wrong with my local build?
And for the first form I could not get the html link produced to work if
the <label> was omitted - this label seems superfluous if it is to the
top of the file (I've already added a couple of such labels).
These are minor issues, answer only if and when you have time.
thanks,
Tobin.
^ permalink raw reply
* [PATCH 12/33] be2net: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:17 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Sathya Perla, Ajit Khaparde, Sriharsha Basavapatna, Somnath Kotur
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114787 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/emulex/benet/be_ethtool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index 7f7e206..3f6749f 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -575,6 +575,7 @@ static u32 convert_to_et_setting(struct be_adapter *adapter, u32 if_speeds)
break;
}
}
+ /* fall through */
case PHY_TYPE_SFP_PLUS_10GB:
case PHY_TYPE_XFP_10GB:
case PHY_TYPE_SFP_1GB:
--
2.7.4
^ permalink raw reply related
* [PATCH 10/33] net: tulip_core: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:15 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: linux-parisc
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114782 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/dec/tulip/tulip_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c
index 00d02a0..3e3e086 100644
--- a/drivers/net/ethernet/dec/tulip/tulip_core.c
+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c
@@ -923,6 +923,7 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
data->phy_id = 1;
else
return -ENODEV;
+ /* Fall through */
case SIOCGMIIREG: /* Read MII PHY register. */
if (data->phy_id == 32 && (tp->flags & HAS_NWAY)) {
--
2.7.4
^ permalink raw reply related
* [PATCH 08/33] cxgb3/l2t: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:14 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Santosh Raspatur
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114780 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/chelsio/cxgb3/l2t.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/chelsio/cxgb3/l2t.c b/drivers/net/ethernet/chelsio/cxgb3/l2t.c
index 248e40c..0e9182d 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/l2t.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/l2t.c
@@ -136,6 +136,7 @@ int t3_l2t_send_slow(struct t3cdev *dev, struct sk_buff *skb,
if (e->state == L2T_STATE_STALE)
e->state = L2T_STATE_VALID;
spin_unlock_bh(&e->lock);
+ /* fall through */
case L2T_STATE_VALID: /* fast-path, send the packet on */
return cxgb3_ofld_send(dev, skb);
case L2T_STATE_RESOLVING:
--
2.7.4
^ permalink raw reply related
* [PATCH 01/33] 8390: axnet_cs: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:09 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114889 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/8390/axnet_cs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/8390/axnet_cs.c b/drivers/net/ethernet/8390/axnet_cs.c
index d422a12..0b6bbf6 100644
--- a/drivers/net/ethernet/8390/axnet_cs.c
+++ b/drivers/net/ethernet/8390/axnet_cs.c
@@ -610,6 +610,7 @@ static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
switch (cmd) {
case SIOCGMIIPHY:
data->phy_id = info->phy_id;
+ /* Fall through */
case SIOCGMIIREG: /* Read MII PHY register. */
data->val_out = mdio_read(mii_addr, data->phy_id, data->reg_num & 0x1f);
return 0;
--
2.7.4
^ permalink raw reply related
* [PATCH wireless-drivers] mt76x0: Remove VLA usage
From: Kees Cook @ 2018-08-07 22:50 UTC (permalink / raw)
To: Kalle Valo
Cc: Stanislaw Gruszka, David S. Miller,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Even with "const" variables, the compiler will generate warnings about
VLA usage. In the quest to remove all VLAs from the kernel[1], this uses
a #define instead of a const to do the array sizing.
[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Fixes: e87b5039511a ("mt76x0: eeprom files")
Signed-off-by: Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
Please include this for the v4.19 merge window. The VLA was introduced
with the new source file (which I also note is missing a SPDX line), so
I'd like to avoid the kernel ever getting released with a VLA here.
---
drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c
index 1ecd018f12b8..af2fd6a1bb44 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c
@@ -81,15 +81,15 @@ mt76x0_efuse_read(struct mt76x0_dev *dev, u16 addr, u8 *data,
return 0;
}
+#define MT_MAP_READS DIV_ROUND_UP(MT_EFUSE_USAGE_MAP_SIZE, 16)
static int
mt76x0_efuse_physical_size_check(struct mt76x0_dev *dev)
{
- const int map_reads = DIV_ROUND_UP(MT_EFUSE_USAGE_MAP_SIZE, 16);
- u8 data[map_reads * 16];
+ u8 data[MT_MAP_READS * 16];
int ret, i;
u32 start = 0, end = 0, cnt_free;
- for (i = 0; i < map_reads; i++) {
+ for (i = 0; i < MT_MAP_READS; i++) {
ret = mt76x0_efuse_read(dev, MT_EE_USAGE_MAP_START + i * 16,
data + i * 16, MT_EE_PHYSICAL_READ);
if (ret)
--
2.17.1
--
Kees Cook
Pixel Security
^ permalink raw reply related
* Re: [PATCH 0/3] Add Broadcom Omega SoC internal switch and phy
From: David Miller @ 2018-08-07 22:49 UTC (permalink / raw)
To: andrew
Cc: arun.parameswaran, f.fainelli, vivien.didelot, robh+dt,
mark.rutland, netdev, devicetree, linux-kernel,
bcm-kernel-feedback-list
In-Reply-To: <20180807180827.GH18350@lunn.ch>
From: Andrew Lunn <andrew@lunn.ch>
Date: Tue, 7 Aug 2018 20:08:27 +0200
> On Tue, Aug 07, 2018 at 10:02:41AM -0700, Arun Parameswaran wrote:
>> Hi,
>>
>> The patchset is based on David Miller's "net-next" repo.
>>
>> The patches add support for the Broadcom Omega SoC's internal ethernet
>> switch and the internal gphy.
>>
>> The internal ethernet switch in the Omega is a b53 srab based switch.
>> The support for the switch is added to the b53 driver in the dsa
>> framework.
>>
>> The gphy support is added to the bcm7xxx driver.
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Series applied.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox