* [patch 2.6.14-rc2 0/2] minor cleanups for s2io @ 2005-09-28 21:50 John W. Linville 2005-09-28 21:50 ` [patch 2.6.14-rc2 1/2] s2io: change strncpy length arg to use size of target John W. Linville 0 siblings, 1 reply; 4+ messages in thread From: John W. Linville @ 2005-09-28 21:50 UTC (permalink / raw) To: linux-kernel, netdev; +Cc: jgarzik, leonid.grossman A couple of minor cleanups for the s2io driver: -- Use the target length as the third argument to strncpy in s2io_ethtool_gdrvinfo() -- Add a MODULE_VERSION entry Patches to follow... ^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 2.6.14-rc2 1/2] s2io: change strncpy length arg to use size of target 2005-09-28 21:50 [patch 2.6.14-rc2 0/2] minor cleanups for s2io John W. Linville @ 2005-09-28 21:50 ` John W. Linville 2005-09-28 21:50 ` [patch 2.6.14-rc2 2/2] s2io: add MODULE_VERSION to s2io driver John W. Linville 0 siblings, 1 reply; 4+ messages in thread From: John W. Linville @ 2005-09-28 21:50 UTC (permalink / raw) To: linux-kernel, netdev; +Cc: jgarzik, leonid.grossman Use the size of the target array for the length argument to strncpy instead of the size of the source or a magic number. Signed-off-by: John W. Linville <linville@tuxdriver.com> --- drivers/net/s2io.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -3778,11 +3778,10 @@ static void s2io_ethtool_gdrvinfo(struct { nic_t *sp = dev->priv; - strncpy(info->driver, s2io_driver_name, sizeof(s2io_driver_name)); - strncpy(info->version, s2io_driver_version, - sizeof(s2io_driver_version)); - strncpy(info->fw_version, "", 32); - strncpy(info->bus_info, pci_name(sp->pdev), 32); + strncpy(info->driver, s2io_driver_name, sizeof(info->driver)); + strncpy(info->version, s2io_driver_version, sizeof(info->version)); + strncpy(info->fw_version, "", sizeof(info->fw_version)); + strncpy(info->bus_info, pci_name(sp->pdev), sizeof(info->bus_info)); info->regdump_len = XENA_REG_SPACE; info->eedump_len = XENA_EEPROM_SPACE; info->testinfo_len = S2IO_TEST_LEN; ^ permalink raw reply [flat|nested] 4+ messages in thread
* [patch 2.6.14-rc2 2/2] s2io: add MODULE_VERSION to s2io driver 2005-09-28 21:50 ` [patch 2.6.14-rc2 1/2] s2io: change strncpy length arg to use size of target John W. Linville @ 2005-09-28 21:50 ` John W. Linville 2005-10-04 11:51 ` Jeff Garzik 0 siblings, 1 reply; 4+ messages in thread From: John W. Linville @ 2005-09-28 21:50 UTC (permalink / raw) To: linux-kernel, netdev; +Cc: jgarzik, leonid.grossman Add a MODULE_VERSION entry for the s2io driver. Signed-off-by: John W. Linville <linville@tuxdriver.com> --- drivers/net/s2io.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -65,9 +65,11 @@ #include "s2io.h" #include "s2io-regs.h" +#define DRV_VERSION "2.0.8.1" + /* S2io Driver name & version. */ static char s2io_driver_name[] = "Neterion"; -static char s2io_driver_version[] = "Version 2.0.8.1"; +static char s2io_driver_version[] = DRV_VERSION; static inline int RXD_IS_UP2DT(RxD_t *rxdp) { @@ -5227,6 +5229,8 @@ static void s2io_init_pci(nic_t * sp) MODULE_AUTHOR("Raghavendra Koushik <raghavendra.koushik@neterion.com>"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); + module_param(tx_fifo_num, int, 0); module_param(rx_ring_num, int, 0); module_param_array(tx_fifo_len, uint, NULL, 0); @@ -5570,7 +5574,7 @@ s2io_init_nic(struct pci_dev *pdev, cons if (sp->device_type & XFRAME_II_DEVICE) { DBG_PRINT(ERR_DBG, "%s: Neterion Xframe II 10GbE adapter ", dev->name); - DBG_PRINT(ERR_DBG, "(rev %d), %s", + DBG_PRINT(ERR_DBG, "(rev %d), Version %s", get_xena_rev_id(sp->pdev), s2io_driver_version); #ifdef CONFIG_2BUFF_MODE @@ -5594,7 +5598,7 @@ s2io_init_nic(struct pci_dev *pdev, cons } else { DBG_PRINT(ERR_DBG, "%s: Neterion Xframe I 10GbE adapter ", dev->name); - DBG_PRINT(ERR_DBG, "(rev %d), %s", + DBG_PRINT(ERR_DBG, "(rev %d), Version %s", get_xena_rev_id(sp->pdev), s2io_driver_version); #ifdef CONFIG_2BUFF_MODE ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2.6.14-rc2 2/2] s2io: add MODULE_VERSION to s2io driver 2005-09-28 21:50 ` [patch 2.6.14-rc2 2/2] s2io: add MODULE_VERSION to s2io driver John W. Linville @ 2005-10-04 11:51 ` Jeff Garzik 0 siblings, 0 replies; 4+ messages in thread From: Jeff Garzik @ 2005-10-04 11:51 UTC (permalink / raw) To: John W. Linville; +Cc: linux-kernel, netdev, leonid.grossman applied patches 1-2 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-10-04 11:51 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-09-28 21:50 [patch 2.6.14-rc2 0/2] minor cleanups for s2io John W. Linville 2005-09-28 21:50 ` [patch 2.6.14-rc2 1/2] s2io: change strncpy length arg to use size of target John W. Linville 2005-09-28 21:50 ` [patch 2.6.14-rc2 2/2] s2io: add MODULE_VERSION to s2io driver John W. Linville 2005-10-04 11:51 ` Jeff Garzik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).