[PATCH net-next] packet: remove handling of tx_ring from prb_shutdown_retire_blk_timer()

2015-07-28 Thread Tobias Klauser
Follow e8e85cc5eb57 (packet: remove handling of tx_ring) and remove the tx_ring parameter from prb_shutdown_retire_blk_timer() as it is only called with tx_ring = 0. Signed-off-by: Tobias Klauser tklau...@distanz.ch --- net/packet/af_packet.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH] net: eth: altera: Remove sgdmadesclen member from altera_tse_private

2015-08-10 Thread Tobias Klauser
altera_tse_private-sgdmadesclen is always assigned assigned the same value and never changes during runtime. Remove the struct member and use a new define for sizeof(struct sgdma_descrip) instead. Signed-off-by: Tobias Klauser tklau...@distanz.ch --- drivers/net/ethernet/altera/altera_sgdma.c

Re: [RFC] bmac:change to use bitrev8() generic function

2015-08-10 Thread Tobias Klauser
On 2015-08-10 at 11:53:41 +0200, yalin wang yalin.wang2...@gmail.com wrote: This change to use generic bitrev8() for bmac driver. Signed-off-by: yalin wang yalin.wang2...@gmail.com --- drivers/net/ethernet/apple/bmac.c | 17 +++-- 1 file changed, 3 insertions(+), 14

[PATCH net] tun_dst: Fix potential NULL dereference

2015-11-04 Thread Tobias Klauser
n B Shelar <pshe...@nicira.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- include/net/dst_metadata.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/dst_metadata.h b/include/net/dst_metadata.h index ce00971..6816f0f 100644 --- a/include/ne

Re: [PATCH net-next 0/4] tcp: better smp listener behavior

2015-10-13 Thread Tobias Klauser
On 2015-10-13 at 11:28:13 +0200, Daniel Borkmann <dan...@iogearbox.net> wrote: > On 10/13/2015 11:22 AM, Tobias Klauser wrote: > >On 2015-10-09 at 20:02:47 +0200, Daniel Borkmann <dan...@iogearbox.net> > >wrote: > >>On 10/09/2015 12:50 PM, Eric Dumazet wro

Re: [PATCH net-next 0/4] tcp: better smp listener behavior

2015-10-13 Thread Tobias Klauser
On 2015-10-09 at 20:02:47 +0200, Daniel Borkmann wrote: > On 10/09/2015 12:50 PM, Eric Dumazet wrote: > >On Thu, 2015-10-08 at 20:42 -0700, Tom Herbert wrote: > >>On Thu, Oct 8, 2015 at 8:37 AM, Eric Dumazet wrote: > >>>As promised in last patch series,

[PATCH] packet: Use PAGE_ALIGNED macro

2015-11-17 Thread Tobias Klauser
Use PAGE_ALIGNED(...) instead of open-coding it. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/packet/af_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index af399ca..8f70523 100644 --- a/net/

[PATCH] packet: Don't check frames_per_block against negative values

2015-11-17 Thread Tobias Klauser
rb->frames_per_block is an unsigned int, thus can never be negative. Also fix spacing in the calculation of frames_per_block. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/packet/af_packet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/n

[PATCH] net: ethoc: Remove unnecessary #ifdef CONFIG_OF

2015-09-09 Thread Tobias Klauser
For !CONFIG_OF of_get_property() is defined to always return NULL. Thus there's no need to protect the call to of_get_property() with #ifdef CONFIG_OF. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ethoc.c | 7 +-- 1 file changed, 1 insertion(+), 6 del

[PATCH] net: phy: Use IS_ERR_OR_NULL instead of open coding it

2015-09-23 Thread Tobias Klauser
Replace the pattern (!phy | IS_ERR(phy)) by the equivalent macro IS_ERR_OR_NULL() Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/phy/fixed_phy.c | 2 +- drivers/net/phy/mdio_bus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/n

