[PATCH] net/mlx5e: Fix trailing semicolon

2018-01-17 Thread Luis de Bethencourt
The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.

Signed-off-by: Luis de Bethencourt <lui...@kernel.org>
---

Hi,

After fixing the same thing in drivers/staging/rtl8723bs/, Joe Perches
suggested I fix it treewide [0].

Best regards,
Luis


[0] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115410.html
[1] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115390.html

 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c 
b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
index bf9dc4516d2c..3ff81411ae93 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
@@ -485,7 +485,7 @@ static int mlx5i_close(struct net_device *netdev)
mlx5_fs_remove_rx_underlay_qpn(mdev, ipriv->qp.qpn);
mlx5i_uninit_underlay_qp(epriv);
mlx5e_deactivate_priv_channels(epriv);
-   mlx5e_close_channels(>channels);;
+   mlx5e_close_channels(>channels);
 unlock:
mutex_unlock(>state_lock);
return 0;
-- 
2.15.1



[PATCH] rtl8xxxu: Fix trailing semicolon

2018-01-17 Thread Luis de Bethencourt
The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.

Signed-off-by: Luis de Bethencourt <lui...@kernel.org>
---

Hi,

After fixing the same thing in drivers/staging/rtl8723bs/, Joe Perches
suggested I fix it treewide [0].

Best regards 
Luis


[0] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115410.html
[1] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115390.html

 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h 
