Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1038963/?format=api
{ "id": 1038963, "url": "http://patchwork.ozlabs.org/api/patches/1038963/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190208205101.12078-8-anirudh.venkataramanan@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": "<20190208205101.12078-8-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2019-02-08T20:50:54", "name": "[S12,07/14] ice: use ice_for_each_vsi macro when possible", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ce29409def089ca434a0ef7d08d382a56d495130", "submitter": { "id": 73601, "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api", "name": "Anirudh Venkataramanan", "email": "anirudh.venkataramanan@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/20190208205101.12078-8-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 90914, "url": "http://patchwork.ozlabs.org/api/series/90914/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=90914", "date": "2019-02-08T20:50:49", "name": "Bug fixes and minor feature updates for ice", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/90914/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1038963/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1038963/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;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 43x6pr5Cxwz9sMp\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 9 Feb 2019 07:53:40 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 26C7986A3C;\n\tFri, 8 Feb 2019 20:53:34 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id rx2ACCJO2_sM; Fri, 8 Feb 2019 20:53:22 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 4F2FF870F8;\n\tFri, 8 Feb 2019 20:53:22 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id E97541BF97F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 8 Feb 2019 20:51:10 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CDD7C8817F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 8 Feb 2019 20:51:07 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id o3NG419La11z for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 8 Feb 2019 20:51:04 +0000 (UTC)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 6C5108816A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 8 Feb 2019 20:51:04 +0000 (UTC)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Feb 2019 12:51:02 -0800", "from shasta.jf.intel.com ([10.166.241.11])\n\tby fmsmga002.fm.intel.com with ESMTP; 08 Feb 2019 12:51:01 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.58,348,1544515200\"; d=\"scan'208\";a=\"141869790\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 8 Feb 2019 12:50:54 -0800", "Message-Id": "<20190208205101.12078-8-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.14.5", "In-Reply-To": "<20190208205101.12078-1-anirudh.venkataramanan@intel.com>", "References": "<20190208205101.12078-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH S12 07/14] ice: use ice_for_each_vsi macro\n\twhen possible", "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>", "MIME-Version": "1.0", "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": "From: Brett Creeley <brett.creeley@intel.com>\n\nReplace all instances of:\n\tfor (i = 0; i < pf->num_alloc_vsi; i++)\n\nwith the following macro:\n\tice_for_each_vsi(pf, i)\n\nThis will allow the code to be consistent since there are currently\ncases of using both.\n\nSigned-off-by: Brett Creeley <brett.creeley@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 +--\n drivers/net/ethernet/intel/ice/ice_main.c | 12 ++++++------\n drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 2 +-\n 3 files changed, 8 insertions(+), 9 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c\nindex 1be757f63876..b906c7d15d46 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c\n+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c\n@@ -1400,13 +1400,12 @@ ice_set_link_ksettings(struct net_device *netdev,\n \t\treturn -EOPNOTSUPP;\n \n \t/* Check if this is lan vsi */\n-\tfor (idx = 0 ; idx < pf->num_alloc_vsi ; idx++) {\n+\tice_for_each_vsi(pf, idx)\n \t\tif (pf->vsi[idx]->type == ICE_VSI_PF) {\n \t\t\tif (np->vsi != pf->vsi[idx])\n \t\t\t\treturn -EOPNOTSUPP;\n \t\t\tbreak;\n \t\t}\n-\t}\n \n \tif (p->phy.media_type != ICE_MEDIA_BASET &&\n \t p->phy.media_type != ICE_MEDIA_FIBER &&\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex ad1bd3fe1f34..f5ade04cb9de 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -322,7 +322,7 @@ static void ice_sync_fltr_subtask(struct ice_pf *pf)\n \n \tclear_bit(ICE_FLAG_FLTR_SYNC, pf->flags);\n \n-\tfor (v = 0; v < pf->num_alloc_vsi; v++)\n+\tice_for_each_vsi(pf, v)\n \t\tif (pf->vsi[v] && ice_vsi_fltr_changed(pf->vsi[v]) &&\n \t\t ice_vsi_sync_fltr(pf->vsi[v])) {\n \t\t\t/* come back and try again later */\n@@ -642,7 +642,7 @@ static void ice_watchdog_subtask(struct ice_pf *pf)\n \t * can look at updated numbers whenever it cares to\n \t */\n \tice_update_pf_stats(pf);\n-\tfor (i = 0; i < pf->num_alloc_vsi; i++)\n+\tice_for_each_vsi(pf, i)\n \t\tif (pf->vsi[i] && pf->vsi[i]->netdev)\n \t\t\tice_update_vsi_stats(pf->vsi[i]);\n }\n@@ -3273,7 +3273,7 @@ static void ice_vsi_release_all(struct ice_pf *pf)\n \tif (!pf->vsi)\n \t\treturn;\n \n-\tfor (i = 0; i < pf->num_alloc_vsi; i++) {\n+\tice_for_each_vsi(pf, i) {\n \t\tif (!pf->vsi[i])\n \t\t\tcontinue;\n \n@@ -3372,7 +3372,7 @@ static int ice_vsi_rebuild_all(struct ice_pf *pf)\n \tint i;\n \n \t/* loop through pf->vsi array and reinit the VSI if found */\n-\tfor (i = 0; i < pf->num_alloc_vsi; i++) {\n+\tice_for_each_vsi(pf, i) {\n \t\tint err;\n \n \t\tif (!pf->vsi[i])\n@@ -3409,7 +3409,7 @@ static int ice_vsi_replay_all(struct ice_pf *pf)\n \tint i;\n \n \t/* loop through pf->vsi array and replay the VSI if found */\n-\tfor (i = 0; i < pf->num_alloc_vsi; i++) {\n+\tice_for_each_vsi(pf, i) {\n \t\tif (!pf->vsi[i])\n \t\t\tcontinue;\n \n@@ -3520,7 +3520,7 @@ static void ice_rebuild(struct ice_pf *pf)\n \n \tice_reset_all_vfs(pf, true);\n \n-\tfor (i = 0; i < pf->num_alloc_vsi; i++) {\n+\tice_for_each_vsi(pf, i) {\n \t\tbool link_up;\n \n \t\tif (!pf->vsi[i] || pf->vsi[i]->type != ICE_VSI_PF)\ndiff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\nindex a7e1594521ec..99c8cddb2162 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n@@ -1385,7 +1385,7 @@ static struct ice_vsi *ice_find_vsi_from_id(struct ice_pf *pf, u16 id)\n {\n \tint i;\n \n-\tfor (i = 0; i < pf->num_alloc_vsi; i++)\n+\tice_for_each_vsi(pf, i)\n \t\tif (pf->vsi[i] && pf->vsi[i]->vsi_num == id)\n \t\t\treturn pf->vsi[i];\n \n", "prefixes": [ "S12", "07/14" ] }