[PATCH v2] net: axinet: Use of_property_read_u32 instead of open-coding it

2015-09-23 Thread Tobias Klauser
Use of_property_read_u32 instead of of_get_property with return value checks and endianness conversion. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> Reviewed-by: Sören Brinkmann <soren.brinkm...@xilinx.com> --- v2: Resending with Cc to netdev drivers/net/eth

[PATCH v2] net: ll_temac: Use of_property_read_u32 instead of open-coding it

2015-09-23 Thread Tobias Klauser
Use of_property_read_u32 to read the "clock-frequency" property instead of using of_get_property with return value checks. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> Reviewed-by: Sören Brinkmann <soren.brinkm...@xilinx.com> --- v2: Resending with Cc to netdev

[PATCH] ch9200: Convert to use module_usb_driver

2015-09-22 Thread Tobias Klauser
Converts the ch9200 driver to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/usb/ch9200.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/n

Re: [PATCH v3 1/4] stmmac: create of compatible mdio bus for stmacc driver

2015-12-08 Thread Tobias Klauser
On 2015-12-08 at 10:35:05 +0100, Arnd Bergmann wrote: > On Tuesday 08 December 2015 13:12:59 Phil Reid wrote: > > > @@ -201,6 +201,25 @@ int stmmac_mdio_register(struct net_device *ndev) > > struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data; > > int

[PATCH] net: phy: mdio-mux: Check return value of mdiobus_alloc()

2015-12-14 Thread Tobias Klauser
mdiobus_alloc() might return NULL, but its return value is not checked in mdio_mux_init(). This could potentially lead to a NULL pointer dereference. Fix it by checking the return value Fixes: 0ca2997d1452 ("netdev/of/phy: Add MDIO bus multiplexer support.") Signed-off-by: Tobias Klau

Re: [PATCH 2/2] net: ethernet: ethoc: use phy_ethtool_{get|set}_link_ksettings

2016-06-27 Thread Tobias Klauser
On 2016-06-25 at 16:33:42 +0200, Philippe Reynes <trem...@gmail.com> wrote: > There are two generics functions phy_ethtool_{get|set}_link_ksettings, > so we can use them instead of defining the same code in the driver. > > Signed-off-by: Philippe Reynes <trem...@gmail.com&

Re: [PATCH 1/2] net: ethernet: ethoc: use phydev from struct net_device

2016-06-27 Thread Tobias Klauser
On 2016-06-25 at 16:33:41 +0200, Philippe Reynes wrote: > The private structure contain a pointer to phydev, but the structure > net_device already contain such pointer. So we can remove the pointer > phy in the private structure, and update the driver to use the > one

Re: [PATCH] net/ethoc: do not free array priv->mdio->irq

2016-03-03 Thread Tobias Klauser
t; > Issue detected using static analysis with CoverityScan > > Fixes: e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") > Signed-off-by: Colin Ian King <colin.k...@canonical.com> Reviewed-by: Tobias Klauser <tklau...@distanz.ch>

Re: [PATCH v2 1/2] net: ethernet: ethoc: use phydev from struct net_device

2016-07-15 Thread Tobias Klauser
o use the > one contained in struct net_device. > > Signed-off-by: Philippe Reynes <trem...@gmail.com> Reviewed-by: Tobias Klauser <tklau...@distanz.ch> Thanks

Re: [PATCH v2 2/2] net: ethernet: ethoc: use phy_ethtool_{get|set}_link_ksettings

2016-07-15 Thread Tobias Klauser
On 2016-07-15 at 09:59:12 +0200, Philippe Reynes <trem...@gmail.com> wrote: > There are two generics functions phy_ethtool_{get|set}_link_ksettings, > so we can use them instead of defining the same code in the driver. > > Signed-off-by: Philippe Reynes <trem...@gmail.com&

[PATCH] net: wan: Remove unused stats member from struct frad_local

