get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/568510/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 568510,
    "url": "http://patchwork.ozlabs.org/api/patches/568510/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1452897202-15204-3-git-send-email-joshua.a.hay@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": "<1452897202-15204-3-git-send-email-joshua.a.hay@intel.com>",
    "list_archive_url": null,
    "date": "2016-01-15T22:33:09",
    "name": "[next,S28,02/15] i40e: drop unused debugfs file \"dump\"",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d1713261b6affe518ff74fd5fc99b370719f3e15",
    "submitter": {
        "id": 19461,
        "url": "http://patchwork.ozlabs.org/api/people/19461/?format=api",
        "name": "Joshua Hay",
        "email": "joshua.a.hay@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/1452897202-15204-3-git-send-email-joshua.a.hay@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/568510/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/568510/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id EBE21140BAB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Jan 2016 09:33:34 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 669B991A35;\n\tFri, 15 Jan 2016 22:33:33 +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 B31CDjPDkE0a; Fri, 15 Jan 2016 22:33:29 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C3ACF91A67;\n\tFri, 15 Jan 2016 22:33:25 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 10B8B1C2189\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 15 Jan 2016 22:33:25 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 0DA718B14E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 15 Jan 2016 22:33:25 +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 iS917MDduYwP for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 15 Jan 2016 22:33:23 +0000 (UTC)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 38AF48B150\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 15 Jan 2016 22:33:23 +0000 (UTC)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga103.fm.intel.com with ESMTP; 15 Jan 2016 14:33:22 -0800",
            "from jahay1-mobl2.amr.corp.intel.com (HELO\n\tlocalhost.localdomain.localdomain) ([134.134.176.81])\n\tby fmsmga002.fm.intel.com with ESMTP; 15 Jan 2016 14:33:22 -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-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.22,302,1449561600\"; d=\"scan'208\";a=\"894132175\"",
        "From": "Joshua Hay <joshua.a.hay@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 15 Jan 2016 14:33:09 -0800",
        "Message-Id": "<1452897202-15204-3-git-send-email-joshua.a.hay@intel.com>",
        "X-Mailer": "git-send-email 2.1.0",
        "In-Reply-To": "<1452897202-15204-1-git-send-email-joshua.a.hay@intel.com>",
        "References": "<1452897202-15204-1-git-send-email-joshua.a.hay@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S28 02/15] i40e: drop unused debugfs\n\tfile \"dump\"",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.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@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "From: Jesse Brandeburg <jesse.brandeburg@intel.com>\n\nThere was a completely unused file \"dump\" in debugfs that\nnever panned out to be useful.\n\nSigned-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>\nChange-ID: I12bb9e37b5a83299725dda815a8746157baf6562\n---\nTesting Hints: check debugfs, dump entry should be gone.\n\n drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 250 -------------------------\n 1 file changed, 250 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\nindex 34da53b..631c2d6 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n@@ -72,248 +72,6 @@ static struct i40e_veb *i40e_dbg_find_veb(struct i40e_pf *pf, int seid)\n }\n \n /**************************************************************\n- * dump\n- * The dump entry in debugfs is for getting a data snapshow of\n- * the driver's current configuration and runtime details.\n- * When the filesystem entry is written, a snapshot is taken.\n- * When the entry is read, the most recent snapshot data is dumped.\n- **************************************************************/\n-static char *i40e_dbg_dump_buf;\n-static ssize_t i40e_dbg_dump_data_len;\n-static ssize_t i40e_dbg_dump_buffer_len;\n-\n-/**\n- * i40e_dbg_dump_read - read the dump data\n- * @filp: the opened file\n- * @buffer: where to write the data for the user to read\n- * @count: the size of the user's buffer\n- * @ppos: file position offset\n- **/\n-static ssize_t i40e_dbg_dump_read(struct file *filp, char __user *buffer,\n-\t\t\t\t  size_t count, loff_t *ppos)\n-{\n-\tint bytes_not_copied;\n-\tint len;\n-\n-\t/* is *ppos bigger than the available data? */\n-\tif (*ppos >= i40e_dbg_dump_data_len || !i40e_dbg_dump_buf)\n-\t\treturn 0;\n-\n-\t/* be sure to not read beyond the end of available data */\n-\tlen = min_t(int, count, (i40e_dbg_dump_data_len - *ppos));\n-\n-\tbytes_not_copied = copy_to_user(buffer, &i40e_dbg_dump_buf[*ppos], len);\n-\tif (bytes_not_copied)\n-\t\treturn -EFAULT;\n-\n-\t*ppos += len;\n-\treturn len;\n-}\n-\n-/**\n- * i40e_dbg_prep_dump_buf\n- * @pf: the PF we're working with\n- * @buflen: the desired buffer length\n- *\n- * Return positive if success, 0 if failed\n- **/\n-static int i40e_dbg_prep_dump_buf(struct i40e_pf *pf, int buflen)\n-{\n-\t/* if not already big enough, prep for re alloc */\n-\tif (i40e_dbg_dump_buffer_len && i40e_dbg_dump_buffer_len < buflen) {\n-\t\tkfree(i40e_dbg_dump_buf);\n-\t\ti40e_dbg_dump_buffer_len = 0;\n-\t\ti40e_dbg_dump_buf = NULL;\n-\t}\n-\n-\t/* get a new buffer if needed */\n-\tif (!i40e_dbg_dump_buf) {\n-\t\ti40e_dbg_dump_buf = kzalloc(buflen, GFP_KERNEL);\n-\t\tif (i40e_dbg_dump_buf != NULL)\n-\t\t\ti40e_dbg_dump_buffer_len = buflen;\n-\t}\n-\n-\treturn i40e_dbg_dump_buffer_len;\n-}\n-\n-/**\n- * i40e_dbg_dump_write - trigger a datadump snapshot\n- * @filp: the opened file\n- * @buffer: where to find the user's data\n- * @count: the length of the user's data\n- * @ppos: file position offset\n- *\n- * Any write clears the stats\n- **/\n-static ssize_t i40e_dbg_dump_write(struct file *filp,\n-\t\t\t\t   const char __user *buffer,\n-\t\t\t\t   size_t count, loff_t *ppos)\n-{\n-\tstruct i40e_pf *pf = filp->private_data;\n-\tbool seid_found = false;\n-\tlong seid = -1;\n-\tint buflen = 0;\n-\tint i, ret;\n-\tint len;\n-\tu8 *p;\n-\n-\t/* don't allow partial writes */\n-\tif (*ppos != 0)\n-\t\treturn 0;\n-\n-\t/* decode the SEID given to be dumped */\n-\tret = kstrtol_from_user(buffer, count, 0, &seid);\n-\n-\tif (ret) {\n-\t\tdev_info(&pf->pdev->dev, \"bad seid value\\n\");\n-\t} else if (seid == 0) {\n-\t\tseid_found = true;\n-\n-\t\tkfree(i40e_dbg_dump_buf);\n-\t\ti40e_dbg_dump_buffer_len = 0;\n-\t\ti40e_dbg_dump_data_len = 0;\n-\t\ti40e_dbg_dump_buf = NULL;\n-\t\tdev_info(&pf->pdev->dev, \"debug buffer freed\\n\");\n-\n-\t} else if (seid == pf->pf_seid || seid == 1) {\n-\t\tseid_found = true;\n-\n-\t\tbuflen = sizeof(struct i40e_pf);\n-\t\tbuflen += (sizeof(struct i40e_aq_desc)\n-\t\t     * (pf->hw.aq.num_arq_entries + pf->hw.aq.num_asq_entries));\n-\n-\t\tif (i40e_dbg_prep_dump_buf(pf, buflen)) {\n-\t\t\tp = i40e_dbg_dump_buf;\n-\n-\t\t\t/* avoid use of memcpy here due to sparse warning\n-\t\t\t * about copy size.\n-\t\t\t */\n-\t\t\t*((struct i40e_pf *)p) = *pf;\n-\t\t\tp += sizeof(struct i40e_pf);\n-\n-\t\t\tlen = (sizeof(struct i40e_aq_desc)\n-\t\t\t\t\t* pf->hw.aq.num_asq_entries);\n-\t\t\tmemcpy(p, pf->hw.aq.asq.desc_buf.va, len);\n-\t\t\tp += len;\n-\n-\t\t\tlen = (sizeof(struct i40e_aq_desc)\n-\t\t\t\t\t* pf->hw.aq.num_arq_entries);\n-\t\t\tmemcpy(p, pf->hw.aq.arq.desc_buf.va, len);\n-\t\t\tp += len;\n-\n-\t\t\ti40e_dbg_dump_data_len = buflen;\n-\t\t\tdev_info(&pf->pdev->dev,\n-\t\t\t\t \"PF seid %ld dumped %d bytes\\n\",\n-\t\t\t\t seid, (int)i40e_dbg_dump_data_len);\n-\t\t}\n-\t} else if (seid >= I40E_BASE_VSI_SEID) {\n-\t\tstruct i40e_vsi *vsi = NULL;\n-\t\tstruct i40e_mac_filter *f;\n-\t\tint filter_count = 0;\n-\n-\t\tmutex_lock(&pf->switch_mutex);\n-\t\tvsi = i40e_dbg_find_vsi(pf, seid);\n-\t\tif (!vsi) {\n-\t\t\tmutex_unlock(&pf->switch_mutex);\n-\t\t\tgoto write_exit;\n-\t\t}\n-\n-\t\tbuflen = sizeof(struct i40e_vsi);\n-\t\tbuflen += sizeof(struct i40e_q_vector) * vsi->num_q_vectors;\n-\t\tbuflen += sizeof(struct i40e_ring) * 2 * vsi->num_queue_pairs;\n-\t\tbuflen += sizeof(struct i40e_tx_buffer) * vsi->num_queue_pairs;\n-\t\tbuflen += sizeof(struct i40e_rx_buffer) * vsi->num_queue_pairs;\n-\t\tlist_for_each_entry(f, &vsi->mac_filter_list, list)\n-\t\t\tfilter_count++;\n-\t\tbuflen += sizeof(struct i40e_mac_filter) * filter_count;\n-\n-\t\tif (i40e_dbg_prep_dump_buf(pf, buflen)) {\n-\t\t\tp = i40e_dbg_dump_buf;\n-\t\t\tseid_found = true;\n-\n-\t\t\tlen = sizeof(struct i40e_vsi);\n-\t\t\tmemcpy(p, vsi, len);\n-\t\t\tp += len;\n-\n-\t\t\tif (vsi->num_q_vectors) {\n-\t\t\t\tlen = (sizeof(struct i40e_q_vector)\n-\t\t\t\t\t* vsi->num_q_vectors);\n-\t\t\t\tmemcpy(p, vsi->q_vectors, len);\n-\t\t\t\tp += len;\n-\t\t\t}\n-\n-\t\t\tif (vsi->num_queue_pairs) {\n-\t\t\t\tlen = (sizeof(struct i40e_ring) *\n-\t\t\t\t      vsi->num_queue_pairs);\n-\t\t\t\tmemcpy(p, vsi->tx_rings, len);\n-\t\t\t\tp += len;\n-\t\t\t\tmemcpy(p, vsi->rx_rings, len);\n-\t\t\t\tp += len;\n-\t\t\t}\n-\n-\t\t\tif (vsi->tx_rings[0]) {\n-\t\t\t\tlen = sizeof(struct i40e_tx_buffer);\n-\t\t\t\tfor (i = 0; i < vsi->num_queue_pairs; i++) {\n-\t\t\t\t\tmemcpy(p, vsi->tx_rings[i]->tx_bi, len);\n-\t\t\t\t\tp += len;\n-\t\t\t\t}\n-\t\t\t\tlen = sizeof(struct i40e_rx_buffer);\n-\t\t\t\tfor (i = 0; i < vsi->num_queue_pairs; i++) {\n-\t\t\t\t\tmemcpy(p, vsi->rx_rings[i]->rx_bi, len);\n-\t\t\t\t\tp += len;\n-\t\t\t\t}\n-\t\t\t}\n-\n-\t\t\t/* macvlan filter list */\n-\t\t\tlen = sizeof(struct i40e_mac_filter);\n-\t\t\tlist_for_each_entry(f, &vsi->mac_filter_list, list) {\n-\t\t\t\tmemcpy(p, f, len);\n-\t\t\t\tp += len;\n-\t\t\t}\n-\n-\t\t\ti40e_dbg_dump_data_len = buflen;\n-\t\t\tdev_info(&pf->pdev->dev,\n-\t\t\t\t \"VSI seid %ld dumped %d bytes\\n\",\n-\t\t\t\t seid, (int)i40e_dbg_dump_data_len);\n-\t\t}\n-\t\tmutex_unlock(&pf->switch_mutex);\n-\t} else if (seid >= I40E_BASE_VEB_SEID) {\n-\t\tstruct i40e_veb *veb = NULL;\n-\n-\t\tmutex_lock(&pf->switch_mutex);\n-\t\tveb = i40e_dbg_find_veb(pf, seid);\n-\t\tif (!veb) {\n-\t\t\tmutex_unlock(&pf->switch_mutex);\n-\t\t\tgoto write_exit;\n-\t\t}\n-\n-\t\tbuflen = sizeof(struct i40e_veb);\n-\t\tif (i40e_dbg_prep_dump_buf(pf, buflen)) {\n-\t\t\tseid_found = true;\n-\t\t\tmemcpy(i40e_dbg_dump_buf, veb, buflen);\n-\t\t\ti40e_dbg_dump_data_len = buflen;\n-\t\t\tdev_info(&pf->pdev->dev,\n-\t\t\t\t \"VEB seid %ld dumped %d bytes\\n\",\n-\t\t\t\t seid, (int)i40e_dbg_dump_data_len);\n-\t\t}\n-\t\tmutex_unlock(&pf->switch_mutex);\n-\t}\n-\n-write_exit:\n-\tif (!seid_found)\n-\t\tdev_info(&pf->pdev->dev, \"unknown seid %ld\\n\", seid);\n-\n-\treturn count;\n-}\n-\n-static const struct file_operations i40e_dbg_dump_fops = {\n-\t.owner = THIS_MODULE,\n-\t.open =  simple_open,\n-\t.read =  i40e_dbg_dump_read,\n-\t.write = i40e_dbg_dump_write,\n-};\n-\n-/**************************************************************\n  * command\n  * The command entry in debugfs is for giving the driver commands\n  * to be executed - these may be for changing the internal switch\n@@ -2217,11 +1975,6 @@ void i40e_dbg_pf_init(struct i40e_pf *pf)\n \tif (!pfile)\n \t\tgoto create_failed;\n \n-\tpfile = debugfs_create_file(\"dump\", 0600, pf->i40e_dbg_pf, pf,\n-\t\t\t\t    &i40e_dbg_dump_fops);\n-\tif (!pfile)\n-\t\tgoto create_failed;\n-\n \tpfile = debugfs_create_file(\"netdev_ops\", 0600, pf->i40e_dbg_pf, pf,\n \t\t\t\t    &i40e_dbg_netdev_ops_fops);\n \tif (!pfile)\n@@ -2242,9 +1995,6 @@ void i40e_dbg_pf_exit(struct i40e_pf *pf)\n {\n \tdebugfs_remove_recursive(pf->i40e_dbg_pf);\n \tpf->i40e_dbg_pf = NULL;\n-\n-\tkfree(i40e_dbg_dump_buf);\n-\ti40e_dbg_dump_buf = NULL;\n }\n \n /**\n",
    "prefixes": [
        "next",
        "S28",
        "02/15"
    ]
}