b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
index 95e3993d8a33..8828baf26e7b 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1172,7 +1172,7 @@ struct rtl8723bu_c2h {
 
u8 basic_rate:1;
u8 bt_has_reset:1;
-   u8 dummy4_1:1;;
+   u8 dummy4_1:1;
u8 ignore_wlan:1;
u8 auto_report:1;
u8 dummy4_2:3;
-- 
2.15.1



[PATCH] vxlan: Fix trailing semicolon

2018-01-16 Thread Luis de Bethencourt
The trailing semicolon is an empty statement that does no operation.
It is completely stripped out by the compiler. Removing it since it doesn't do
anything.

Signed-off-by: Luis de Bethencourt <lui...@kernel.org>
---

Hi,

An other trailing semicolon to remove. 

Best regards 
Luis


[0] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115410.html
[1] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115390.html

 include/net/vxlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index f96391e84a8a..ad73d8b3fcc2 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -301,7 +301,7 @@ static inline netdev_features_t vxlan_features_check(struct 
sk_buff *skb,
l4_hdr = ipv6_hdr(skb)->nexthdr;
break;
default:
-   return features;;
+   return features;
}
 
if ((l4_hdr == IPPROTO_UDP) &&
-- 
2.15.1



[PATCH] netfilter: nf_tables: Fix trailing semicolon

2018-01-16 Thread Luis de Bethencourt
The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.

Signed-off-by: Luis de Bethencourt <lui...@kernel.org>
---


Hi,

After fixing the same thing in drivers/staging/rtl8723bs/, Joe Perches
suggested I fix it treewide [0].

Best regards 
Luis


[0] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115410.html
[1] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115390.html

 net/netfilter/nft_dynset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c
index ec0fd78231d8..fc83e29d6634 100644
--- a/net/netfilter/nft_dynset.c
+++ b/net/netfilter/nft_dynset.c
@@ -164,7 +164,7 @@ static int nft_dynset_init(const struct nft_ctx *ctx,
}
 
priv->sreg_key = nft_parse_register(tb[NFTA_DYNSET_SREG_KEY]);
-   err = nft_validate_register_load(priv->sreg_key, set->klen);;
+   err = nft_validate_register_load(priv->sreg_key, set->klen);
if (err < 0)
return err;
 
-- 
2.15.1



[PATCH] samples/bpf: Fix trailing semicolon

2018-01-16 Thread Luis de Bethencourt
The trailing semicolon is an empty statement that does no operation.
Removing it since it doesn't do anything.

Signed-off-by: Luis de Bethencourt <lui...@kernel.org>
---

Hi,

After fixing the same thing in drivers/staging/rtl8723bs/, Joe Perches
suggested I fix it treewide [0].

Best regards 
Luis


[0] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115410.html
[1] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-January/115390.html

 samples/bpf/xdp_monitor_kern.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/bpf/xdp_monitor_kern.c b/samples/bpf/xdp_monitor_kern.c
index 2fe2f761a0d0..c969141bfa8b 100644
--- a/samples/bpf/xdp_monitor_kern.c
+++ b/samples/bpf/xdp_monitor_kern.c
@@ -104,7 +104,7 @@ struct xdp_exception_ctx {
 SEC("tracepoint/xdp/xdp_exception")
 int trace_xdp_exception(struct xdp_exception_ctx *ctx)
 {
-   u64 *cnt;;
+   u64 *cnt;
u32 key;
 
key = ctx->act;
-- 
2.15.1



Re: [PATCH 13/36] befs: Define usercopy region in befs_inode_cache slab cache

2018-01-10 Thread Luis de Bethencourt
On 01/09/2018 08:55 PM, Kees Cook wrote:
> From: David Windsor <d...@nullcore.net>
> 
> befs symlink pathnames, stored in struct befs_inode_info.i_data.symlink
> and therefore contained in the befs_inode_cache slab cache, need to be
> copied to/from userspace.
> 
> cache object allocation:
> fs/befs/linuxvfs.c:
> befs_alloc_inode(...):
> ...
> bi = kmem_cache_alloc(befs_inode_cachep, GFP_KERNEL);
> ...
> return >vfs_inode;
> 
> befs_iget(...):
> ...
> strlcpy(befs_ino->i_data.symlink, raw_inode->data.symlink,
> BEFS_SYMLINK_LEN);
> ...
> inode->i_link = befs_ino->i_data.symlink;
> 
> example usage trace:
> readlink_copy+0x43/0x70
> vfs_readlink+0x62/0x110
> SyS_readlinkat+0x100/0x130
> 
> fs/namei.c:
> readlink_copy(..., link):
> ...
> copy_to_user(..., link, len);
> 
> (inlined in vfs_readlink)
> generic_readlink(dentry, ...):
> struct inode *inode = d_inode(dentry);
> const char *link = inode->i_link;
> ...
> readlink_copy(..., link);
> 
> In support of usercopy hardening, this patch defines a region in the
> befs_inode_cache slab cache in which userspace copy operations are
> allowed.
> 
> This region is known as the slab cache's usercopy region. Slab caches
> can now check that each dynamically sized copy operation involving
> cache-managed memory falls entirely within the slab's usercopy region.
> 
> This patch is modified from Brad Spengler/PaX Team's PAX_USERCOPY
> whitelisting code in the last public patch of grsecurity/PaX based on my
> understanding of the code. Changes or omissions from the original code are
> mine and don't reflect the original grsecurity/PaX code.
> 
> Signed-off-by: David Windsor <d...@nullcore.net>
> [kees: adjust commit log, provide usage trace]
> Cc: Luis de Bethencourt <lui...@kernel.org>
> Cc: Salah Triki <salah.tr...@gmail.com>
> Signed-off-by: Kees Cook <keesc...@chromium.org>
> Acked-by: Luis de Bethencourt <lui...@kernel.org>
> ---
>  fs/befs/linuxvfs.c | 14 +-
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
> index ee236231cafa..af2832aaeec5 100644
> --- a/fs/befs/linuxvfs.c
> +++ b/fs/befs/linuxvfs.c
> @@ -444,11 +444,15 @@ static struct inode *befs_iget(struct super_block *sb, 
> unsigned long ino)
>  static int __init
>  befs_init_inodecache(void)
>  {
> - befs_inode_cachep = kmem_cache_create("befs_inode_cache",
> -   sizeof (struct befs_inode_info),
> -   0, (SLAB_RECLAIM_ACCOUNT|
> - SLAB_MEM_SPREAD|SLAB_ACCOUNT),
> -   init_once);
> + befs_inode_cachep = kmem_cache_create_usercopy("befs_inode_cache",
> + sizeof(struct befs_inode_info), 0,
> + (SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|
> + SLAB_ACCOUNT),
> + offsetof(struct befs_inode_info,
> + i_data.symlink),
> + sizeof_field(struct befs_inode_info,
> + i_data.symlink),
> + init_once);
>   if (befs_inode_cachep == NULL)
>   return -ENOMEM;
>  
> 

Hi Kees,

I've tested this and it works well.

You can have me as:
Signed-off-by, Tested-by, or the current Acked-by. Whatever you think is better.

Thanks for the great work. Your rock!

Luis


Re: [PATCH v3 10/31] befs: Define usercopy region in befs_inode_cache slab cache

2017-09-21 Thread Luis de Bethencourt

On 09/20/2017 09:45 PM, Kees Cook wrote:

From: David Windsor <d...@nullcore.net>

befs symlink pathnames, stored in struct befs_inode_info.i_data.symlink
and therefore contained in the befs_inode_cache slab cache, need to be
copied to/from userspace.

cache object allocation:
 fs/befs/linuxvfs.c:
 befs_alloc_inode(...):
 ...
 bi = kmem_cache_alloc(befs_inode_cachep, GFP_KERNEL);
 ...
 return >vfs_inode;

 befs_iget(...):
 ...
 strlcpy(befs_ino->i_data.symlink, raw_inode->data.symlink,
 BEFS_SYMLINK_LEN);
 ...
 inode->i_link = befs_ino->i_data.symlink;

example usage trace:
 readlink_copy+0x43/0x70
 vfs_readlink+0x62/0x110
 SyS_readlinkat+0x100/0x130

 fs/namei.c:
 readlink_copy(..., link):
 ...
 copy_to_user(..., link, len);

 (inlined in vfs_readlink)
 generic_readlink(dentry, ...):
 struct inode *inode = d_inode(dentry);
 const char *link = inode->i_link;
 ...
 readlink_copy(..., link);

In support of usercopy hardening, this patch defines a region in the
befs_inode_cache slab cache in which userspace copy operations are
allowed.

This region is known as the slab cache's usercopy region. Slab caches can
now check that each copy operation involving cache-managed memory falls
entirely within the slab's usercopy region.

This patch is modified from Brad Spengler/PaX Team's PAX_USERCOPY
whitelisting code in the last public patch of grsecurity/PaX based on my
understanding of the code. Changes or omissions from the original code are
mine and don't reflect the original grsecurity/PaX code.

Signed-off-by: David Windsor <d...@nullcore.net>
[kees: adjust commit log, provide usage trace]
Cc: Luis de Bethencourt <lui...@kernel.org>
Cc: Salah Triki <salah.tr...@gmail.com>
Signed-off-by: Kees Cook <keesc...@chromium.org>
Acked-by: Luis de Bethencourt <lui...@kernel.org>
---
  fs/befs/linuxvfs.c | 14 +-
  1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index a92355cc453b..e5dcd26003dc 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -444,11 +444,15 @@ static struct inode *befs_iget(struct super_block *sb, 
unsigned long ino)
  static int __init
  befs_init_inodecache(void)
  {
-   befs_inode_cachep = kmem_cache_create("befs_inode_cache",
- sizeof (struct befs_inode_info),
- 0, (SLAB_RECLAIM_ACCOUNT|
-   SLAB_MEM_SPREAD|SLAB_ACCOUNT),
- init_once);
+   befs_inode_cachep = kmem_cache_create_usercopy("befs_inode_cache",
+   sizeof(struct befs_inode_info), 0,
+   (SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|
+   SLAB_ACCOUNT),
+   offsetof(struct befs_inode_info,
+   i_data.symlink),
+   sizeof_field(struct befs_inode_info,
+   i_data.symlink),
+   init_once);
if (befs_inode_cachep == NULL)
return -ENOMEM;
  



No changes in the befs patch in v3. It goes without saying I continue to 
Ack this.


Thanks Kees and David,
Luis


[PATCH] rtl8xxxu: remove unneeded assignments

2016-06-10 Thread Luis de Bethencourt
reg_eac and reg_ecc are only used if candidate is bigger than 0, and in
that case new values will be given to them. Removing the unused
assignments.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c 
b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
index fe19ace..984af46 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
@@ -1249,11 +1249,9 @@ static void rtl8192eu_phy_iq_calibrate(struct 
rtl8xxxu_priv *priv)
reg_e94 = result[i][0];
reg_e9c = result[i][1];
reg_ea4 = result[i][2];
-   reg_eac = result[i][3];
reg_eb4 = result[i][4];
reg_ebc = result[i][5];
reg_ec4 = result[i][6];
-   reg_ecc = result[i][7];
}
 
if (candidate >= 0) {
-- 
2.5.3



Re: [PATCH] net: Add missing kernel-doc for netdev ptype lists

2016-03-21 Thread Luis de Bethencourt
On 21/03/16 21:08, Benjamin Poirier wrote:
> .//include/linux/netdevice.h:1826: warning: No description found for 
> parameter 'ptype_all'
> .//include/linux/netdevice.h:1826: warning: No description found for 
> parameter 'ptype_specific'
> 
> Introduced by commit 7866a621043f ("dev: add per net_device packet type
> chains")
> 
> Cc: Salam Noureddine 
> Signed-off-by: Benjamin Poirier 
> ---
>  include/linux/netdevice.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 9a3d55c..1937bdd 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1418,6 +1418,8 @@ enum netdev_priv_flags {
>   *   @unreg_list:List entry, that is used, when we are unregistering the
>   *   device, see the function unregister_netdev
>   *   @close_list:List entry, that is used, when we are closing the device
> + *   @ptype_all: Device-specific packet handlers for all protocols
> + *   @ptype_specific: Device-specific, protocol-specific packet handlers
>   *
>   *   @adj_list:  Directly linked devices, like slaves for bonding
>   *   @all_adj_list:  All linked devices, *including* neighbours
> 

Looks good to me.

Thanks Benjamin :)

Luis


Re: [PATCH] net: add missing descriptions in net_device_priv_flags

2016-03-21 Thread Luis de Bethencourt
On 21/03/16 20:41, Benjamin Poirier wrote:
> On 2016/03/21 20:20, Luis de Bethencourt wrote:
>> The flags IFF_XMIT_DST_RELEASE_PERM, IFF_IPVLAN_MASTER and
>> IFF_IPVLAN_SLAVE are missing descriptions for the Documentation. Adding
>> them.
>>
>> Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
>> ---
>> Hi,
>>
>> I also noticed this issue when running make htmldocs. Having better
>> documentation is great :)
>>
>> Thanks,
>> Luis
>>
>>  include/linux/netdevice.h | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>> index be693b3..db9ffe4 100644
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
>> @@ -1320,6 +1320,9 @@ struct net_device_ops {
>>   * @IFF_LIVE_ADDR_CHANGE: device supports hardware address
>>   *  change when it's running
>>   * @IFF_MACVLAN: Macvlan device
>> + * @IFF_XMIT_DST_RELEASE_PERM: permanent IFF_XMIT_DST_RELEASE
> 
> I also noticed these kernel-doc warnings and had some patches queued for
> them. May I suggest the following in this case:
> 
>  * @IFF_XMIT_DST_RELEASE_PERM: IFF_XMIT_DST_RELEASE not taking into account
>  *underlying stacked devices
> 
> I presume that a patch for netdev ptype lists is forthcoming. Here's
> what I had:
> 
>  *@ptype_all: Device-specific packet handlers for all protocols
>  *@ptype_specific: Device-specific, protocol-specific packet handlers
>

Hi Benjamin,

I was going to submit the fix for ptype_all and ptype_specific next, but your
descriptions are better. You should do it instead or if you want me to, I can
do it but amending you as the Author of the commit. Attribution where it is
deserved.

Thanks for looking into this,
Luis
 
>> + * @IFF_IPVLAN_MASTER: IPvlan master device
>> + * @IFF_IPVLAN_SLAVE: IPvlan slave device
>>   * @IFF_L3MDEV_MASTER: device is an L3 master device
>>   * @IFF_NO_QUEUE: device can run without qdisc attached
>>   * @IFF_OPENVSWITCH: device is a Open vSwitch master
>> -- 
>> 2.5.1
>>



[PATCH v2] net: add missing descriptions in net_device_priv_flags

2016-03-21 Thread Luis de Bethencourt
The flags IFF_XMIT_DST_RELEASE_PERM, IFF_IPVLAN_MASTER and
IFF_IPVLAN_SLAVE are missing descriptions for the Documentation. Adding
them.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
Suggested-by: Benjamin Poirier <benjamin.poir...@gmail.com>
---
Hi,

Changing the description of IFF_XMIT_DST_RELEASE_PERM as suggested by Benjamin
and adding him to the Suggested-by for it.
https://lkml.org/lkml/2016/3/21/693

Thanks,
Luis

 include/linux/netdevice.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index be693b3..bcca180 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1320,6 +1320,10 @@ struct net_device_ops {
  * @IFF_LIVE_ADDR_CHANGE: device supports hardware address
  * change when it's running
  * @IFF_MACVLAN: Macvlan device
+ * @IFF_XMIT_DST_RELEASE_PERM: IFF_XMIT_DST_RELEASE not taking into account
+ * underlying stacked devices
+ * @IFF_IPVLAN_MASTER: IPvlan master device
+ * @IFF_IPVLAN_SLAVE: IPvlan slave device
  * @IFF_L3MDEV_MASTER: device is an L3 master device
  * @IFF_NO_QUEUE: device can run without qdisc attached
  * @IFF_OPENVSWITCH: device is a Open vSwitch master
-- 
2.5.1



[PATCH] net: add missing descriptions in net_device_priv_flags

2016-03-21 Thread Luis de Bethencourt
The flags IFF_XMIT_DST_RELEASE_PERM, IFF_IPVLAN_MASTER and
IFF_IPVLAN_SLAVE are missing descriptions for the Documentation. Adding
them.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
Hi,

I also noticed this issue when running make htmldocs. Having better
documentation is great :)

Thanks,
Luis

 include/linux/netdevice.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index be693b3..db9ffe4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1320,6 +1320,9 @@ struct net_device_ops {
  * @IFF_LIVE_ADDR_CHANGE: device supports hardware address
  * change when it's running
  * @IFF_MACVLAN: Macvlan device
+ * @IFF_XMIT_DST_RELEASE_PERM: permanent IFF_XMIT_DST_RELEASE
+ * @IFF_IPVLAN_MASTER: IPvlan master device
+ * @IFF_IPVLAN_SLAVE: IPvlan slave device
  * @IFF_L3MDEV_MASTER: device is an L3 master device
  * @IFF_NO_QUEUE: device can run without qdisc attached
  * @IFF_OPENVSWITCH: device is a Open vSwitch master
-- 
2.5.1



Re: [PATCH] ipv6: remove unused in6_addr struct

2016-03-21 Thread Luis de Bethencourt
On 21/03/16 18:13, David Miller wrote:
> From: Luis de Bethencourt <lui...@osg.samsung.com>
> Date: Mon, 21 Mar 2016 17:37:28 +
> 
>> struct in6_addr isn't used anymore in inet6_connection_sock.h, removing
>> the forward declaration.
>>
>> Fixes: 1b33bc3e9e90 ("ipv6: remove obsolete inet6 functions")
>> Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
> 
> Applied, thank you.
> 

Thank you for all the recent reviews David :)

Luis


[PATCH] ipv6: remove unused in6_addr struct

2016-03-21 Thread Luis de Bethencourt
struct in6_addr isn't used anymore in inet6_connection_sock.h, removing
the forward declaration.

Fixes: 1b33bc3e9e90 ("ipv6: remove obsolete inet6 functions")
Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 include/net/inet6_connection_sock.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/net/inet6_connection_sock.h 
b/include/net/inet6_connection_sock.h
index 064cfbe..954ad6b 100644
--- a/include/net/inet6_connection_sock.h
+++ b/include/net/inet6_connection_sock.h
@@ -15,7 +15,6 @@
 
 #include 
 
-struct in6_addr;
 struct inet_bind_bucket;
 struct request_sock;
 struct sk_buff;
-- 
2.6.4



[PATCH] net: add description for len argument of dev_get_phys_port_name

2016-03-21 Thread Luis de Bethencourt
When the function dev_get_phys_port_name was added it missed a description
for it's len argument. Adding it.

Fixes: db24a9044ee1 ("net: add support for phys_port_name")
Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
Hi,

Noticed this when running make htmldocs. It gives the following warning:
.//net/core/dev.c:6453: warning: No description found for parameter 'len'

Thanks,
Luis

 net/core/dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 43c74ca..b9bcbe7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6445,6 +6445,7 @@ EXPORT_SYMBOL(dev_get_phys_port_id);
  * dev_get_phys_port_name - Get device physical port name
  * @dev: device
  * @name: port name
+ * @len: limit of bytes to copy to name
  *
  * Get device physical port name
  */
-- 
2.6.4



[PATCH] mac80211: add doc for RX_FLAG_DUP_VALIDATED flag

2016-03-20 Thread Luis de Bethencourt
Add documentation for the flag for duplication check.

Fixes the following warning when running make htmldocs:
warning: Enum value 'RX_FLAG_DUP_VALIDATED' not described in enum 
'mac80211_rx_flags'

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
Hi,

While running make htmldocs I noticed a warning about RX_FLAG_DUP_VALIDATED
missing a description. This patch fixes this.

I have noticed the order of the descriptions of the mac80211_rx_flags doesn't
match the order in the enum. I am happy to fix this if it would be of interest.

Thanks,
Luis

 include/net/mac80211.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a5c..42c8cde 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1001,6 +1001,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info 
*info)
  * flag indicates that the PN was verified for replay protection.
  * Note that this flag is also currently only supported when a frame
  * is also decrypted (ie. @RX_FLAG_DECRYPTED must be set)
+ * @RX_FLAG_DUP_VALIDATED: Set this flag for the driver to check for packet
+ * duplication by itself.
  * @RX_FLAG_FAILED_FCS_CRC: Set this flag if the FCS check failed on
  * the frame.
  * @RX_FLAG_FAILED_PLCP_CRC: Set this flag if the PCLP check failed on
-- 
2.5.1



Re: [PATCH] mac80211: fix order of flag descriptions

2016-03-19 Thread Luis de Bethencourt
On 18/03/16 16:49, Johannes Berg wrote:
> On Fri, 2016-03-18 at 16:35 +0000, Luis de Bethencourt wrote:
>> Fix order of mac80211_rx_flags description to match the enum.
>>
>> Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
>> ---
>> Hi,
>>
>> I want ahead and fixed the order of the descriptions. checkpatch.pl
>> was giving
>> a warning to my previous patch and I had a hunch it was because the
>> wrong order
>> breaks the parser. Indeed it does and with this patch below
>> checkpatch.pl does
>> not complain about this flag descriptions anymore.
>>
> Huh. I think we should fix checkpatch.pl instead. While the current
> order isn't likely really good, I believe kernel-doc will output the
> documentation in the order it's listed, and that can be useful for the
> documentation output to group related things, even if their bits may be
> further apart.
> 
> johannes
> 

I agree checkpatch.pl should be fixed. I can look into it. No promises
though, it has been a long time since I look at Perl code.

I understand the logic of grouping the documentation in logical blocks.
It is unfortunate though that this means the enum and documentation won't
match, which makes reading the code harder.

In this particular case I don't see the order of the documentation broken
because flags are being grouped.

Thanks for the review :)
Luis


[PATCH] mac80211: fix order of flag descriptions

2016-03-19 Thread Luis de Bethencourt
Fix order of mac80211_rx_flags description to match the enum.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
Hi,

I want ahead and fixed the order of the descriptions. checkpatch.pl was giving
a warning to my previous patch and I had a hunch it was because the wrong order
breaks the parser. Indeed it does and with this patch below checkpatch.pl does
not complain about this flag descriptions anymore.

Thanks,
Luis

 include/net/mac80211.h | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 42c8cde..4b215a3 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -992,17 +992,13 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info 
*info)
  * @RX_FLAG_MMIC_ERROR: Michael MIC error was reported on this frame.
  * Use together with %RX_FLAG_MMIC_STRIPPED.
  * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware.
+ * @RX_FLAG_MACTIME_PLCP_START: The timestamp passed in the RX status (@mactime
+ * field) is valid and contains the time the SYNC preamble was received.
  * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame,
  * verification has been done by the hardware.
  * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame.
  * If this flag is set, the stack cannot do any replay detection
  * hence the driver or hardware will have to do that.
- * @RX_FLAG_PN_VALIDATED: Currently only valid for CCMP/GCMP frames, this
- * flag indicates that the PN was verified for replay protection.
- * Note that this flag is also currently only supported when a frame
- * is also decrypted (ie. @RX_FLAG_DECRYPTED must be set)
- * @RX_FLAG_DUP_VALIDATED: Set this flag for the driver to check for packet
- * duplication by itself.
  * @RX_FLAG_FAILED_FCS_CRC: Set this flag if the FCS check failed on
  * the frame.
  * @RX_FLAG_FAILED_PLCP_CRC: Set this flag if the PCLP check failed on
@@ -1011,14 +1007,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info 
*info)
  * field) is valid and contains the time the first symbol of the MPDU
  * was received. This is useful in monitor mode and for proper IBSS
  * merging.
- * @RX_FLAG_MACTIME_END: The timestamp passed in the RX status (@mactime
- * field) is valid and contains the time the last symbol of the MPDU
- * (including FCS) was received.
- * @RX_FLAG_MACTIME_PLCP_START: The timestamp passed in the RX status (@mactime
- * field) is valid and contains the time the SYNC preamble was received.
  * @RX_FLAG_SHORTPRE: Short preamble was used for this frame
  * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index
- * @RX_FLAG_VHT: VHT MCS was used and rate_index is MCS index
  * @RX_FLAG_40MHZ: HT40 (40 MHz) was used
  * @RX_FLAG_SHORT_GI: Short guard interval was used
  * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present.
@@ -1029,6 +1019,12 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info 
*info)
  * @RX_FLAG_AMPDU_DETAILS: A-MPDU details are known, in particular the 
reference
  * number (@ampdu_reference) must be populated and be a distinct number for
  * each A-MPDU
+ * @RX_FLAG_PN_VALIDATED: Currently only valid for CCMP/GCMP frames, this
+ * flag indicates that the PN was verified for replay protection.
+ * Note that this flag is also currently only supported when a frame
+ * is also decrypted (ie. @RX_FLAG_DECRYPTED must be set)
+ * @RX_FLAG_DUP_VALIDATED: Set this flag for the driver to check for packet
+ * duplication by itself.
  * @RX_FLAG_AMPDU_LAST_KNOWN: last subframe is known, should be set on all
  * subframes of a single A-MPDU
  * @RX_FLAG_AMPDU_IS_LAST: this subframe is the last subframe of the A-MPDU
@@ -1036,8 +1032,10 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info 
*info)
  * on this subframe
  * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC
  * is stored in the @ampdu_delimiter_crc field)