2017-01-27 Thread Tobias Klauser
The stats member of struct frad_locl is used neither by the dlci nor the sdla driver, so it might as well be removed. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- include/linux/if_frad.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/if_frad.h b/include

[PATCH] bnxt_en: use eth_hw_addr_random()

2017-02-21 Thread Tobias Klauser
Use eth_hw_addr_random() to set a random MAC address in order to make sure bp->dev->addr_assign_type will be properly set to NET_ADDR_RANDOM. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH] net/hsr: use eth_hw_addr_random()

2017-02-21 Thread Tobias Klauser
Use eth_hw_addr_random() to set a random MAC address in order to make sure dev->addr_assign_type will be properly set to NET_ADDR_RANDOM. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/hsr/hsr_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] rtnl: simplify error return path in rtnl_create_link()

2017-02-20 Thread Tobias Klauser
There is only one possible error path which reaches the err label, so return ERR_PTR(-ENOMEM) directly if alloc_netdev_mqs() fails. This also allows to omit the err variable. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/core/rtnetlink.c | 7 +-- 1 file changed, 1 ins

[PATCH] net: hip04: Omit private ndo_get_stats function

2017-02-14 Thread Tobias Klauser
hip04_get_stats() just returns dev->stats so we can leave it out altogether and let dev_get_stats() do the job. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/hisilicon/hip04_eth.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net

[PATCH] pch_gbe: Omit private ndo_get_stats function

2017-02-14 Thread Tobias Klauser
pch_gbe_get_stats() just returns dev->stats so we can leave it out altogether and let dev_get_stats() do the job. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 12 1 file changed, 12 deletions(-) diff --git

Re: [PATCH] net: hip04: Omit private ndo_get_stats function

2017-02-15 Thread Tobias Klauser
On 2017-02-15 at 11:28:08 +0100, Joe Perches <j...@perches.com> wrote: > On Tue, 2017-02-14 at 15:10 +0100, Tobias Klauser wrote: > > hip04_get_stats() just returns dev->stats so we can leave it > > out altogether and let dev_get_stats() do the job. > > This could b

[PATCH net-next] ixgb: Omit private ndo_get_stats function

2017-02-15 Thread Tobias Klauser
ixgb_get_stats() just returns dev->stats so we can leave it out altogether and let dev_get_stats() do the job. Suggested-by: Joe Perches <j...@perches.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 16

[PATCH net-next] e1000: Omit private ndo_get_stats function

2017-02-15 Thread Tobias Klauser
e1000_get_stats() just returns dev->stats so we can leave it out altogether and let dev_get_stats() do the job. Suggested-by: Joe Perches <j...@perches.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/intel/e1000/e1000_main.c | 15 ---

[PATCH] brcmfmac: Use net_device_stats from struct net_device

2017-02-13 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct brcm_if, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- .../wireless/broadcom/brcm80211/brcmfmac/core.c

[PATCH] ath6kl: Use net_device_stats from struct net_device

2017-02-09 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct ath6kl_vif, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/wireless/ath/ath6kl/core.h | 1 - drivers/net/wi

[PATCH] orinoco: Use net_device_stats from struct net_device

2017-02-10 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct orinoco_private, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/wireless/intersil/orinoco/main.c

[PATCH] net: ethoc: Use eth_hw_addr_random()

2017-02-16 Thread Tobias Klauser
Use eth_hw_addr_random() to set a random dev_addr and update addr_assign_type instead of open-coding it. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ethoc.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/et

[PATCH] net: bgmac: store MAC address directly in netdev->dev_addr

2017-02-16 Thread Tobias Klauser
_random() instead of eth_random_addr() in case a random MAC is nedded. This will make sure netdev->addr_assign_type will be properly set. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/broadcom/bgmac-bcma.c | 2 +- drivers/net/ethernet/broadcom/bgmac-platform.c |

[PATCH net-next] net: make net_device members garp_port and mrp_port conditional

