* [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12
@ 2014-08-12 8:38 Jeff Kirsher
2014-08-12 8:38 ` [net 1/6] i40e: Fix missing uapi/linux/dcbnl.h include in i40e_fcoe.c Jeff Kirsher
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Jeff Kirsher @ 2014-08-12 8:38 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, nhorman, sassmann
This series contains updates to i40e and e1000e.
Lucas provides a fix for i40e to resolve a compile issue where a header
was missing in the #includes.
Wei Yongjun provides a fix for i40e to resolve a sparse warning, where
a non-static function should be static.
Julia Lawall provides a fix for i40e which was found using Coccinelle,
where there was a typo in the name of the type given to sizeof().
Rickard Strandqvist provides a fix for i40e to replace the use of
strncpy() with strlcpy() to avoid strings that lack null termination.
Jean Sacren provides two e1000e fixes, first is a comment fix and second
removes an excessive space character in a debug message.
The following are changes since commit 61dac43ee6bedd8507294c7af8959157b686c221:
Merge branch 'bcmgenet'
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master
Jean Sacren (2):
e1000e: fix trivial kernel doc typos
e1000e: delete excessive space character in debug message
Julia Lawall (1):
i40e: use correct structure type name in sizeof
Lucas Tanure (1):
i40e: Fix missing uapi/linux/dcbnl.h include in i40e_fcoe.c
Rickard Strandqvist (1):
i40e: Cleaning up missing null-terminate in conjunction with strncpy
Wei Yongjun (1):
i40e: fix sparse non static symbol warning
drivers/net/ethernet/intel/e1000e/manage.c | 4 ++--
drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_main.c | 18 +++++++++---------
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 6 +++---
4 files changed, 15 insertions(+), 14 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [net 1/6] i40e: Fix missing uapi/linux/dcbnl.h include in i40e_fcoe.c
2014-08-12 8:38 [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 Jeff Kirsher
@ 2014-08-12 8:38 ` Jeff Kirsher
2014-08-12 8:38 ` [net 2/6] i40e: fix sparse non static symbol warning Jeff Kirsher
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Jeff Kirsher @ 2014-08-12 8:38 UTC (permalink / raw)
To: davem
Cc: Lucas Tanure, netdev, nhorman, sassmann, rdunlap, sfr,
linux-next, Jeff Kirsher
From: Lucas Tanure <tanure@linux.com>
Fix missing include in Intel i40e driver. Without this include linux next
tree won't compile.
Signed-off-by: Lucas Tanure <tanure@linux.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_fcoe.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
index 6938fc1..5d01db1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_fcoe.c
@@ -33,6 +33,7 @@
#include <scsi/fc/fc_fcoe.h>
#include <scsi/libfc.h>
#include <scsi/libfcoe.h>
+#include <uapi/linux/dcbnl.h>
#include "i40e.h"
#include "i40e_fcoe.h"
--
1.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [net 2/6] i40e: fix sparse non static symbol warning
2014-08-12 8:38 [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 Jeff Kirsher
2014-08-12 8:38 ` [net 1/6] i40e: Fix missing uapi/linux/dcbnl.h include in i40e_fcoe.c Jeff Kirsher
@ 2014-08-12 8:38 ` Jeff Kirsher
2014-08-12 8:38 ` [net 3/6] i40e: use correct structure type name in sizeof Jeff Kirsher
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Jeff Kirsher @ 2014-08-12 8:38 UTC (permalink / raw)
To: davem; +Cc: Wei Yongjun, netdev, nhorman, sassmann, Jeff Kirsher
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Fixes the following sparse warnings:
drivers/net/ethernet/intel/i40e/i40e_nvm.c:254:13: warning:
symbol 'i40e_write_nvm_aq' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Tested-By: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
index 97bda3d..25c4f9a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c
@@ -251,9 +251,9 @@ i40e_status i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
*
* Writes a 16 bit words buffer to the Shadow RAM using the admin command.
**/
-i40e_status i40e_write_nvm_aq(struct i40e_hw *hw, u8 module_pointer,
- u32 offset, u16 words, void *data,
- bool last_command)
+static i40e_status i40e_write_nvm_aq(struct i40e_hw *hw, u8 module_pointer,
+ u32 offset, u16 words, void *data,
+ bool last_command)
{
i40e_status ret_code = I40E_ERR_NVM;
--
1.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [net 3/6] i40e: use correct structure type name in sizeof
2014-08-12 8:38 [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 Jeff Kirsher
2014-08-12 8:38 ` [net 1/6] i40e: Fix missing uapi/linux/dcbnl.h include in i40e_fcoe.c Jeff Kirsher
2014-08-12 8:38 ` [net 2/6] i40e: fix sparse non static symbol warning Jeff Kirsher
@ 2014-08-12 8:38 ` Jeff Kirsher
2014-08-12 8:38 ` [net 4/6] i40e: Cleaning up missing null-terminate in conjunction with strncpy Jeff Kirsher
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Jeff Kirsher @ 2014-08-12 8:38 UTC (permalink / raw)
To: davem; +Cc: Julia Lawall, netdev, nhorman, sassmann, Jeff Kirsher
From: Julia Lawall <Julia.Lawall@lip6.fr>
Correct typo in the name of the type given to sizeof. Because it is the
size of a pointer that is wanted, the typo has no impact on compilation or
execution.
This problem was found using Coccinelle (http://coccinelle.lip6.fr/). The
semantic patch used can be found in message 0 of this patch series.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Tested-By: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 51bc030..2ac8f45 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6293,7 +6293,7 @@ static int i40e_vsi_alloc_arrays(struct i40e_vsi *vsi, bool alloc_qvectors)
if (alloc_qvectors) {
/* allocate memory for q_vector pointers */
- size = sizeof(struct i40e_q_vectors *) * vsi->num_q_vectors;
+ size = sizeof(struct i40e_q_vector *) * vsi->num_q_vectors;
vsi->q_vectors = kzalloc(size, GFP_KERNEL);
if (!vsi->q_vectors) {
ret = -ENOMEM;
--
1.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [net 4/6] i40e: Cleaning up missing null-terminate in conjunction with strncpy
2014-08-12 8:38 [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 Jeff Kirsher
` (2 preceding siblings ...)
2014-08-12 8:38 ` [net 3/6] i40e: use correct structure type name in sizeof Jeff Kirsher
@ 2014-08-12 8:38 ` Jeff Kirsher
2014-08-12 8:43 ` David Laight
2014-08-12 8:38 ` [net 5/6] e1000e: fix trivial kernel doc typos Jeff Kirsher
` (2 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Jeff Kirsher @ 2014-08-12 8:38 UTC (permalink / raw)
To: davem; +Cc: Rickard Strandqvist, netdev, nhorman, sassmann, Jeff Kirsher
From: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Tested-By: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2ac8f45..871474f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -4415,13 +4415,13 @@ static void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
switch (vsi->back->hw.phy.link_info.link_speed) {
case I40E_LINK_SPEED_40GB:
- strncpy(speed, "40 Gbps", SPEED_SIZE);
+ strlcpy(speed, "40 Gbps", SPEED_SIZE);
break;
case I40E_LINK_SPEED_10GB:
- strncpy(speed, "10 Gbps", SPEED_SIZE);
+ strlcpy(speed, "10 Gbps", SPEED_SIZE);
break;
case I40E_LINK_SPEED_1GB:
- strncpy(speed, "1000 Mbps", SPEED_SIZE);
+ strlcpy(speed, "1000 Mbps", SPEED_SIZE);
break;
default:
break;
@@ -4429,16 +4429,16 @@ static void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
switch (vsi->back->hw.fc.current_mode) {
case I40E_FC_FULL:
- strncpy(fc, "RX/TX", FC_SIZE);
+ strlcpy(fc, "RX/TX", FC_SIZE);
break;
case I40E_FC_TX_PAUSE:
- strncpy(fc, "TX", FC_SIZE);
+ strlcpy(fc, "TX", FC_SIZE);
break;
case I40E_FC_RX_PAUSE:
- strncpy(fc, "RX", FC_SIZE);
+ strlcpy(fc, "RX", FC_SIZE);
break;
default:
- strncpy(fc, "None", FC_SIZE);
+ strlcpy(fc, "None", FC_SIZE);
break;
}
@@ -5839,7 +5839,7 @@ static void i40e_send_version(struct i40e_pf *pf)
dv.minor_version = DRV_VERSION_MINOR;
dv.build_version = DRV_VERSION_BUILD;
dv.subbuild_version = 0;
- strncpy(dv.driver_string, DRV_VERSION, sizeof(dv.driver_string));
+ strlcpy(dv.driver_string, DRV_VERSION, sizeof(dv.driver_string));
i40e_aq_send_driver_version(&pf->hw, &dv, NULL);
}
--
1.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [net 5/6] e1000e: fix trivial kernel doc typos
2014-08-12 8:38 [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 Jeff Kirsher
` (3 preceding siblings ...)
2014-08-12 8:38 ` [net 4/6] i40e: Cleaning up missing null-terminate in conjunction with strncpy Jeff Kirsher
@ 2014-08-12 8:38 ` Jeff Kirsher
2014-08-12 8:38 ` [net 6/6] e1000e: delete excessive space character in debug message Jeff Kirsher
2014-08-12 21:30 ` [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 David Miller
6 siblings, 0 replies; 9+ messages in thread
From: Jeff Kirsher @ 2014-08-12 8:38 UTC (permalink / raw)
To: davem; +Cc: Jean Sacren, netdev, nhorman, sassmann, Jeff Kirsher
From: Jean Sacren <sakiwit@gmail.com>
The macro E1000_success is meant to be E1000_SUCCESS. As the return
statement in the function is good as is, let's simply correct the
comment for this trivial matter.
Additionally E1000_ERR_HOST_INTERFACE_COMMAND is supposed to be
-E1000_ERR_HOST_INTERFACE_COMMAND.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000e/manage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/manage.c b/drivers/net/ethernet/intel/e1000e/manage.c
index 5885603..e156664d 100644
--- a/drivers/net/ethernet/intel/e1000e/manage.c
+++ b/drivers/net/ethernet/intel/e1000e/manage.c
@@ -47,7 +47,7 @@ static u8 e1000_calculate_checksum(u8 *buffer, u32 length)
* e1000_mng_enable_host_if - Checks host interface is enabled
* @hw: pointer to the HW structure
*
- * Returns E1000_success upon success, else E1000_ERR_HOST_INTERFACE_COMMAND
+ * Returns 0 upon success, else -E1000_ERR_HOST_INTERFACE_COMMAND
*
* This function checks whether the HOST IF is enabled for command operation
* and also checks whether the previous command is completed. It busy waits
--
1.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [net 6/6] e1000e: delete excessive space character in debug message
2014-08-12 8:38 [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 Jeff Kirsher
` (4 preceding siblings ...)
2014-08-12 8:38 ` [net 5/6] e1000e: fix trivial kernel doc typos Jeff Kirsher
@ 2014-08-12 8:38 ` Jeff Kirsher
2014-08-12 21:30 ` [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 David Miller
6 siblings, 0 replies; 9+ messages in thread
From: Jeff Kirsher @ 2014-08-12 8:38 UTC (permalink / raw)
To: davem; +Cc: Jean Sacren, netdev, nhorman, sassmann, Jeff Kirsher
From: Jean Sacren <sakiwit@gmail.com>
There is an excessive space character between the word and the
period in the debug message. So delete it.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000e/manage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/manage.c b/drivers/net/ethernet/intel/e1000e/manage.c
index e156664d..06edfca 100644
--- a/drivers/net/ethernet/intel/e1000e/manage.c
+++ b/drivers/net/ethernet/intel/e1000e/manage.c
@@ -78,7 +78,7 @@ static s32 e1000_mng_enable_host_if(struct e1000_hw *hw)
}
if (i == E1000_MNG_DHCP_COMMAND_TIMEOUT) {
- e_dbg("Previous command timeout failed .\n");
+ e_dbg("Previous command timeout failed.\n");
return -E1000_ERR_HOST_INTERFACE_COMMAND;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [net 4/6] i40e: Cleaning up missing null-terminate in conjunction with strncpy
2014-08-12 8:38 ` [net 4/6] i40e: Cleaning up missing null-terminate in conjunction with strncpy Jeff Kirsher
@ 2014-08-12 8:43 ` David Laight
0 siblings, 0 replies; 9+ messages in thread
From: David Laight @ 2014-08-12 8:43 UTC (permalink / raw)
To: 'Jeff Kirsher', davem
Cc: Rickard Strandqvist, netdev, nhorman, sassmann
From: Jeff Kirsher
> From: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>
> Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
...
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 2ac8f45..871474f 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -4415,13 +4415,13 @@ static void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
>
> switch (vsi->back->hw.phy.link_info.link_speed) {
> case I40E_LINK_SPEED_40GB:
> - strncpy(speed, "40 Gbps", SPEED_SIZE);
> + strlcpy(speed, "40 Gbps", SPEED_SIZE);
> break;
> case I40E_LINK_SPEED_10GB:
> - strncpy(speed, "10 Gbps", SPEED_SIZE);
> + strlcpy(speed, "10 Gbps", SPEED_SIZE);
> break;
> case I40E_LINK_SPEED_1GB:
> - strncpy(speed, "1000 Mbps", SPEED_SIZE);
> + strlcpy(speed, "1000 Mbps", SPEED_SIZE);
> break;
> default:
> break;
Could 'speed' be change to be a 'const char *' ?
(and 'fc' below).
David
> @@ -4429,16 +4429,16 @@ static void i40e_print_link_message(struct i40e_vsi *vsi, bool isup)
>
> switch (vsi->back->hw.fc.current_mode) {
> case I40E_FC_FULL:
> - strncpy(fc, "RX/TX", FC_SIZE);
> + strlcpy(fc, "RX/TX", FC_SIZE);
> break;
> case I40E_FC_TX_PAUSE:
> - strncpy(fc, "TX", FC_SIZE);
> + strlcpy(fc, "TX", FC_SIZE);
> break;
> case I40E_FC_RX_PAUSE:
> - strncpy(fc, "RX", FC_SIZE);
> + strlcpy(fc, "RX", FC_SIZE);
> break;
> default:
> - strncpy(fc, "None", FC_SIZE);
> + strlcpy(fc, "None", FC_SIZE);
> break;
> }
>
> @@ -5839,7 +5839,7 @@ static void i40e_send_version(struct i40e_pf *pf)
> dv.minor_version = DRV_VERSION_MINOR;
> dv.build_version = DRV_VERSION_BUILD;
> dv.subbuild_version = 0;
> - strncpy(dv.driver_string, DRV_VERSION, sizeof(dv.driver_string));
> + strlcpy(dv.driver_string, DRV_VERSION, sizeof(dv.driver_string));
> i40e_aq_send_driver_version(&pf->hw, &dv, NULL);
> }
>
> --
> 1.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12
2014-08-12 8:38 [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 Jeff Kirsher
` (5 preceding siblings ...)
2014-08-12 8:38 ` [net 6/6] e1000e: delete excessive space character in debug message Jeff Kirsher
@ 2014-08-12 21:30 ` David Miller
6 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2014-08-12 21:30 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 12 Aug 2014 01:38:21 -0700
> This series contains updates to i40e and e1000e.
>
> Lucas provides a fix for i40e to resolve a compile issue where a header
> was missing in the #includes.
>
> Wei Yongjun provides a fix for i40e to resolve a sparse warning, where
> a non-static function should be static.
>
> Julia Lawall provides a fix for i40e which was found using Coccinelle,
> where there was a typo in the name of the type given to sizeof().
>
> Rickard Strandqvist provides a fix for i40e to replace the use of
> strncpy() with strlcpy() to avoid strings that lack null termination.
>
> Jean Sacren provides two e1000e fixes, first is a comment fix and second
> removes an excessive space character in a debug message.
Pulled, thanks Jeff.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-08-12 21:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12 8:38 [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 Jeff Kirsher
2014-08-12 8:38 ` [net 1/6] i40e: Fix missing uapi/linux/dcbnl.h include in i40e_fcoe.c Jeff Kirsher
2014-08-12 8:38 ` [net 2/6] i40e: fix sparse non static symbol warning Jeff Kirsher
2014-08-12 8:38 ` [net 3/6] i40e: use correct structure type name in sizeof Jeff Kirsher
2014-08-12 8:38 ` [net 4/6] i40e: Cleaning up missing null-terminate in conjunction with strncpy Jeff Kirsher
2014-08-12 8:43 ` David Laight
2014-08-12 8:38 ` [net 5/6] e1000e: fix trivial kernel doc typos Jeff Kirsher
2014-08-12 8:38 ` [net 6/6] e1000e: delete excessive space character in debug message Jeff Kirsher
2014-08-12 21:30 ` [net 0/6][pull request] Intel Wired LAN Driver Updates 2014-08-12 David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.