- * @RX_FLAG_MIC_STRIPPED: The mic was stripped of this packet. Decryption was
- * done by the hardware
+ * @RX_FLAG_MACTIME_END: The timestamp passed in the RX status (@mactime
+ * field) is valid and contains the time the last symbol of the MPDU
+ * (including FCS) was received.
+ * @RX_FLAG_VHT: VHT MCS was used and rate_index is MCS index
  * @RX_FLAG_LDPC: LDPC was used
  * @RX_FLAG_ONLY_MONITOR: Report frame only to monitor interfaces without
  * processing it in any regular way.
@@ -1062,6 +1060,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info 
*info)
  * @RX_FLAG_RADIOTAP_VENDOR_DATA: This frame contains vendor-specific
  * radiotap data in the skb->data (before the frame) as described by
  * the  ieee80211_vendor_radiotap.
+ * @RX_FLAG_MIC_STRIPPED: The mic was stripped of this packet. Decryption was
+ * done by the hardware
  */
 enum mac80211_rx_flags {
RX_FLAG_M

Re: [PATCH] mac80211: add doc for RX_FLAG_DUP_VALIDATED flag

2016-03-19 Thread Luis de Bethencourt
On 18/03/16 16:09, Luis de Bethencourt wrote:
> Add documentation for the flag for duplication check.
> 
> Fixes the following warning when running make htmldocs:
> warning: Enum value 'RX_FLAG_DUP_VALIDATED' not described in enum 
> 'mac80211_rx_flags'
> 
> Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
> ---
> Hi,
> 
> While running make htmldocs I noticed a warning about RX_FLAG_DUP_VALIDATED
> missing a description. This patch fixes this.
> 
> I have noticed the order of the descriptions of the mac80211_rx_flags doesn't
> match the order in the enum. I am happy to fix this if it would be of 
> interest.
> 
> Thanks,
> Luis
> 
>  include/net/mac80211.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index a5c..42c8cde 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -1001,6 +1001,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info 
> *info)
>   *   flag indicates that the PN was verified for replay protection.
>   *   Note that this flag is also currently only supported when a frame
>   *   is also decrypted (ie. @RX_FLAG_DECRYPTED must be set)
> + * @RX_FLAG_DUP_VALIDATED: Set this flag for the driver to check for packet
> + *   duplication by itself.
>   * @RX_FLAG_FAILED_FCS_CRC: Set this flag if the FCS check failed on
>   *   the frame.
>   * @RX_FLAG_FAILED_PLCP_CRC: Set this flag if the PCLP check failed on
> 