2017-02-10 Thread Tobias Klauser
net_device in case CONFIG_GARP or CONFIG_MRP are not enabled. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- include/linux/netdevice.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 58afbd1cc659..7bb38f2c65c2

[PATCH net-next] net: caif: Remove unused stats member from struct chnl_net

2017-01-19 Thread Tobias Klauser
The stats member of struct chnl_net is used nowhere in the code, so it might as well be removed. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/caif/chnl_net.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 3408ed

[PATCH] net: ethoc: Make needlessly global struct ethtool_ops static

2017-01-17 Thread Tobias Klauser
Make the needlessly global struct ethtool_ops ethoc_ethtool_ops static to fix a sparse warning. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ethoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ethoc.c b/drive

[PATCH net-next] net: Remove usage of net_device last_rx member

2017-01-18 Thread Tobias Klauser
...@marvell.com> Cc: Stephen Hemminger <step...@networkplumber.org> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- arch/m68k/emu/nfeth.c | 1 - drivers/net/ethernet/cavium/liquidio/lio_main.c| 1 - drivers/net/ethernet/cavium/liquidio/lio_v

[PATCH] net: axienet: use eth_hw_addr_random()

2017-02-28 Thread Tobias Klauser
Use eth_hw_addr_random() to set a random MAC address in order to make sure ndev->addr_assign_type will be properly set to NET_ADDR_RANDOM. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] bpf: Remove unused but set variables

2016-11-08 Thread Tobias Klauser
, but since it is only used in the assignment of min_set it can be removed as well. They were introduced in commit 484611357c19 ("bpf: allow access into map value arrays") but seem to have never been used. Cc: Josef Bacik <jba...@fb.com> Signed-off-by: Tobias Klauser <tklau...@dist

Re: [mm PATCH v3 12/23] arch/nios2: Add option to skip DMA sync as a part of map and unmap

2016-11-11 Thread Tobias Klauser
l. > > Cc: Ley Foon Tan <lf...@altera.com> > Signed-off-by: Alexander Duyck <alexander.h.du...@intel.com> Reviewed-by: Tobias Klauser <tklau...@distanz.ch>

[PATCH] vhost/scsi: Remove unused but set variable

2016-11-11 Thread Tobias Klauser
Remove the unused but set variable se_tpg in vhost_scsi_nexus_cb() to fix the following GCC warning when building with 'W=1': drivers/vhost/scsi.c:1752:26: warning: variable ‘se_tpg’ set but not used Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/vhost/scsi.c | 2 --

[PATCH] vhost/vsock: Remove unused but set variable

2016-11-11 Thread Tobias Klauser
Remove the unused but set variable vq in vhost_transport_send_pkt() to fix the following GCC warning when building with 'W=1': drivers/vhost/vsock.c:198:26: warning: variable ‘vq’ set but not used Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/vhost/vsock.c | 3 ---

[PATCH] tcp: Remove unused but set variable

2016-10-18 Thread Tobias Klauser
-by: Tobias Klauser <tklau...@distanz.ch> --- net/ipv4/tcp_ipv4.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index bd5e8d10893f..79d55eb3ec3f 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1887,7 +1887,6 @@ stati

[PATCH] ipv4: Remove unused but set variable

2016-10-18 Thread Tobias Klauser
Remove the unused but set variable dev in ip_do_fragment to fix the following GCC warning when building with 'W=1': net/ipv4/ip_output.c: In function ‘ip_do_fragment’: net/ipv4/ip_output.c:541:21: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tobias

[PATCH] net: hip04: Remove superfluous ether_setup after alloc_etherdev

2016-10-17 Thread Tobias Klauser
There is no need to call ether_setup after alloc_ethdev since it was already called there. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/hisilicon/hip04_eth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/d

[PATCH] net: fs_enet: Use net_device_stats from struct net_device

2016-10-19 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct fs_enet_private, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- .../net/ethernet/freescale/fs_enet/fs_enet-main.c

[PATCH] vlan: Remove unnecessary comparison of unsigned against 0

2016-10-18 Thread Tobias Klauser
args.u.name_type is of type unsigned int and is always >= 0. This fixes the following GCC warning: net/8021q/vlan.c: In function ‘vlan_ioctl_handler’: net/8021q/vlan.c:574:14: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Signed-off-by: Tobias K

[PATCH] net/hsr: Remove unused but set variable

2016-10-18 Thread Tobias Klauser
] Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/hsr/hsr_forward.c | 4 1 file changed, 4 deletions(-) diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c index 5ee1d43f1310..4ebe2aa3e7d3 100644 --- a/net/hsr/hsr_forward.c +++ b/net/hsr/hsr_forward.c @@ -300,10 +300,6 @@

Re: [PATCH net-next 2/5] net: ethoc: Implement ethtool::nway_reset

2016-11-15 Thread Tobias Klauser
...@gmail.com> Reviewed-by: Tobias Klauser <tklau...@distanz.ch>

Re: [PATCH] net: axienet: Remove unused parameter from __axienet_device_reset

2016-10-13 Thread Tobias Klauser
On 2016-10-13 at 14:23:49 +0200, Michal Simek <michal.si...@xilinx.com> wrote: > On 13.10.2016 13:28, Tobias Klauser wrote: > > The dev parameter passed to __axienet_device_reset() is not used inside > > the function, so remove it. > > > > Signed-off-by: To

[PATCH] net: axienet: Remove unused parameter from __axienet_device_reset

2016-10-13 Thread Tobias Klauser
The dev parameter passed to __axienet_device_reset() is not used inside the function, so remove it. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/d

Re: [PATCH] net: ipv4: tcp_offload: check segs for NULL

2016-12-15 Thread Tobias Klauser
On 2016-12-15 at 09:47:41 +0100, shakya@samsung.com wrote: > From: Shakya Sundar Das > > This patch will check segs for being NULL in tcp_gso_segment() > before calling skb_shinfo(segs) from skb_is_gso(segs), otherwise > kernel can run into a

[PATCH] net: ethernet: slicoss: use module_pci_driver()

2016-12-07 Thread Tobias Klauser
Use module_pci_driver() to get rid of some boilerplate code. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/alacritech/slicoss.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/ethernet/alacritech/slicoss.c b/d

Re: [PATCH] net: axienet: Utilize of_get_mac_address()

2016-12-07 Thread Tobias Klauser
On 2016-12-07 at 13:25:28 +0100, Tobias Klauser <tklau...@distanz.ch> wrote: > Do not open code getting the MAC address exclusively from the > "local-mac-address" property, but instead use of_get_mac_address() > which looks up the MAC address using the 3 typical proper

[PATCH] net: axienet: Utilize of_get_mac_address()

2016-12-07 Thread Tobias Klauser
ac_address() take a const void* address. Follows commit b34296a9c047 ("net: ethoc: Utilize of_get_mac_address()"). Cc: Florian Fainelli <f.faine...@gmail.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 13

[PATCH] net: axienet: Utilize of_get_mac_address()

2016-12-07 Thread Tobias Klauser
ac_address() take a const void* address. Follows commit b34296a9c047 ("net: ethoc: Utilize of_get_mac_address()"). Cc: Florian Fainelli <f.faine...@gmail.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 13

[PATCH] net: ll_temac: Utilize of_get_mac_address()

2016-12-07 Thread Tobias Klauser
ac_address() take a const void* address. Follows commit b34296a9c047 ("net: ethoc: Utilize of_get_mac_address()"). Cc: Florian Fainelli <f.faine...@gmail.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/xilinx/ll_temac_main.c | 11 ++- 1

Re: [PATCH] cxgb4: Remove redundant memset before memcpy

