Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1261087/?format=api
{ "id": 1261087, "url": "http://patchwork.ozlabs.org/api/patches/1261087/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200325003824.5487-3-andre.guedes@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20200325003824.5487-3-andre.guedes@intel.com>", "list_archive_url": null, "date": "2020-03-25T00:38:16", "name": "[02/10] igc: Use netdev log helpers in igc_ethtool.c", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ab9e5093c77e526386c3c7207522804bc40232ea", "submitter": { "id": 72323, "url": "http://patchwork.ozlabs.org/api/people/72323/?format=api", "name": "Andre Guedes", "email": "andre.guedes@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200325003824.5487-3-andre.guedes@intel.com/mbox/", "series": [ { "id": 166478, "url": "http://patchwork.ozlabs.org/api/series/166478/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=166478", "date": "2020-03-25T00:38:14", "name": "igc: Align log messages", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/166478/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1261087/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1261087/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.136;\n\thelo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 48n8PP44h2z9sRY\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 25 Mar 2020 11:38:49 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id B5F272408D;\n\tWed, 25 Mar 2020 00:38:46 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id JzHTKeCYTISv; Wed, 25 Mar 2020 00:38:38 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id E7EFD20107;\n\tWed, 25 Mar 2020 00:38:38 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 5043B1BF32A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 25 Mar 2020 00:38:37 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1C1BD20028\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 25 Mar 2020 00:38:36 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id LDM18lxbZGuu for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 25 Mar 2020 00:38:34 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 9107623B2B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 25 Mar 2020 00:38:34 +0000 (UTC)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; \n\t24 Mar 2020 17:38:34 -0700", "from johnorte-mobl2.amr.corp.intel.com ([10.251.10.249])\n\tby fmsmga006.fm.intel.com with ESMTP; 24 Mar 2020 17:38:34 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "IronPort-SDR": [ "Z2pM+JmCJEzini3iJU5igiteqqCHAyQZPzRfkXlJ42AaJwEIRbKvETCrt0IN38ALWZlQ+RgPVP\n\tkHov4It9hc8Q==", "keuukZ7dVScMd4YPOtvLBtat9WedBq55BhOFs9kZ5ChUl8T8g298tBFSLkaeWEN8q98otKzXpi\n\tSyAvtRr7Me0Q==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.72,302,1580803200\"; d=\"scan'208\";a=\"448099340\"", "From": "Andre Guedes <andre.guedes@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 24 Mar 2020 17:38:16 -0700", "Message-Id": "<20200325003824.5487-3-andre.guedes@intel.com>", "X-Mailer": "git-send-email 2.25.0", "In-Reply-To": "<20200325003824.5487-1-andre.guedes@intel.com>", "References": "<20200325003824.5487-1-andre.guedes@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 02/10] igc: Use netdev log helpers in\n\tigc_ethtool.c", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "In igc_ethtool.c we print log messages using dev_* helpers, generating\ninconsistent output with the rest of the driver. Since this is a network\ndevice driver, we should preferably use netdev_* helpers because they\nappend the interface name to the message, helping making sense the of\nthe logs.\n\nThis patch converts all dev_* calls to netdev_*. It also takes this\nopportunity to remove the '\\n' character at the end of messages since it\nis automatically added by netdev_* log helpers.\n\nSigned-off-by: Andre Guedes <andre.guedes@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_ethtool.c | 48 +++++++++-----------\n 1 file changed, 22 insertions(+), 26 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c\nindex 37bfa5b420c6..47115d73ea61 100644\n--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c\n+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c\n@@ -1155,8 +1155,8 @@ static int igc_set_rss_hash_opt(struct igc_adapter *adapter,\n \n \t\tif ((flags & UDP_RSS_FLAGS) &&\n \t\t !(adapter->flags & UDP_RSS_FLAGS))\n-\t\t\tdev_err(&adapter->pdev->dev,\n-\t\t\t\t\"enabling UDP RSS: fragmented packets may arrive out of order to the stack above\\n\");\n+\t\t\tnetdev_err(adapter->netdev,\n+\t\t\t\t \"Enabling UDP RSS: fragmented packets may arrive out of order to the stack above\");\n \n \t\tadapter->flags = flags;\n \n@@ -1195,7 +1195,8 @@ static int igc_rxnfc_write_etype_filter(struct igc_adapter *adapter,\n \t\t\tbreak;\n \t}\n \tif (i == MAX_ETYPE_FILTER) {\n-\t\tdev_err(&adapter->pdev->dev, \"ethtool -N: etype filters are all used.\\n\");\n+\t\tnetdev_err(adapter->netdev,\n+\t\t\t \"ethtool -N: etype filters are all used\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -1236,7 +1237,8 @@ static int igc_rxnfc_write_vlan_prio_filter(struct igc_adapter *adapter,\n \t/* check whether this vlan prio is already set */\n \tif (vlapqf & IGC_VLAPQF_P_VALID(vlan_priority) &&\n \t queue_index != input->action) {\n-\t\tdev_err(&adapter->pdev->dev, \"ethtool rxnfc set vlan prio filter failed.\\n\");\n+\t\tnetdev_err(adapter->netdev,\n+\t\t\t \"ethtool rxnfc set vlan prio filter failed\");\n \t\treturn -EEXIST;\n \t}\n \n@@ -1255,8 +1257,8 @@ int igc_add_filter(struct igc_adapter *adapter, struct igc_nfc_filter *input)\n \n \tif (hw->mac.type == igc_i225 &&\n \t !(input->filter.match_flags & ~IGC_FILTER_FLAG_SRC_MAC_ADDR)) {\n-\t\tdev_err(&adapter->pdev->dev,\n-\t\t\t\"i225 doesn't support flow classification rules specifying only source addresses.\\n\");\n+\t\tnetdev_err(adapter->netdev,\n+\t\t\t \"i225 doesn't support flow classification rules specifying only source addresses\");\n \t\treturn -EOPNOTSUPP;\n \t}\n \n@@ -1404,13 +1406,14 @@ static int igc_add_ethtool_nfc_entry(struct igc_adapter *adapter,\n \t */\n \tif (fsp->ring_cookie == RX_CLS_FLOW_DISC ||\n \t fsp->ring_cookie >= adapter->num_rx_queues) {\n-\t\tdev_err(&adapter->pdev->dev, \"ethtool -N: The specified action is invalid\\n\");\n+\t\tnetdev_err(netdev,\n+\t\t\t \"ethtool -N: The specified action is invalid\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* Don't allow indexes to exist outside of available space */\n \tif (fsp->location >= IGC_MAX_RXNFC_FILTERS) {\n-\t\tdev_err(&adapter->pdev->dev, \"Location out of range\\n\");\n+\t\tnetdev_err(netdev, \"Location out of range\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -1458,8 +1461,8 @@ static int igc_add_ethtool_nfc_entry(struct igc_adapter *adapter,\n \t\tif (!memcmp(&input->filter, &rule->filter,\n \t\t\t sizeof(input->filter))) {\n \t\t\terr = -EEXIST;\n-\t\t\tdev_err(&adapter->pdev->dev,\n-\t\t\t\t\"ethtool: this filter is already set\\n\");\n+\t\t\tnetdev_err(netdev,\n+\t\t\t\t \"ethtool: this filter is already set\");\n \t\t\tgoto err_out_w_lock;\n \t\t}\n \t}\n@@ -1832,6 +1835,7 @@ static int igc_set_link_ksettings(struct net_device *netdev,\n \t\t\t\t const struct ethtool_link_ksettings *cmd)\n {\n \tstruct igc_adapter *adapter = netdev_priv(netdev);\n+\tstruct net_device *dev = adapter->netdev;\n \tstruct igc_hw *hw = &adapter->hw;\n \tu32 advertising;\n \n@@ -1839,8 +1843,7 @@ static int igc_set_link_ksettings(struct net_device *netdev,\n \t * cannot be changed\n \t */\n \tif (igc_check_reset_block(hw)) {\n-\t\tdev_err(&adapter->pdev->dev,\n-\t\t\t\"Cannot change link characteristics when reset is active.\\n\");\n+\t\tnetdev_err(dev, \"Cannot change link characteristics when reset is active\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -1851,7 +1854,7 @@ static int igc_set_link_ksettings(struct net_device *netdev,\n \tif (cmd->base.eth_tp_mdix_ctrl) {\n \t\tif (cmd->base.eth_tp_mdix_ctrl != ETH_TP_MDI_AUTO &&\n \t\t cmd->base.autoneg != AUTONEG_ENABLE) {\n-\t\t\tdev_err(&adapter->pdev->dev, \"forcing MDI/MDI-X state is not supported when link speed and/or duplex are forced\\n\");\n+\t\t\tnetdev_err(dev, \"Forcing MDI/MDI-X state is not supported when link speed and/or duplex are forced\");\n \t\t\treturn -EINVAL;\n \t\t}\n \t}\n@@ -1868,9 +1871,7 @@ static int igc_set_link_ksettings(struct net_device *netdev,\n \t\tif (adapter->fc_autoneg)\n \t\t\thw->fc.requested_mode = igc_fc_default;\n \t} else {\n-\t\t/* calling this overrides forced MDI setting */\n-\t\tdev_info(&adapter->pdev->dev,\n-\t\t\t \"Force mode currently not supported\\n\");\n+\t\tnetdev_info(dev, \"Force mode currently not supported\");\n \t}\n \n \t/* MDI-X => 2; MDI => 1; Auto => 3 */\n@@ -1904,8 +1905,7 @@ static void igc_diag_test(struct net_device *netdev,\n \tbool if_running = netif_running(netdev);\n \n \tif (eth_test->flags == ETH_TEST_FL_OFFLINE) {\n-\t\tdev_info(&adapter->pdev->dev,\n-\t\t\t \"offline testing starting\\n\");\n+\t\tnetdev_info(netdev, \"Offline testing starting\");\n \t\tset_bit(__IGC_TESTING, &adapter->state);\n \n \t\t/* Link test performed before hardware reset so autoneg doesn't\n@@ -1919,22 +1919,19 @@ static void igc_diag_test(struct net_device *netdev,\n \t\telse\n \t\t\tigc_reset(adapter);\n \n-\t\tdev_info(&adapter->pdev->dev,\n-\t\t\t \"register testing starting\\n\");\n+\t\tnetdev_info(netdev, \"Register testing starting\");\n \t\tif (igc_reg_test(adapter, &data[IGC_ETH_TEST_REG]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \n \t\tigc_reset(adapter);\n \n-\t\tdev_info(&adapter->pdev->dev,\n-\t\t\t \"eeprom testing starting\\n\");\n+\t\tnetdev_info(netdev, \"EEPROM testing starting\");\n \t\tif (igc_eeprom_test(adapter, &data[IGC_ETH_TEST_EEPROM]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \n \t\tigc_reset(adapter);\n \n-\t\tdev_info(&adapter->pdev->dev,\n-\t\t\t \"interrupt testing starting\\n\");\n+\t\tnetdev_info(netdev, \"Interrupt testing starting\");\n \t\tif (igc_intr_test(adapter, &data[IGC_ETH_TEST_INTR]))\n \t\t\teth_test->flags |= ETH_TEST_FL_FAILED;\n \n@@ -1947,8 +1944,7 @@ static void igc_diag_test(struct net_device *netdev,\n \t\tif (if_running)\n \t\t\tigc_open(netdev);\n \t} else {\n-\t\tdev_info(&adapter->pdev->dev,\n-\t\t\t \"online testing starting\\n\");\n+\t\tnetdev_info(netdev, \"Online testing starting\");\n \n \t\t/* register, eeprom, intr and loopback tests not run online */\n \t\tdata[IGC_ETH_TEST_REG] = 0;\n", "prefixes": [ "02/10" ] }