Re: [PATCH 08/11] net: bluetooth: change the len parameter of sco_send_frame() to size_t

2015-10-25 Thread Marcel Holtmann
Hi Corentin,

> len is used in operation/function that wait for unsigned value.
> Furthermore the only one call of sco_send_frame give a size_t as argument.
> So the parameter need to be set as size_t.
> 
> Signed-off-by: LABBE Corentin 
> ---
> net/bluetooth/sco.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

I am not taking this patch until you also fix the kbuild test robot reported 
issue with format print modifier for size_t.

Regards

Marcel

--
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 08/11] net: bluetooth: change the len parameter of sco_send_frame() to size_t

2015-10-23 Thread LABBE Corentin
len is used in operation/function that wait for unsigned value.
Furthermore the only one call of sco_send_frame give a size_t as argument.
So the parameter need to be set as size_t.

Signed-off-by: LABBE Corentin 
---
 net/bluetooth/sco.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index f315c8d..1ae4b36 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -268,7 +268,7 @@ done:
return err;
 }
 
-static int sco_send_frame(struct sock *sk, struct msghdr *msg, int len)
+static int sco_send_frame(struct sock *sk, struct msghdr *msg, size_t len)
 {
struct sco_conn *conn = sco_pi(sk)->conn;
struct sk_buff *skb;
-- 
2.4.10

--
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 08/11] net: bluetooth: change the len parameter of sco_send_frame() to size_t

2015-10-23 Thread kbuild test robot
Hi LABBE,

