get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1197407,
    "url": "http://patchwork.ozlabs.org/api/patches/1197407/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20191119114411.41911-1-sasha.neftin@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": "<20191119114411.41911-1-sasha.neftin@intel.com>",
    "list_archive_url": null,
    "date": "2019-11-19T11:44:11",
    "name": "[v1,05/15] igc: Remove no need declaration of the igc_alloc_mapped_page",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "57f1d591f77d0ebacb821d780c8dde0111fe25ab",
    "submitter": {
        "id": 69860,
        "url": "http://patchwork.ozlabs.org/api/people/69860/?format=api",
        "name": "Sasha Neftin",
        "email": "sasha.neftin@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/20191119114411.41911-1-sasha.neftin@intel.com/mbox/",
    "series": [
        {
            "id": 143759,
            "url": "http://patchwork.ozlabs.org/api/series/143759/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=143759",
            "date": "2019-11-19T11:43:32",
            "name": "[v1,01/15] igc: Remove no need declaration of the igc_clean_tx_ring",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/143759/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1197407/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1197407/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.138;\n\thelo=whitealder.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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 47HP9t46tsz9sPj\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Nov 2019 22:44:18 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1CC3A87465;\n\tTue, 19 Nov 2019 11:44:17 +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 8X-avkvmY5mO; Tue, 19 Nov 2019 11:44:15 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id ECD4D87034;\n\tTue, 19 Nov 2019 11:44:15 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 4214E1BF83B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Nov 2019 11:44:14 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 3D10188303\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Nov 2019 11:44:14 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id uvD42km-tUOF for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Nov 2019 11:44:13 +0000 (UTC)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 8FD7B86963\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Nov 2019 11:44:13 +0000 (UTC)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Nov 2019 03:44:12 -0800",
            "from ccdlinuxdev08.iil.intel.com ([143.185.161.150])\n\tby orsmga004.jf.intel.com with ESMTP; 19 Nov 2019 03:44:11 -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.68,322,1569308400\"; d=\"scan'208\";a=\"357087004\"",
        "From": "Sasha Neftin <sasha.neftin@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 19 Nov 2019 13:44:11 +0200",
        "Message-Id": "<20191119114411.41911-1-sasha.neftin@intel.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "Subject": "[Intel-wired-lan] [PATCH v1 05/15] igc: Remove no need declaration\n\tof the igc_alloc_mapped_page",
        "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": "We want to avoid forward-declarations of function if possible.\nRearrange the igc_alloc_mapped_page function implementation.\n\nSigned-off-by: Sasha Neftin <sasha.neftin@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_main.c | 94 +++++++++++++++----------------\n 1 file changed, 46 insertions(+), 48 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c\nindex 8a2baf8ad956..d26875592937 100644\n--- a/drivers/net/ethernet/intel/igc/igc_main.c\n+++ b/drivers/net/ethernet/intel/igc/igc_main.c\n@@ -63,8 +63,6 @@ static void igc_free_q_vectors(struct igc_adapter *adapter);\n static void igc_irq_disable(struct igc_adapter *adapter);\n static void igc_irq_enable(struct igc_adapter *adapter);\n static void igc_configure_msix(struct igc_adapter *adapter);\n-static bool igc_alloc_mapped_page(struct igc_ring *rx_ring,\n-\t\t\t\t  struct igc_rx_buffer *bi);\n \n enum latency_range {\n \tlowest_latency = 0,\n@@ -1606,6 +1604,52 @@ static void igc_put_rx_buffer(struct igc_ring *rx_ring,\n \trx_buffer->page = NULL;\n }\n \n+static inline unsigned int igc_rx_offset(struct igc_ring *rx_ring)\n+{\n+\treturn ring_uses_build_skb(rx_ring) ? IGC_SKB_PAD : 0;\n+}\n+\n+static bool igc_alloc_mapped_page(struct igc_ring *rx_ring,\n+\t\t\t\t  struct igc_rx_buffer *bi)\n+{\n+\tstruct page *page = bi->page;\n+\tdma_addr_t dma;\n+\n+\t/* since we are recycling buffers we should seldom need to alloc */\n+\tif (likely(page))\n+\t\treturn true;\n+\n+\t/* alloc new page for storage */\n+\tpage = dev_alloc_pages(igc_rx_pg_order(rx_ring));\n+\tif (unlikely(!page)) {\n+\t\trx_ring->rx_stats.alloc_failed++;\n+\t\treturn false;\n+\t}\n+\n+\t/* map page for use */\n+\tdma = dma_map_page_attrs(rx_ring->dev, page, 0,\n+\t\t\t\t igc_rx_pg_size(rx_ring),\n+\t\t\t\t DMA_FROM_DEVICE,\n+\t\t\t\t IGC_RX_DMA_ATTR);\n+\n+\t/* if mapping failed free memory back to system since\n+\t * there isn't much point in holding memory we can't use\n+\t */\n+\tif (dma_mapping_error(rx_ring->dev, dma)) {\n+\t\t__free_page(page);\n+\n+\t\trx_ring->rx_stats.alloc_failed++;\n+\t\treturn false;\n+\t}\n+\n+\tbi->dma = dma;\n+\tbi->page = page;\n+\tbi->page_offset = igc_rx_offset(rx_ring);\n+\tbi->pagecnt_bias = 1;\n+\n+\treturn true;\n+}\n+\n /**\n  * igc_alloc_rx_buffers - Replace used receive buffers; packet split\n  * @rx_ring: rx descriptor ring\n@@ -1767,52 +1811,6 @@ static int igc_clean_rx_irq(struct igc_q_vector *q_vector, const int budget)\n \treturn total_packets;\n }\n \n-static inline unsigned int igc_rx_offset(struct igc_ring *rx_ring)\n-{\n-\treturn ring_uses_build_skb(rx_ring) ? IGC_SKB_PAD : 0;\n-}\n-\n-static bool igc_alloc_mapped_page(struct igc_ring *rx_ring,\n-\t\t\t\t  struct igc_rx_buffer *bi)\n-{\n-\tstruct page *page = bi->page;\n-\tdma_addr_t dma;\n-\n-\t/* since we are recycling buffers we should seldom need to alloc */\n-\tif (likely(page))\n-\t\treturn true;\n-\n-\t/* alloc new page for storage */\n-\tpage = dev_alloc_pages(igc_rx_pg_order(rx_ring));\n-\tif (unlikely(!page)) {\n-\t\trx_ring->rx_stats.alloc_failed++;\n-\t\treturn false;\n-\t}\n-\n-\t/* map page for use */\n-\tdma = dma_map_page_attrs(rx_ring->dev, page, 0,\n-\t\t\t\t igc_rx_pg_size(rx_ring),\n-\t\t\t\t DMA_FROM_DEVICE,\n-\t\t\t\t IGC_RX_DMA_ATTR);\n-\n-\t/* if mapping failed free memory back to system since\n-\t * there isn't much point in holding memory we can't use\n-\t */\n-\tif (dma_mapping_error(rx_ring->dev, dma)) {\n-\t\t__free_page(page);\n-\n-\t\trx_ring->rx_stats.alloc_failed++;\n-\t\treturn false;\n-\t}\n-\n-\tbi->dma = dma;\n-\tbi->page = page;\n-\tbi->page_offset = igc_rx_offset(rx_ring);\n-\tbi->pagecnt_bias = 1;\n-\n-\treturn true;\n-}\n-\n /**\n  * igc_clean_tx_irq - Reclaim resources after transmit completes\n  * @q_vector: pointer to q_vector containing needed info\n",
    "prefixes": [
        "v1",
        "05/15"
    ]
}