2017-01-14 Thread Tobias Klauser
e > info is memcpy()'ed to before being used in the loop and it isn't > used outside of the loop. > > Signed-off-by: Shyam Saini <mayhs11sa...@gmail.com> Reviewed-by: Tobias Klauser <tklau...@distanz.ch>

Re: [PATCH v3 3/8] nios2: put setup.h in uapi

2017-01-13 Thread Tobias Klauser
On 2017-01-13 at 11:46:41 +0100, Nicolas Dichtel <nicolas.dich...@6wind.com> wrote: > This header file is exported, but from a userland pov, it's just a wrapper > to asm-generic/setup.h. > > Signed-off-by: Nicolas Dichtel <nicolas.dich...@6wind.com> Reviewed-b

Re: [PATCH] cxgb4: Remove redundant memset before memcpy

2017-01-13 Thread Tobias Klauser
On 2017-01-13 at 10:52:49 +0100, Shyam Saini wrote: > The region set by the call to memset, immediately overwritten by the > subsequent call to memcpy and thus makes the memset redundant > > Signed-off-by: Shyam Saini > --- >

[PATCH] ehea: Remove unnecessary memset of stats in netdev private data

2016-11-29 Thread Tobias Klauser
, not net_device_stats. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ibm/ehea/ehea_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index fa66fa6f8bee..702446a93697 100644 --- a/drive

[PATCH] net/rtnetlink: fix attribute name in nlmsg_size() comments

2016-11-30 Thread Tobias Klauser
Use the correct attribute constant names IFLA_GSO_MAX_{SEGS,SIZE} instead of IFLA_MAX_GSO_{SEGS,SIZE} for the comments int nlmsg_size(). Cc: Eric Dumazet <eduma...@google.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/core/rtnetlink.c | 4 ++-- 1 file changed,

Re: [PATCH net-next 3/3] net: ethoc: Demote packet dropped error message to debug

2016-12-04 Thread Tobias Klauser
ian Fainelli <f.faine...@gmail.com> Reviewed-by: Tobias Klauser <tklau...@distanz.ch>

Re: [PATCH net-next 1/3] net: ethoc: Account for duplex changes

2016-12-04 Thread Tobias Klauser
s Ethernet core seems > to be reacting okay without us telling it. > > Signed-off-by: Florian Fainelli <f.faine...@gmail.com> Reviewed-by: Tobias Klauser <tklau...@distanz.ch>

Re: [PATCH net-next 2/3] net: ethoc: Utilize of_get_mac_address()

2016-12-04 Thread Tobias Klauser
ty names. > > Signed-off-by: Florian Fainelli <f.faine...@gmail.com> Reviewed-by: Tobias Klauser <tklau...@distanz.ch>

[PATCH] net: ethoc: Remove unused members from struct ethoc

2017-01-05 Thread Tobias Klauser
The io_region_size and dma_alloc members of struct ethoc are only written but never read, so they might as well be removed. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ethoc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/net/ethernet/e

[PATCH] net: xilinx: emaclite: Remove xemaclite_remove_ndev()

2017-01-05 Thread Tobias Klauser
xemaclite_remove_ndev() is a simple wrapper around free_netdev() checking for NULL before the call. All possible paths calling it are guaranteed to pass a non-NULL argument, so rather call free_netdev() directly. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/

[PATCH net] net: socket: Make unnecessarily global sockfs_setattr() static

2017-01-10 Thread Tobias Klauser
zo Colitti <lore...@google.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/socket.c b/net/socket.c index 009dd12ab7f3..727dfd96da07 100644 --- a/net/socket.c +++ b/net/socket.c @@ -531,7 +5

[PATCH net-next] bpf: Remove unused but set variable in __bpf_lru_list_shrink_inactive()

2017-01-10 Thread Tobias Klauser
com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- kernel/bpf/bpf_lru_list.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/bpf/bpf_lru_list.c b/kernel/bpf/bpf_lru_list.c index 89b7ef41c86b..d78501ee0609 100644 --- a/kernel/bpf/bpf_lru_list.c +++

