get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1285697,
    "url": "http://patchwork.ozlabs.org/api/patches/1285697/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200508004113.39725-8-anthony.l.nguyen@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": "<20200508004113.39725-8-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2020-05-08T00:41:06",
    "name": "[S41,08/15] ice: cleanup vf_id signedness",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "04debb853aabac7a8ba41382e135fe444e4bfca0",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@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/20200508004113.39725-8-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 175527,
            "url": "http://patchwork.ozlabs.org/api/series/175527/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=175527",
            "date": "2020-05-08T00:41:10",
            "name": "[S41,01/15] ice: Add VF promiscuous support",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/175527/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1285697/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1285697/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 spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=silver.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)",
            "ozlabs.org;\n dmarc=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 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49JBR061z5z9sSW\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 May 2020 10:43:56 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 2F08820434;\n\tFri,  8 May 2020 00:43:55 +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 iJr-cqL7VYTz; Fri,  8 May 2020 00:43:45 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 49BD721515;\n\tFri,  8 May 2020 00:43:44 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by ash.osuosl.org (Postfix) with ESMTP id 27AD41BF2C4\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2020 00:43:39 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by whitealder.osuosl.org (Postfix) with ESMTP id 0B61C878A8\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2020 00:43:39 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id lcCVNqNyf41o for <intel-wired-lan@lists.osuosl.org>;\n Fri,  8 May 2020 00:43:35 +0000 (UTC)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by whitealder.osuosl.org (Postfix) with ESMTPS id 1AC9587A84\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2020 00:43:35 +0000 (UTC)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 May 2020 17:43:34 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.241.65])\n by orsmga007.jf.intel.com with ESMTP; 07 May 2020 17:43:33 -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": [
            "\n LwEUoD/LVN6MgN5WXsN+YQn4U6M+NyYatcPqE3geW8YUJRSdvvbXw8xq8w8Fj1XNbmZQ/SLTL3\n 34bUokUO0iVw==",
            "\n 9MCHbCGWgCMSx2YcopFp5l8xSfw4T6sv9b5NIOw+T0IqqK0TqKCDRsDA2dek2eAWKVwxhBtLm5\n YNyNt5mLQ9tw=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,365,1583222400\"; d=\"scan'208\";a=\"249468773\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu,  7 May 2020 17:41:06 -0700",
        "Message-Id": "<20200508004113.39725-8-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200508004113.39725-1-anthony.l.nguyen@intel.com>",
        "References": "<20200508004113.39725-1-anthony.l.nguyen@intel.com>",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH S41 08/15] ice: cleanup vf_id signedness",
        "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 <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <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": "From: Jesse Brandeburg <jesse.brandeburg@intel.com>\n\nThe vf_id variable is dealt with in the code in inconsistent\nways of sign usage, preventing compilation with -Werror=sign-compare.\nFix this problem in the code by always treating vf_id as unsigned, since\nthere are no valid values of vf_id that are negative.\n\nSigned-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice.h            |  2 +-\n .../net/ethernet/intel/ice/ice_virtchnl_pf.c    | 17 +++++++++--------\n .../net/ethernet/intel/ice/ice_virtchnl_pf.h    |  2 +-\n 3 files changed, 11 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex 9926cc47755b..adb4f1366e9f 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -377,7 +377,7 @@ struct ice_pf {\n \tstruct ice_sw *first_sw;\t/* first switch created by firmware */\n \t/* Virtchnl/SR-IOV config info */\n \tstruct ice_vf *vf;\n-\tint num_alloc_vfs;\t\t/* actual number of VFs allocated */\n+\tu16 num_alloc_vfs;\t\t/* actual number of VFs allocated */\n \tu16 num_vfs_supported;\t\t/* num VFs supported for this PF */\n \tu16 num_qps_per_vf;\n \tu16 num_msix_per_vf;\ndiff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\nindex c8b8741a3b47..9aa02f74e88c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c\n@@ -10,10 +10,11 @@\n  * @pf: pointer to the PF structure\n  * @vf_id: the ID of the VF to check\n  */\n-static int ice_validate_vf_id(struct ice_pf *pf, int vf_id)\n+static int ice_validate_vf_id(struct ice_pf *pf, u16 vf_id)\n {\n+\t/* vf_id range is only valid for 0-255, and should always be unsigned */\n \tif (vf_id >= pf->num_alloc_vfs) {\n-\t\tdev_err(ice_pf_to_dev(pf), \"Invalid VF ID: %d\\n\", vf_id);\n+\t\tdev_err(ice_pf_to_dev(pf), \"Invalid VF ID: %u\\n\", vf_id);\n \t\treturn -EINVAL;\n \t}\n \treturn 0;\n@@ -27,7 +28,7 @@ static int ice_validate_vf_id(struct ice_pf *pf, int vf_id)\n static int ice_check_vf_init(struct ice_pf *pf, struct ice_vf *vf)\n {\n \tif (!test_bit(ICE_VF_STATE_INIT, vf->vf_states)) {\n-\t\tdev_err(ice_pf_to_dev(pf), \"VF ID: %d in reset. Try again.\\n\",\n+\t\tdev_err(ice_pf_to_dev(pf), \"VF ID: %u in reset. Try again.\\n\",\n \t\t\tvf->vf_id);\n \t\treturn -EBUSY;\n \t}\n@@ -368,7 +369,7 @@ void ice_free_vfs(struct ice_pf *pf)\n \t * before this function ever gets called.\n \t */\n \tif (!pci_vfs_assigned(pf->pdev)) {\n-\t\tint vf_id;\n+\t\tunsigned int vf_id;\n \n \t\t/* Acknowledge VFLR for all VFs. Without this, VFs will fail to\n \t\t * work correctly when SR-IOV gets re-enabled.\n@@ -399,9 +400,9 @@ static void ice_trigger_vf_reset(struct ice_vf *vf, bool is_vflr, bool is_pfr)\n {\n \tstruct ice_pf *pf = vf->pf;\n \tu32 reg, reg_idx, bit_idx;\n+\tunsigned int vf_abs_id, i;\n \tstruct device *dev;\n \tstruct ice_hw *hw;\n-\tint vf_abs_id, i;\n \n \tdev = ice_pf_to_dev(pf);\n \thw = &pf->hw;\n@@ -449,7 +450,7 @@ static void ice_trigger_vf_reset(struct ice_vf *vf, bool is_vflr, bool is_pfr)\n \t\tif ((reg & VF_TRANS_PENDING_M) == 0)\n \t\t\tbreak;\n \n-\t\tdev_err(dev, \"VF %d PCI transactions stuck\\n\", vf->vf_id);\n+\t\tdev_err(dev, \"VF %u PCI transactions stuck\\n\", vf->vf_id);\n \t\tudelay(ICE_PCI_CIAD_WAIT_DELAY_US);\n \t}\n }\n@@ -1490,7 +1491,7 @@ int ice_sriov_configure(struct pci_dev *pdev, int num_vfs)\n void ice_process_vflr_event(struct ice_pf *pf)\n {\n \tstruct ice_hw *hw = &pf->hw;\n-\tint vf_id;\n+\tunsigned int vf_id;\n \tu32 reg;\n \n \tif (!test_and_clear_bit(__ICE_VFLR_EVENT_PENDING, pf->state) ||\n@@ -1531,7 +1532,7 @@ static void ice_vc_reset_vf(struct ice_vf *vf)\n  */\n static struct ice_vf *ice_get_vf_from_pfq(struct ice_pf *pf, u16 pfq)\n {\n-\tint vf_id;\n+\tunsigned int vf_id;\n \n \tice_for_each_vf(pf, vf_id) {\n \t\tstruct ice_vf *vf = &pf->vf[vf_id];\ndiff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\nindex f7fd1188efa4..474293ff4fe5 100644\n--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\n+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h\n@@ -64,7 +64,7 @@ struct ice_mdd_vf_events {\n struct ice_vf {\n \tstruct ice_pf *pf;\n \n-\ts16 vf_id;\t\t\t/* VF ID in the PF space */\n+\tu16 vf_id;\t\t\t/* VF ID in the PF space */\n \tu16 lan_vsi_idx;\t\t/* index into PF struct */\n \t/* first vector index of this VF in the PF space */\n \tint first_vector_idx;\n",
    "prefixes": [
        "S41",
        "08/15"
    ]
}