[auto build test WARNING on net/master -- if it's inappropriate base, please 
suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/LABBE-Corentin/net-change-len-parameter-type-for-memcpy_-to-from-_msg/20151023-201642
config: tile-allyesconfig (attached as .config)
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=tile 

All warnings (new ones prefixed by >>):

   net/bluetooth/sco.c: In function 'sco_send_frame':
>> net/bluetooth/sco.c:281:2: warning: format '%d' expects argument of type 
>> 'int', but argument 4 has type 'size_t' [-Wformat]

vim +281 net/bluetooth/sco.c

^1da177e Linus Torvalds  2005-04-16  265  done:
09fd0de5 Gustavo Padovan 2011-06-17  266hci_dev_unlock(hdev);
^1da177e Linus Torvalds  2005-04-16  267hci_dev_put(hdev);
^1da177e Linus Torvalds  2005-04-16  268return err;
^1da177e Linus Torvalds  2005-04-16  269  }
^1da177e Linus Torvalds  2005-04-16  270  
722dd7cd LABBE Corentin  2015-10-23  271  static int sco_send_frame(struct sock 
*sk, struct msghdr *msg, size_t len)
^1da177e Linus Torvalds  2005-04-16  272  {
^1da177e Linus Torvalds  2005-04-16  273struct sco_conn *conn = 
sco_pi(sk)->conn;
^1da177e Linus Torvalds  2005-04-16  274struct sk_buff *skb;
088ce088 Mikel Astiz 2012-04-11  275int err;
^1da177e Linus Torvalds  2005-04-16  276  
^1da177e Linus Torvalds  2005-04-16  277/* Check outgoing MTU */
^1da177e Linus Torvalds  2005-04-16  278if (len > conn->mtu)
^1da177e Linus Torvalds  2005-04-16  279return -EINVAL;
^1da177e Linus Torvalds  2005-04-16  280  
^1da177e Linus Torvalds  2005-04-16 @281BT_DBG("sk %p len %d", sk, len);
^1da177e Linus Torvalds  2005-04-16  282  
088ce088 Mikel Astiz 2012-04-11  283skb = bt_skb_send_alloc(sk, 
len, msg->msg_flags & MSG_DONTWAIT, );
b9dbdbc1 Gustavo Padovan 2010-05-01  284if (!skb)
^1da177e Linus Torvalds  2005-04-16  285return err;
^1da177e Linus Torvalds  2005-04-16  286  
6ce8e9ce Al Viro 2014-04-06  287if 
(memcpy_from_msg(skb_put(skb, len), msg, len)) {
b9dbdbc1 Gustavo Padovan 2010-05-01  288kfree_skb(skb);
b9dbdbc1 Gustavo Padovan 2010-05-01  289return -EFAULT;

:: The code at line 281 was first introduced by commit
:: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:: TO: Linus Torvalds 
:: CC: Linus Torvalds 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH 08/11] net: bluetooth: change the len parameter of sco_send_frame() to size_t

2015-10-23 Thread kbuild test robot
Hi LABBE,

[auto build test WARNING on net/master -- if it's inappropriate base, please 
suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/LABBE-Corentin/net-change-len-parameter-type-for-memcpy_-to-from-_msg/20151023-201642
config: x86_64-allyesconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/module.h:9,
from net/bluetooth/sco.c:27:
   net/bluetooth/sco.c: In function 'sco_send_frame':
>> net/bluetooth/sco.c:281:9: warning: format '%d' expects argument of type 
>> 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
 BT_DBG("sk %p len %d", sk, len);
^
   include/linux/printk.h:236:21: note: in definition of macro 'pr_fmt'
#define pr_fmt(fmt) fmt
^
   include/linux/printk.h:283:2: note: in expansion of macro 'dynamic_pr_debug'
 dynamic_pr_debug(fmt, ##__VA_ARGS__)
 ^
   include/net/bluetooth/bluetooth.h:129:26: note: in expansion of macro 
'pr_debug'
#define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__)
 ^
   net/bluetooth/sco.c:281:2: note: in expansion of macro 'BT_DBG'
 BT_DBG("sk %p len %d", sk, len);
 ^

vim +281 net/bluetooth/sco.c

^1da177e Linus Torvalds  2005-04-16  265  done:
09fd0de5 Gustavo Padovan 2011-06-17  266hci_dev_unlock(hdev);
^1da177e Linus Torvalds  2005-04-16  267hci_dev_put(hdev);
^1da177e Linus Torvalds  2005-04-16  268return err;
^1da177e Linus Torvalds  2005-04-16  269  }
^1da177e Linus Torvalds  2005-04-16  270  
722dd7cd LABBE Corentin  2015-10-23  271  static int sco_send_frame(struct sock 
*sk, struct msghdr *msg, size_t len)
^1da177e Linus Torvalds  2005-04-16  272  {
^1da177e Linus Torvalds  2005-04-16  273struct sco_conn *conn = 
sco_pi(sk)->conn;
^1da177e Linus Torvalds  2005-04-16  274struct sk_buff *skb;
088ce088 Mikel Astiz 2012-04-11  275int err;
^1da177e Linus Torvalds  2005-04-16  276  
^1da177e Linus Torvalds  2005-04-16  277/* Check outgoing MTU */
^1da177e Linus Torvalds  2005-04-16  278if (len > conn->mtu)
^1da177e Linus Torvalds  2005-04-16  279return -EINVAL;
^1da177e Linus Torvalds  2005-04-16  280  
^1da177e Linus Torvalds  2005-04-16 @281BT_DBG("sk %p len %d", sk, len);
^1da177e Linus Torvalds  2005-04-16  282  
088ce088 Mikel Astiz 2012-04-11  283skb = bt_skb_send_alloc(sk, 
len, msg->msg_flags & MSG_DONTWAIT, );
b9dbdbc1 Gustavo Padovan 2010-05-01  284if (!skb)
^1da177e Linus Torvalds  2005-04-16  285return err;
^1da177e Linus Torvalds  2005-04-16  286  
6ce8e9ce Al Viro 2014-04-06  287if 
(memcpy_from_msg(skb_put(skb, len), msg, len)) {
b9dbdbc1 Gustavo Padovan 2010-05-01  288kfree_skb(skb);
b9dbdbc1 Gustavo Padovan 2010-05-01  289return -EFAULT;

:: The code at line 281 was first introduced by commit
:: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:: TO: Linus Torvalds 
:: CC: Linus Torvalds 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [PATCH 08/11] net: bluetooth: change the len parameter of sco_send_frame() to size_t

2015-10-23 Thread kbuild test robot
Hi LABBE,

[auto build test WARNING on net/master -- if it's inappropriate base, please 
suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/LABBE-Corentin/net-change-len-parameter-type-for-memcpy_-to-from-_msg/20151023-201642
config: sparc64-allyesconfig (attached as .config)
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:277:0,
from include/linux/kernel.h:13,
from include/linux/list.h:8,
from include/linux/module.h:9,
from net/bluetooth/sco.c:27:
   net/bluetooth/sco.c: In function 'sco_send_frame':
   include/linux/dynamic_debug.h:64:16: warning: format '%d' expects argument 
of type 'int', but argument 4 has type 'size_t' [-Wformat=]
 static struct _ddebug  __aligned(8)   \
   ^
   include/linux/dynamic_debug.h:76:2: note: in expansion of macro 
'DEFINE_DYNAMIC_DEBUG_METADATA'
 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
 ^
   include/linux/printk.h:283:2: note: in expansion of macro 'dynamic_pr_debug'
 dynamic_pr_debug(fmt, ##__VA_ARGS__)
 ^
   include/net/bluetooth/bluetooth.h:129:26: note: in expansion of macro 
'pr_debug'
#define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__)
 ^
>> net/bluetooth/sco.c:281:2: note: in expansion of macro 'BT_DBG'
 BT_DBG("sk %p len %d", sk, len);
 ^

vim +/BT_DBG +281 net/bluetooth/sco.c

^1da177e Linus Torvalds  2005-04-16  265  done:
09fd0de5 Gustavo Padovan 2011-06-17  266hci_dev_unlock(hdev);
^1da177e Linus Torvalds  2005-04-16  267hci_dev_put(hdev);
^1da177e Linus Torvalds  2005-04-16  268return err;
^1da177e Linus Torvalds  2005-04-16  269  }
^1da177e Linus Torvalds  2005-04-16  270  
722dd7cd LABBE Corentin  2015-10-23  271  static int sco_send_frame(struct sock 
*sk, struct msghdr *msg, size_t len)
^1da177e Linus Torvalds  2005-04-16  272  {
^1da177e Linus Torvalds  2005-04-16  273struct sco_conn *conn = 
sco_pi(sk)->conn;
^1da177e Linus Torvalds  2005-04-16  274struct sk_buff *skb;
088ce088 Mikel Astiz 2012-04-11  275int err;
^1da177e Linus Torvalds  2005-04-16  276  
^1da177e Linus Torvalds  2005-04-16  277/* Check outgoing MTU */
^1da177e Linus Torvalds  2005-04-16  278if (len > conn->mtu)
^1da177e Linus Torvalds  2005-04-16  279return -EINVAL;
^1da177e Linus Torvalds  2005-04-16  280  
^1da177e Linus Torvalds  2005-04-16 @281BT_DBG("sk %p len %d", sk, len);
^1da177e Linus Torvalds  2005-04-16  282  
088ce088 Mikel Astiz 2012-04-11  283skb = bt_skb_send_alloc(sk, 
len, msg->msg_flags & MSG_DONTWAIT, );
b9dbdbc1 Gustavo Padovan 2010-05-01  284if (!skb)
^1da177e Linus Torvalds  2005-04-16  285return err;
^1da177e Linus Torvalds  2005-04-16  286  
6ce8e9ce Al Viro 2014-04-06  287if 
(memcpy_from_msg(skb_put(skb, len), msg, len)) {
b9dbdbc1 Gustavo Padovan 2010-05-01  288kfree_skb(skb);
b9dbdbc1 Gustavo Padovan 2010-05-01  289return -EFAULT;

:: The code at line 281 was first introduced by commit
:: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:: TO: Linus Torvalds 
:: CC: Linus Torvalds 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data