[PATCH net-next] bpf: Make unnecessarily global functions static

2017-01-10 Thread Tobias Klauser
-prototypes] kernel/bpf/bpf_lru_list.c:577:6: warning: no previous prototype for ‘bpf_percpu_lru_populate’ [-Wmissing-prototypes] Cc: Martin KaFai Lau <ka...@fb.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- kernel/bpf/bpf_lru_list.c | 17 ++--- 1 file

[PATCH] ethernet: sfc: Add Kconfig entry for vendor Solarflare

2016-12-20 Thread Tobias Klauser
vendors and group them beneath an own vendor Kconfig entry for Solarflare. Cc: Edward Cree <ec...@solarflare.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/Kconfig | 1 - drivers/net/ethernet/sfc/Kconfig | 21 + 2 files changed, 2

[PATCH net-next] net: ibmvnic: Remove unused net_stats member from struct ibmvnic_adapter

2017-03-27 Thread Tobias Klauser
The ibmvnic driver keeps its statistics in net_device->stats, so the net_stats member in struct ibmvnic_adapter is unused. Remove it. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ibm/ibmvnic.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net

[PATCH net-next] net: bfin_mac: Remove unused stats member from struct bfin_mac_local

2017-03-27 Thread Tobias Klauser
The bfin_mac driver keeps its statistics in net_device->stats, so the stats member in struct bfin_mac_local is unused. Remove it, as well as the accompanying comment. Cc: adi-buildroot-de...@lists.sourceforge.net Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/eth

[PATCH net-next] net: ibmveth: Remove unused stats member from struct ibmveth_adapter

2017-03-27 Thread Tobias Klauser
The ibmveth driver keeps its statistics in net_device->stats, so the stats member in struct ibmveth_adapter is unused. Remove it. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ibm/ibmveth.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/eth

[PATCH net-next] net: greth: Utilize of_get_mac_address()

2017-03-21 Thread Tobias Klauser
Do not open code getting the MAC address exclusively from the "local-mac-address" property, but instead use of_get_mac_address() which looks up the MAC address using the 3 typical property names. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/aerof

[PATCH] batman-adv: Omit unnecessary memset of netdev private data

2017-03-17 Thread Tobias Klauser
The memory for netdev_priv is allocated using kzalloc in alloc_netdev (or alloc_netdev_mq respectively) so there is no need to set it to 0 again. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/batman-adv/soft-interface.c | 4 1 file changed, 4 deletions(-) diff --git

[PATCH net-next] net: ethoc: Use ether_addr_copy()

2017-03-17 Thread Tobias Klauser
Use ether_addr_copy() instead of memcpy() to set netdev->dev_addr (which is 2-byte aligned). Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ethoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ethoc.c b/dr

[PATCH net-next 03/14] net: dl2k: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/dlink/dl2k.c | 45 +-- drivers/net/ethernet/dlink/dl2k.h | 1 - 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/

[PATCH net-next 04/14] net: emac: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct emac_instance, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/ibm/emac/core.c | 2 +- drivers/net/ethernet/ibm/emac/core.h | 1 - 2 files changed, 1 ins

[PATCH net-next 10/14] net: sunhme: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct happy_meal, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/sun/sunhme.c | 22 +++--- drivers/net/ethernet/sun/sunhme.h | 2 -- 2 files chang

[PATCH net-next 12/14] net: typhoon: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct typhoon, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/3com/typhoon.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drive

[PATCH net-next 00/14] Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Along the lines of previous patches, switch (almost) all remaining net drivers to use net_device_stats from net_device instead of including a copy of it in their netdev_priv struct. Tobias Klauser (14): net: cxgb: Use net_device_stats from struct net_device net: cxgb3: Use net_device_stats

[PATCH net-next 05/14] net: macb: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct macb, use stats from struct net_device. Cc: Nicolas Ferre <nicolas.fe...@atmel.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/cadence/macb.c | 40 ++

[PATCH net-next 14/14] usbnet: pegasus: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct pegasus, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: Petko Manolov <pet...@nucleusys.com> Cc: linux-...@vger.kernel.org Signed-off-by: Tobias Klauser <tklau...@d

[PATCH net-next 08/14] net: nuvoton: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct w90p910_ether, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/nuvoton/w90p910_ether.

[PATCH net-next 13/14] usbnet: kaweth: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct kaweth_device, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: linux-...@vger.kernel.org Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/usb/kaweth.

[PATCH net-next 01/14] net: cxgb: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct port_info, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/chelsio/cxgb/common.h | 1 - drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 2 +- 2 files chan

[PATCH net-next 09/14] net: sunbmac: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct bigmac, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/sun/sunbmac.c | 18 +- drivers/net/ethernet/sun/sunbmac.h | 1 - 2 files chan

[PATCH net-next 02/14] net: cxgb3: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct port_info, use stats from struct net_device. Cc: Santosh Raspatur <sant...@chelsio.com> Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/chelsio/cxgb3/adapter.h| 1 - drivers/net/ethe

[PATCH net-next 07/14] net: nmlan_cs: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct _mace_private, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/amd/nmclan_cs.c | 49 ++-- 1 file changed, 24 insertions(

[PATCH net-next 06/14] net: moxa: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct moxart_mac_priv_t, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/moxa/moxart_ether.

[PATCH net-next 11/14] net: tulip: de2104x: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct de_private, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/dec/tulip/de2104x.c | 42 +++- 1 file changed, 20 insertions(

Re: [PATCH net-next 05/14] net: macb: Use net_device_stats from struct net_device

2017-04-07 Thread Tobias Klauser
On 2017-04-07 at 10:29:34 +0200, Nicolas Ferre <nicolas.fe...@microchip.com> wrote: > Le 07/04/2017 à 10:17, Tobias Klauser a écrit : > > Instead of using a private copy of struct net_device_stats in struct > > macb, use stats from struct net_device. > > I agree wit

[PATCH] net: igbvf: Use net_device_stats from struct net_device

2017-04-06 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct igbvf_adapter, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/intel/igbvf/igbvf.h | 1 - drive

[PATCH] net: i40evf: Use net_device_stats from struct net_device

2017-04-06 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct i40evf_adapter, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/intel/i40evf/i40evf.h

[PATCH] net: mediatek: Use eth_hw_addr_random()

2017-03-07 Thread Tobias Klauser
Use eth_hw_addr_random() to set a random dev_addr and update addr_assign_type instead of open-coding it. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/et

[PATCH] batman-adv: Use net_device_stats from struct net_device

2017-04-05 Thread Tobias Klauser
Instead of using a private copy of struct net_device_stats in struct batadv_priv, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/batman-adv/distributed-arp-table.c | 9 + net/batman-adv/soft-interface.c| 2 +- net/batman-adv/t

[PATCH net-next] bpf: remove reference to sock_filter_ext from kerneldoc comment

2017-04-18 Thread Tobias Klauser
struct sock_filter_ext didn't make it into the tree and is now called struct bpf_insn. Reword the kerneldoc comment for bpf_convert_filter() accordingly. Signed-off-by: Tobias Klauser <tklau...@distanz.ch> --- net/core/filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [PATCH net] rtnetlink: Fix the IFLA_PHYS_PORT_NAME TLV to include terminating NULL

2017-05-09 Thread Tobias Klauser
On 2017-05-09 at 14:12:02 +0200, Yotam Gigi wrote: > The IFLA_PHYS_PORT_NAME rtnetlink TLV length does not include the > terminating NULL character, which is different from other string typed > TLVs. Due to the fact that libnl checks for the terminating NULL in every > string

  1   2   >