Please ignore the second patch I replied to this one. It is wrong due to my
misunderstanding.

This above patch adding RX_FLAG_DUP_VALIDATED is correct and I believe it to be
valid.

Thanks for the reviews,
Luis


[PATCH] mac80211: remove description of dropped member

2016-03-19 Thread Luis de Bethencourt
Commit 976bd9efdae6 ("mac80211: move beacon_loss_count into ifmgd")
removed the member from the sta_info struct but the description stayed
lingering. Remove it.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
Hi,

A second patch fixing a warning in make htmldocs.

Thanks :)
Luis

 net/mac80211/sta_info.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 053f5c4..62193f4 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -377,7 +377,6 @@ DECLARE_EWMA(signal, 1024, 8)
  * @uploaded: set to true when sta is uploaded to the driver
  * @sta: station information we share with the driver
  * @sta_state: duplicates information about station state (for debug)
- * @beacon_loss_count: number of times beacon loss has triggered
  * @rcu_head: RCU head used for freeing this station struct
  * @cur_max_bandwidth: maximum bandwidth to use for TX to the station,
  * taken from HT/VHT capabilities or VHT operating mode notification
-- 
2.5.1



Re: [PATCH] mac80211: fix order of flag descriptions

2016-03-19 Thread Luis de Bethencourt
On 18/03/16 17:46, Joe Perches wrote:
> On Fri, 2016-03-18 at 17:40 +0000, Luis de Bethencourt wrote:
>> On 18/03/16 17:29, Joe Perches wrote:
>>> On Fri, 2016-03-18 at 16:35 +, Luis de Bethencourt wrote:
>>>> Fix order of mac80211_rx_flags description to match the enum.
> []
>>>> I want ahead and fixed the order of the descriptions. checkpatch.pl was 
>>>> giving
>>>> a warning to my previous patch and I had a hunch it was because the wrong 
>>>> order
>>>> breaks the parser. Indeed it does and with this patch below checkpatch.pl 
>>>> does
>>>> not complain about this flag descriptions anymore.
>>> checkpatch complains?  About what?
>> warning: Enum value 'RX_FLAG_DUP_VALIDATED' not described in enum 
>> 'mac80211_rx_flags'
> 
> That's not a checkpatch warning.
> 
> cheers, Joe
> 

Oh no!

Joe is right. That isn't a checkpatch warning, but checkpatch just printing the 
line
in my commit message that goes over 75 characters. Which I kept that big to 
keep the
format from make htmldocs.

I still think the order of the documentation should match the enum regardless, 
it is
nicer for developers reading the code.

Sorry :( my bad for misinterpreting checkpatch's output.

Thanks you Joe for correcting me,
Luis 


[PATCH] net: sched: Add description for cpu_bstats argument

2016-03-19 Thread Luis de Bethencourt
Commit 22e0f8b9322c ("net: sched: make bstats per cpu and estimator RCU safe")
added the argument cpu_bstats to functions gen_new_estimator and
gen_replace_estimator and now the descriptions of these are missing for the
documentation. Adding them.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
Hi,

Noticed these missing descriptions when running make htmldocs.

Got the following warnings:
.//net/core/gen_estimator.c:212: warning: No description found for parameter 
'cpu_bstats'
.//net/core/gen_estimator.c:303: warning: No description found for parameter 
'cpu_bstats'

Thanks :)
Luis

 net/core/gen_estimator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
index 92d886f..4573d81 100644
--- a/net/core/gen_estimator.c
+++ b/net/core/gen_estimator.c
@@ -191,6 +191,7 @@ struct gen_estimator *gen_find_node(const struct 
gnet_stats_basic_packed *bstats
 /**
  * gen_new_estimator - create a new rate estimator
  * @bstats: basic statistics
+ * @cpu_bstats: bstats per cpu
  * @rate_est: rate estimator statistics
  * @stats_lock: statistics lock
  * @opt: rate estimator configuration TLV
@@ -287,6 +288,7 @@ EXPORT_SYMBOL(gen_kill_estimator);
 /**
  * gen_replace_estimator - replace rate estimator configuration
  * @bstats: basic statistics
+ * @cpu_bstats: bstats per cpu
  * @rate_est: rate estimator statistics
  * @stats_lock: statistics lock
  * @opt: rate estimator configuration TLV
-- 
2.5.1



[PATCH] gen_stats.c: Add description for cpu argument

2016-03-19 Thread Luis de Bethencourt
Function gnet_stats_copy_basic is missing the description of the cpu
argument in the documentation. Adding it.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
Hi,

Noticed this issue when running make htmldocs. I got the following warning:
.//net/core/gen_stats.c:155: warning: No description found for parameter 'cpu'

Thanks,
Luis

 net/core/gen_stats.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c
index 1e2f46a..e640462 100644
--- a/net/core/gen_stats.c
+++ b/net/core/gen_stats.c
@@ -140,6 +140,7 @@ EXPORT_SYMBOL(__gnet_stats_copy_basic);
 /**
  * gnet_stats_copy_basic - copy basic statistics into statistic TLV
  * @d: dumping handle
+ * @cpu: copy statistic per cpu
  * @b: basic statistics
  *
  * Appends the basic statistics to the top level TLV created by
-- 
2.5.1



Re: [PATCH] mac80211: fix order of flag descriptions

2016-03-19 Thread Luis de Bethencourt
On 18/03/16 17:29, Joe Perches wrote:
> On Fri, 2016-03-18 at 16:35 +0000, Luis de Bethencourt wrote:
>> Fix order of mac80211_rx_flags description to match the enum.
>>
>> Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
>> ---
>> Hi,
>>
>> I want ahead and fixed the order of the descriptions. checkpatch.pl was 
>> giving
>> a warning to my previous patch and I had a hunch it was because the wrong 
>> order
>> breaks the parser. Indeed it does and with this patch below checkpatch.pl 
>> does
>> not complain about this flag descriptions anymore.
> 
> checkpatch complains?  About what?
> 

warning: Enum value 'RX_FLAG_DUP_VALIDATED' not described in enum 
'mac80211_rx_flags'

Is the warning checkpatch.pl gives against my first patch (add doc for
RX_FLAG_DUP_VALIDATED flag). This is silenced by reordering the descriptions to 
match
the order in the enum.

Thanks,
Luis


Re: [PATCH] mac80211: fix order of flag descriptions

2016-03-18 Thread Luis de Bethencourt
On 18/03/16 17:46, Luis de Bethencourt wrote:
> On 18/03/16 16:49, Johannes Berg wrote:
>> On Fri, 2016-03-18 at 16:35 +0000, Luis de Bethencourt wrote:
>>> Fix order of mac80211_rx_flags description to match the enum.
>>>
>>> Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
>>> ---
>>> Hi,
>>>
>>> I want ahead and fixed the order of the descriptions. checkpatch.pl
>>> was giving
>>> a warning to my previous patch and I had a hunch it was because the
>>> wrong order
>>> breaks the parser. Indeed it does and with this patch below
>>> checkpatch.pl does
>>> not complain about this flag descriptions anymore.
>>>
>> Huh. I think we should fix checkpatch.pl instead. While the current
>> order isn't likely really good, I believe kernel-doc will output the
>> documentation in the order it's listed, and that can be useful for the
>> documentation output to group related things, even if their bits may be
>> further apart.
>>
>> johannes
>>
> 
> I agree checkpatch.pl should be fixed. I can look into it. No promises
> though, it has been a long time since I look at Perl code.
> 
> I understand the logic of grouping the documentation in logical blocks.
> It is unfortunate though that this means the enum and documentation won't
> match, which makes reading the code harder.
> 
> In this particular case I don't see the order of the documentation broken
> because flags are being grouped.
> 
> Thanks for the review :)
> Luis
> 

Sorry Johannes,

Update. checkpatch doesn't need fixing and it does see the documentation
independently of the order. It was my mistake.

Joe Perches pointed it out in this email branch:
https://lkml.org/lkml/2016/3/18/532


Thanks for looking into this, sorry for my blunder.
Luis


[PATCH] ssb: extif: Compile with COMPILE_TEST

2015-10-14 Thread Luis de Bethencourt
This driver only has runtime but no build time dependencies, so it can
be built for testing purposes if the Kconfig COMPILE_TEST option is enabled.

This is useful to have more build coverage and make sure that drivers are
not affected by changes that could cause build regressions. For example,
when building with allyesconfig.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/ssb/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
index f0d22cd..1819a54 100644
--- a/drivers/ssb/Kconfig
+++ b/drivers/ssb/Kconfig
@@ -150,7 +150,7 @@ config SSB_EMBEDDED
 
 config SSB_DRIVER_EXTIF
bool "SSB Broadcom EXTIF core driver"
-   depends on SSB_DRIVER_MIPS
+   depends on SSB_DRIVER_MIPS || COMPILE_TEST
help
  Driver for the Sonics Silicon Backplane attached
  Broadcom EXTIF core.
-- 
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] net: gianfar_ptp: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
Please ignore this. It has the wrong [PATCH] tag.

Apologies,
Luis

On Fri, Sep 18, 2015 at 09:52:44PM +0200, Luis de Bethencourt wrote:
> This platform driver has a OF device ID table but the OF module
> alias information is not created so module autoloading won't work.
> 
> Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
> ---
> 
> Corrected the subject line as requested by Richard.
> https://lkml.org/lkml/2015/9/18/717
> 
> Thanks for the review,
> Luis
> 
>  drivers/net/ethernet/freescale/gianfar_ptp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c 
> b/drivers/net/ethernet/freescale/gianfar_ptp.c
> index 8e3cd77..664d0c2 100644
> --- a/drivers/net/ethernet/freescale/gianfar_ptp.c
> +++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
> @@ -557,6 +557,7 @@ static const struct of_device_id match_table[] = {
>   { .compatible = "fsl,etsec-ptp" },
>   {},
>  };
> +MODULE_DEVICE_TABLE(of, match_table);
>  
>  static struct platform_driver gianfar_ptp_driver = {
>   .driver = {
> -- 
> 2.4.6
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] net: gianfar_ptp: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---

Corrected the subject line as requested by Richard.
https://lkml.org/lkml/2015/9/18/717

Thanks for the review,
Luis

 drivers/net/ethernet/freescale/gianfar_ptp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c 
b/drivers/net/ethernet/freescale/gianfar_ptp.c
index 8e3cd77..664d0c2 100644
--- a/drivers/net/ethernet/freescale/gianfar_ptp.c
+++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
@@ -557,6 +557,7 @@ static const struct of_device_id match_table[] = {
{ .compatible = "fsl,etsec-ptp" },
{},
 };
+MODULE_DEVICE_TABLE(of, match_table);
 
 static struct platform_driver gianfar_ptp_driver = {
.driver = {
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] net: phy: Fix module autoload for OF platform drivers

2015-09-18 Thread Luis de Bethencourt
Hi,

These patches add the missing MODULE_DEVICE_TABLE() for OF to export
the information so modules have the correct aliases built-in and
autoloading works correctly.

A longer explanation by Javier Canillas can be found here:
https://lkml.org/lkml/2015/7/30/519

Sorry if these two patches should've been part of the ethernet series:
https://lkml.org/lkml/2015/9/18/567

Thanks,
Luis

Luis de Bethencourt (2):
  net: phy: mdio-bcm-unimac: Fix module autoload for OF platform driver
  net: phy: mdio-gpio: Fix module autoload for OF platform driver

 drivers/net/phy/mdio-bcm-unimac.c | 1 +
 drivers/net/phy/mdio-gpio.c   | 1 +
 2 files changed, 2 insertions(+)

-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] net: phy: mdio-bcm-unimac: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/net/phy/mdio-bcm-unimac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/mdio-bcm-unimac.c 
b/drivers/net/phy/mdio-bcm-unimac.c
index 6a52a7f..4bde5e7 100644
--- a/drivers/net/phy/mdio-bcm-unimac.c
+++ b/drivers/net/phy/mdio-bcm-unimac.c
@@ -244,6 +244,7 @@ static const struct of_device_id unimac_mdio_ids[] = {
{ .compatible = "brcm,unimac-mdio", },
{ /* sentinel */ },
 };
