* [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output [not found] ` <1449041100.3224.17.camel@intel.com> @ 2015-12-02 8:38 ` Joe Perches 2015-12-02 9:56 ` Jeff Kirsher 2015-12-03 12:13 ` Jeff Kirsher 0 siblings, 2 replies; 6+ messages in thread From: Joe Perches @ 2015-12-02 8:38 UTC (permalink / raw) To: intel-wired-lan Commit 7fd89545f337 ("i40e: remove BUG_ON from feature string building") added defective output when I40E_FLAG_VEB_MODE_ENABLED was set in function i40e_print_features. Fix it. Miscellanea: o Remove unnecessary string variable o Add space before not after fixed strings o Use kmalloc not kzalloc o Don't initialize i to 0, use result of first snprintf Noticed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Joe Perches <joe@perches.com> --- ?drivers/net/ethernet/intel/i40e/i40e_main.c | 42 +++++++++++++---------------- ?1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 4b7d874..145eeb5 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -10240,52 +10240,48 @@ static int i40e_setup_pf_filter_control(struct i40e_pf *pf) ?static void i40e_print_features(struct i40e_pf *pf) ?{ ? struct i40e_hw *hw = &pf->hw; - char *buf, *string; - int i = 0; + char *buf; + int i; ? - string = kzalloc(INFO_STRING_LEN, GFP_KERNEL); - if (!string) { - dev_err(&pf->pdev->dev, "Features string allocation failed\n"); + buf = kmalloc(INFO_STRING_LEN, GFP_KERNEL); + if (!buf) ? return; - } - - buf = string; ? - i += snprintf(&buf[i], REMAIN(i), "Features: PF-id[%d] ", hw->pf_id); + i = snprintf(buf, INFO_STRING_LEN, "Features: PF-id[%d]", hw->pf_id); ?#ifdef CONFIG_PCI_IOV - i += snprintf(&buf[i], REMAIN(i), "VFs: %d ", pf->num_req_vfs); + i += snprintf(&buf[i], REMAIN(i), " VFs: %d", pf->num_req_vfs); ?#endif - i += snprintf(&buf[i], REMAIN(i), "VSIs: %d QP: %d RX: %s ", + i += snprintf(&buf[i], REMAIN(i), " VSIs: %d QP: %d RX: %s", ? ??????pf->hw.func_caps.num_vsis, ? ??????pf->vsi[pf->lan_vsi]->num_queue_pairs, ? ??????pf->flags & I40E_FLAG_RX_PS_ENABLED ? "PS" : "1BUF"); ? ? if (pf->flags & I40E_FLAG_RSS_ENABLED) - i += snprintf(&buf[i], REMAIN(i), "RSS "); + i += snprintf(&buf[i], REMAIN(i), " RSS"); ? if (pf->flags & I40E_FLAG_FD_ATR_ENABLED) - i += snprintf(&buf[i], REMAIN(i), "FD_ATR "); + i += snprintf(&buf[i], REMAIN(i), " FD_ATR"); ? if (pf->flags & I40E_FLAG_FD_SB_ENABLED) { - i += snprintf(&buf[i], REMAIN(i), "FD_SB "); - i += snprintf(&buf[i], REMAIN(i), "NTUPLE "); + i += snprintf(&buf[i], REMAIN(i), " FD_SB"); + i += snprintf(&buf[i], REMAIN(i), " NTUPLE"); ? } ? if (pf->flags & I40E_FLAG_DCB_CAPABLE) - i += snprintf(&buf[i], REMAIN(i), "DCB "); + i += snprintf(&buf[i], REMAIN(i), " DCB"); ?#if IS_ENABLED(CONFIG_VXLAN) - i += snprintf(&buf[i], REMAIN(i), "VxLAN "); + i += snprintf(&buf[i], REMAIN(i), " VxLAN"); ?#endif ? if (pf->flags & I40E_FLAG_PTP) - i += snprintf(&buf[i], REMAIN(i), "PTP "); + i += snprintf(&buf[i], REMAIN(i), " PTP"); ?#ifdef I40E_FCOE ? if (pf->flags & I40E_FLAG_FCOE_ENABLED) - i += snprintf(&buf[i], REMAIN(i), "FCOE "); + i += snprintf(&buf[i], REMAIN(i), " FCOE"); ?#endif ? if (pf->flags & I40E_FLAG_VEB_MODE_ENABLED) - i += snprintf(&buf[i], REMAIN(i), "VEPA "); + i += snprintf(&buf[i], REMAIN(i), " VEB"); ? else - buf += sprintf(buf, "VEPA "); + i += snprintf(&buf[i], REMAIN(i), " VEPA"); ? - dev_info(&pf->pdev->dev, "%s\n", string); - kfree(string); + dev_info(&pf->pdev->dev, "%s\n", buf); + kfree(buf); ? WARN_ON(i > INFO_STRING_LEN); ?} ? ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output 2015-12-02 8:38 ` [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output Joe Perches @ 2015-12-02 9:56 ` Jeff Kirsher 2015-12-02 10:12 ` Joe Perches 2015-12-03 12:13 ` Jeff Kirsher 1 sibling, 1 reply; 6+ messages in thread From: Jeff Kirsher @ 2015-12-02 9:56 UTC (permalink / raw) To: intel-wired-lan On Wed, 2015-12-02 at 00:38 -0800, Joe Perches wrote: > Commit 7fd89545f337 ("i40e: remove BUG_ON from feature string > building") > added defective output when I40E_FLAG_VEB_MODE_ENABLED was set in > function i40e_print_features. > > Fix it. > > Miscellanea: > > o Remove unnecessary string variable > o Add space before not after fixed strings > o Use kmalloc not kzalloc > o Don't initialize i to 0, use result of first snprintf > > Noticed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Don't you mean Reported-by? ?I am not aware of Noticed-by as being a recognized signature. > Signed-off-by: Joe Perches <joe@perches.com> > --- > ?drivers/net/ethernet/intel/i40e/i40e_main.c | 42 +++++++++++++---- > ------------ > ?1 file changed, 19 insertions(+), 23 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20151202/7301bf93/attachment-0001.asc> ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output 2015-12-02 9:56 ` Jeff Kirsher @ 2015-12-02 10:12 ` Joe Perches 2015-12-02 20:48 ` David Miller 0 siblings, 1 reply; 6+ messages in thread From: Joe Perches @ 2015-12-02 10:12 UTC (permalink / raw) To: intel-wired-lan On Wed, 2015-12-02 at 01:56 -0800, Jeff Kirsher wrote: > On Wed, 2015-12-02 at 00:38 -0800, Joe Perches wrote: > > Commit 7fd89545f337 ("i40e: remove BUG_ON from feature string > > building") > > added defective output when I40E_FLAG_VEB_MODE_ENABLED was set in > > function i40e_print_features. > > > > Fix it. > > > > Miscellanea: > > > > o Remove unnecessary string variable > > o Add space before not after fixed strings > > o Use kmalloc not kzalloc > > o Don't initialize i to 0, use result of first snprintf > > > > Noticed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > > Don't you mean Reported-by? ?I am not aware of Noticed-by as being a > recognized signature. At least for the get_maintainer script, "<anything>-by:" is a signature ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output 2015-12-02 10:12 ` Joe Perches @ 2015-12-02 20:48 ` David Miller 2015-12-02 21:09 ` Joe Perches 0 siblings, 1 reply; 6+ messages in thread From: David Miller @ 2015-12-02 20:48 UTC (permalink / raw) To: intel-wired-lan From: Joe Perches <joe@perches.com> Date: Wed, 02 Dec 2015 02:12:29 -0800 > On Wed, 2015-12-02 at 01:56 -0800, Jeff Kirsher wrote: >> On Wed, 2015-12-02 at 00:38 -0800, Joe Perches wrote: >> > Commit 7fd89545f337 ("i40e: remove BUG_ON from feature string >> > building") >> > added defective output when I40E_FLAG_VEB_MODE_ENABLED was set in >> > function i40e_print_features. >> > >> > Fix it. >> > >> > Miscellanea: >> > >> > o Remove unnecessary string variable >> > o Add space before not after fixed strings >> > o Use kmalloc not kzalloc >> > o Don't initialize i to 0, use result of first snprintf >> > >> > Noticed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> >> >> Don't you mean Reported-by? ?I am not aware of Noticed-by as being a >> recognized signature. > > At least for the get_maintainer script, "<anything>-by:" is a signature Is patchwork using the same regexp? If not, for the time being don't user non-standard tags, and furthermore please ask the patchwork folks to use something similar to getmaintainer.pl Thanks. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output 2015-12-02 20:48 ` David Miller @ 2015-12-02 21:09 ` Joe Perches 0 siblings, 0 replies; 6+ messages in thread From: Joe Perches @ 2015-12-02 21:09 UTC (permalink / raw) To: intel-wired-lan On Wed, 2015-12-02 at 15:48 -0500, David Miller wrote: > From: Joe Perches <joe@perches.com> 02 Dec 2015 02:12:29 -0800 > > On Wed, 2015-12-02 at 01:56 -0800, Jeff Kirsher wrote: > >> On Wed, 2015-12-02 at 00:38 -0800, Joe Perches wrote: > >> > Noticed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>? > >> Don't you mean Reported-by? ?I am not aware of Noticed-by as being a > >> recognized signature.? > > At least for the get_maintainer script, "-by:" is a signature > Is patchwork using the same regexp?? If not, for the time being don't > user non-standard tags, and furthermore please ask the patchwork folks > to use something similar to getmaintainer.pl It doesn't seem so. ????response_re = re.compile( ????????r'^(Tested|Reviewed|Acked|Signed-off|Nacked|Reported)-by: .*$', ????????re.M | re.I) patchwork also doesn't seem very forgiving of misformatted signatures. (btw: Junio Hamano seems to prefer calling them trailers) And patchwork doesn't seem to handle "cc: " markers either. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output 2015-12-02 8:38 ` [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output Joe Perches 2015-12-02 9:56 ` Jeff Kirsher @ 2015-12-03 12:13 ` Jeff Kirsher 1 sibling, 0 replies; 6+ messages in thread From: Jeff Kirsher @ 2015-12-03 12:13 UTC (permalink / raw) To: intel-wired-lan On Wed, 2015-12-02 at 00:38 -0800, Joe Perches wrote: > Commit 7fd89545f337 ("i40e: remove BUG_ON from feature string > building") > added defective output when I40E_FLAG_VEB_MODE_ENABLED was set in > function i40e_print_features. > > Fix it. > > Miscellanea: > > o Remove unnecessary string variable > o Add space before not after fixed strings > o Use kmalloc not kzalloc > o Don't initialize i to 0, use result of first snprintf > > Noticed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > Signed-off-by: Joe Perches <joe@perches.com> > --- > ?drivers/net/ethernet/intel/i40e/i40e_main.c | 42 +++++++++++++---- > ------------ > ?1 file changed, 19 insertions(+), 23 deletions(-) Your patch does not apply cleanly, it appears you used Dave's net-next tree to generate your patch, versus my next-queue tree (dev-queue branch) which has a number of i40e patches already applied. As a one-time only reminder, I have gone ahead and applied your patch by hand. ?I will send your updated patch out here in just a minute. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20151203/a43bd7a2/attachment.asc> ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-03 12:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1448475679-57194-1-git-send-email-jeffrey.t.kirsher@intel.com>
[not found] ` <1448475679-57194-5-git-send-email-jeffrey.t.kirsher@intel.com>
[not found] ` <5655FD72.70902@cogentembedded.com>
[not found] ` <1448476535.3021.5.camel@intel.com>
[not found] ` <1448480194.20113.48.camel@perches.com>
[not found] ` <1449002936.1593.10.camel@perches.com>
[not found] ` <1449041100.3224.17.camel@intel.com>
2015-12-02 8:38 ` [Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output Joe Perches
2015-12-02 9:56 ` Jeff Kirsher
2015-12-02 10:12 ` Joe Perches
2015-12-02 20:48 ` David Miller
2015-12-02 21:09 ` Joe Perches
2015-12-03 12:13 ` Jeff Kirsher
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox