diff for duplicates of <1449045535.3716.10.camel@perches.com> diff --git a/a/1.txt b/N1/1.txt index 741e56c..fdff426 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -14,82 +14,81 @@ 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(-) + 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; + 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; + 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 + #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 + #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) + 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) + 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) { + 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) + } + 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) + #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) + #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) + #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) + #endif + if (pf->flags & I40E_FLAG_VEB_MODE_ENABLED) - i += snprintf(&buf[i], REMAIN(i), "VEPA "); + i += snprintf(&buf[i], REMAIN(i), " VEB"); -? else + 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); -?} -? + WARN_ON(i > INFO_STRING_LEN); + } diff --git a/a/content_digest b/N1/content_digest index 486da61..f44df0f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -6,9 +6,13 @@ "ref\01449002936.1593.10.camel@perches.com\0" "ref\01449041100.3224.17.camel@intel.com\0" "From\0Joe Perches <joe@perches.com>\0" - "Subject\0[Intel-wired-lan] [PATCH] i40e: Fix i40e_print_features() VEB mode output\0" + "Subject\0[PATCH] i40e: Fix i40e_print_features() VEB mode output\0" "Date\0Wed, 02 Dec 2015 00:38:55 -0800\0" - "To\0intel-wired-lan@osuosl.org\0" + "To\0intel-wired-lan <intel-wired-lan@lists.osuosl.org>\0" + "Cc\0Jeff Kirsher <jeffrey.t.kirsher@intel.com>" + netdev <netdev@vger.kernel.org> + Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> + " Shannon Nelson <shannon.nelson@intel.com>\0" "\00:1\0" "b\0" "Commit 7fd89545f337 (\"i40e: remove BUG_ON from feature string building\")\n" @@ -27,84 +31,83 @@ "Noticed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>\n" "Signed-off-by: Joe Perches <joe@perches.com>\n" "---\n" - "?drivers/net/ethernet/intel/i40e/i40e_main.c | 42 +++++++++++++----------------\n" - "?1 file changed, 19 insertions(+), 23 deletions(-)\n" + "\302\240drivers/net/ethernet/intel/i40e/i40e_main.c | 42 +++++++++++++----------------\n" + "\302\2401 file changed, 19 insertions(+), 23 deletions(-)\n" "\n" "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\n" "index 4b7d874..145eeb5 100644\n" "--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n" "+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n" "@@ -10240,52 +10240,48 @@ static int i40e_setup_pf_filter_control(struct i40e_pf *pf)\n" - "?static void i40e_print_features(struct i40e_pf *pf)\n" - "?{\n" - "?\tstruct i40e_hw *hw = &pf->hw;\n" + "\302\240static void i40e_print_features(struct i40e_pf *pf)\n" + "\302\240{\n" + "\302\240\tstruct i40e_hw *hw = &pf->hw;\n" "-\tchar *buf, *string;\n" "-\tint i = 0;\n" "+\tchar *buf;\n" "+\tint i;\n" - "?\n" + "\302\240\n" "-\tstring = kzalloc(INFO_STRING_LEN, GFP_KERNEL);\n" "-\tif (!string) {\n" "-\t\tdev_err(&pf->pdev->dev, \"Features string allocation failed\\n\");\n" "+\tbuf = kmalloc(INFO_STRING_LEN, GFP_KERNEL);\n" "+\tif (!buf)\n" - "?\t\treturn;\n" + "\302\240\t\treturn;\n" "-\t}\n" "-\n" "-\tbuf = string;\n" - "?\n" + "\302\240\n" "-\ti += snprintf(&buf[i], REMAIN(i), \"Features: PF-id[%d] \", hw->pf_id);\n" "+\ti = snprintf(buf, INFO_STRING_LEN, \"Features: PF-id[%d]\", hw->pf_id);\n" - "?#ifdef CONFIG_PCI_IOV\n" + "\302\240#ifdef CONFIG_PCI_IOV\n" "-\ti += snprintf(&buf[i], REMAIN(i), \"VFs: %d \", pf->num_req_vfs);\n" "+\ti += snprintf(&buf[i], REMAIN(i), \" VFs: %d\", pf->num_req_vfs);\n" - "?#endif\n" + "\302\240#endif\n" "-\ti += snprintf(&buf[i], REMAIN(i), \"VSIs: %d QP: %d RX: %s \",\n" "+\ti += snprintf(&buf[i], REMAIN(i), \" VSIs: %d QP: %d RX: %s\",\n" - "?\t\t??????pf->hw.func_caps.num_vsis,\n" - "?\t\t??????pf->vsi[pf->lan_vsi]->num_queue_pairs,\n" - "?\t\t??????pf->flags & I40E_FLAG_RX_PS_ENABLED ? \"PS\" : \"1BUF\");\n" - "?\n" - "?\tif (pf->flags & I40E_FLAG_RSS_ENABLED)\n" + "\302\240\t\t\302\240\302\240\302\240\302\240\302\240\302\240pf->hw.func_caps.num_vsis,\n" + "\302\240\t\t\302\240\302\240\302\240\302\240\302\240\302\240pf->vsi[pf->lan_vsi]->num_queue_pairs,\n" + "\302\240\t\t\302\240\302\240\302\240\302\240\302\240\302\240pf->flags & I40E_FLAG_RX_PS_ENABLED ? \"PS\" : \"1BUF\");\n" + "\302\240\n" + "\302\240\tif (pf->flags & I40E_FLAG_RSS_ENABLED)\n" "-\t\ti += snprintf(&buf[i], REMAIN(i), \"RSS \");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" RSS\");\n" - "?\tif (pf->flags & I40E_FLAG_FD_ATR_ENABLED)\n" + "\302\240\tif (pf->flags & I40E_FLAG_FD_ATR_ENABLED)\n" "-\t\ti += snprintf(&buf[i], REMAIN(i), \"FD_ATR \");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" FD_ATR\");\n" - "?\tif (pf->flags & I40E_FLAG_FD_SB_ENABLED) {\n" + "\302\240\tif (pf->flags & I40E_FLAG_FD_SB_ENABLED) {\n" "-\t\ti += snprintf(&buf[i], REMAIN(i), \"FD_SB \");\n" "-\t\ti += snprintf(&buf[i], REMAIN(i), \"NTUPLE \");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" FD_SB\");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" NTUPLE\");\n" - "?\t}\n" - "?\tif (pf->flags & I40E_FLAG_DCB_CAPABLE)\n" + "\302\240\t}\n" + "\302\240\tif (pf->flags & I40E_FLAG_DCB_CAPABLE)\n" "-\t\ti += snprintf(&buf[i], REMAIN(i), \"DCB \");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" DCB\");\n" - "?#if IS_ENABLED(CONFIG_VXLAN)\n" + "\302\240#if IS_ENABLED(CONFIG_VXLAN)\n" "-\ti += snprintf(&buf[i], REMAIN(i), \"VxLAN \");\n" "+\ti += snprintf(&buf[i], REMAIN(i), \" VxLAN\");\n" - "?#endif\n" - "?\tif (pf->flags & I40E_FLAG_PTP)\n" + "\302\240#endif\n" + "\302\240\tif (pf->flags & I40E_FLAG_PTP)\n" "-\t\ti += snprintf(&buf[i], REMAIN(i), \"PTP \");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" PTP\");\n" - "?#ifdef I40E_FCOE\n" - "?\tif (pf->flags & I40E_FLAG_FCOE_ENABLED)\n" + "\302\240#ifdef I40E_FCOE\n" + "\302\240\tif (pf->flags & I40E_FLAG_FCOE_ENABLED)\n" "-\t\ti += snprintf(&buf[i], REMAIN(i), \"FCOE \");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" FCOE\");\n" - "?#endif\n" - "?\tif (pf->flags & I40E_FLAG_VEB_MODE_ENABLED)\n" + "\302\240#endif\n" + "\302\240\tif (pf->flags & I40E_FLAG_VEB_MODE_ENABLED)\n" "-\t\ti += snprintf(&buf[i], REMAIN(i), \"VEPA \");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" VEB\");\n" - "?\telse\n" + "\302\240\telse\n" "-\t\tbuf += sprintf(buf, \"VEPA \");\n" "+\t\ti += snprintf(&buf[i], REMAIN(i), \" VEPA\");\n" - "?\n" + "\302\240\n" "-\tdev_info(&pf->pdev->dev, \"%s\\n\", string);\n" "-\tkfree(string);\n" "+\tdev_info(&pf->pdev->dev, \"%s\\n\", buf);\n" "+\tkfree(buf);\n" - "?\tWARN_ON(i > INFO_STRING_LEN);\n" - "?}\n" - ? + "\302\240\tWARN_ON(i > INFO_STRING_LEN);\n" + "\302\240}" -53df71cc854e643faed91957bafde84faffff9b13ddec3a89f4273d8c91dfb1b +45be4a54659d2de7d8eb3bd1379b121f1c6a21130ba43bf17d0a61fc2d727685
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.