+MODULE_DEVICE_TABLE(of, unimac_mdio_ids);
 
 static struct platform_driver unimac_mdio_driver = {
.driver = {
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] net: phy: mdio-gpio: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/net/phy/mdio-gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 7dc21e5..3bc9f03 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -261,6 +261,7 @@ static const struct of_device_id mdio_gpio_of_match[] = {
{ .compatible = "virtual,mdio-gpio", },
{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, mdio_gpio_of_match);
 
 static struct platform_driver mdio_gpio_driver = {
.probe = mdio_gpio_probe,
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/6] net: Fix module autoload for OF platform drivers

2015-09-18 Thread Luis de Bethencourt
Hi,

These patches add the missing MODULE_DEVICE_TABLE() for OF to export
the information so modules have the correct aliases built-in and
autoloading works correctly.

A longer explanation by Javier Canillas can be found here:
https://lkml.org/lkml/2015/7/30/519

Thanks,
Luis

Luis de Bethencourt (6):
  net: arc: Fix module autoload for OF platform driver
  net: systemport: Fix module autoload for OF platform driver
  net: bcmgenet: Fix module autoload for OF platform driver
  net: freescale: Fix module autoload for OF platform driver
  net: ks8851: Fix module autoload for OF platform driver
  net: moxa: Fix module autoload for OF platform driver

 drivers/net/ethernet/arc/emac_arc.c| 1 +
 drivers/net/ethernet/broadcom/bcmsysport.c | 1 +
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 1 +
 drivers/net/ethernet/freescale/gianfar_ptp.c   | 1 +
 drivers/net/ethernet/micrel/ks8851.c   | 1 +
 drivers/net/ethernet/moxa/moxart_ether.c   | 1 +
 6 files changed, 6 insertions(+)

-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/6] net: systemport: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/net/ethernet/broadcom/bcmsysport.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c 
b/drivers/net/ethernet/broadcom/bcmsysport.c
index b9a5a97..f1b5364 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -2079,6 +2079,7 @@ static const struct of_device_id bcm_sysport_of_match[] = 
{
{ .compatible = "brcm,systemport" },
{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, bcm_sysport_of_match);
 
 static struct platform_driver bcm_sysport_driver = {
.probe  = bcm_sysport_probe,
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/6] net: bcmgenet: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <l...@osg.samsung.com>
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c 
b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index fadbd00..3bc701e 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3155,6 +3155,7 @@ static const struct of_device_id bcmgenet_match[] = {
{ .compatible = "brcm,genet-v4", .data = (void *)GENET_V4 },
{ },
 };
+MODULE_DEVICE_TABLE(of, bcmgenet_match);
 
 static int bcmgenet_probe(struct platform_device *pdev)
 {
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/6] net: arc: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/net/ethernet/arc/emac_arc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/arc/emac_arc.c 
b/drivers/net/ethernet/arc/emac_arc.c
index f9cb99b..ffd1805 100644
--- a/drivers/net/ethernet/arc/emac_arc.c
+++ b/drivers/net/ethernet/arc/emac_arc.c
@@ -78,6 +78,7 @@ static const struct of_device_id emac_arc_dt_ids[] = {
{ .compatible = "snps,arc-emac" },
{ /* Sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, emac_arc_dt_ids);
 
 static struct platform_driver emac_arc_driver = {
.probe = emac_arc_probe,
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/6] net: freescale: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/net/ethernet/freescale/gianfar_ptp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c 
b/drivers/net/ethernet/freescale/gianfar_ptp.c
index 8e3cd77..664d0c2 100644
--- a/drivers/net/ethernet/freescale/gianfar_ptp.c
+++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
@@ -557,6 +557,7 @@ static const struct of_device_id match_table[] = {
{ .compatible = "fsl,etsec-ptp" },
{},
 };
+MODULE_DEVICE_TABLE(of, match_table);
 
 static struct platform_driver gianfar_ptp_driver = {
.driver = {
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/6] net: ks8851: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/net/ethernet/micrel/ks8851.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/micrel/ks8851.c 
b/drivers/net/ethernet/micrel/ks8851.c
index 66d4ab7..60f43ec 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1601,6 +1601,7 @@ static const struct of_device_id ks8851_match_table[] = {
{ .compatible = "micrel,ks8851" },
{ }
 };
+MODULE_DEVICE_TABLE(of, ks8851_match_table);
 
 static struct spi_driver ks8851_driver = {
.driver = {
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/6] net: moxa: Fix module autoload for OF platform driver

2015-09-18 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt <lui...@osg.samsung.com>
---
 drivers/net/ethernet/moxa/moxart_ether.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/moxa/moxart_ether.c 
b/drivers/net/ethernet/moxa/moxart_ether.c
index becbb5f..a10c928 100644
--- a/drivers/net/ethernet/moxa/moxart_ether.c
+++ b/drivers/net/ethernet/moxa/moxart_ether.c
@@ -552,6 +552,7 @@ static const struct of_device_id moxart_mac_match[] = {
{ .compatible = "moxa,moxart-mac" },
{ }
 };
+MODULE_DEVICE_TABLE(of, moxart_mac_match);
 
 static struct platform_driver moxart_mac_driver = {
.probe  = moxart_mac_probe,
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html