get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 113282,
    "url": "http://patches.dpdk.org/api/patches/113282/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220623022615.3628093-2-jin.liu@corigine.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20220623022615.3628093-2-jin.liu@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220623022615.3628093-2-jin.liu@corigine.com",
    "date": "2022-06-23T02:26:03",
    "name": "[v4,01/13] net/nfp: change the coding style",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "115dced49c2056cfa7ae5bc86fd4f75ba7b05fdf",
    "submitter": {
        "id": 2670,
        "url": "http://patches.dpdk.org/api/people/2670/?format=api",
        "name": "Jin Liu",
        "email": "jin.liu@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220623022615.3628093-2-jin.liu@corigine.com/mbox/",
    "series": [
        {
            "id": 23707,
            "url": "http://patches.dpdk.org/api/series/23707/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23707",
            "date": "2022-06-23T02:26:02",
            "name": "Add support of NFP3800 chip and firmware with NFDk",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/23707/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/113282/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/113282/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D6BABA0545;\n\tThu, 23 Jun 2022 04:27:00 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9964A427ED;\n\tThu, 23 Jun 2022 04:27:00 +0200 (CEST)",
            "from NAM10-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam10on2122.outbound.protection.outlook.com [40.107.93.122])\n by mails.dpdk.org (Postfix) with ESMTP id 1980F40DDB\n for <dev@dpdk.org>; Thu, 23 Jun 2022 04:26:56 +0200 (CEST)",
            "from DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21)\n by SN6PR13MB2272.namprd13.prod.outlook.com (2603:10b6:805:5e::24) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Thu, 23 Jun\n 2022 02:26:54 +0000",
            "from DM6PR13MB3004.namprd13.prod.outlook.com\n ([fe80::ac31:a36a:cc15:cd35]) by DM6PR13MB3004.namprd13.prod.outlook.com\n ([fe80::ac31:a36a:cc15:cd35%7]) with mapi id 15.20.5373.015; Thu, 23 Jun 2022\n 02:26:54 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=lCHjTccUavnTSSkoZctYSDrqTN5PkP1pSdEo39pq0NLN1FqyLmeVOnmx1yc+h01Yf3yxP1tZB6EVWoR0hKxefdvQ7Aw2wI9hCePAf/FmkCFRyJqKbxsobq3FeSIrsNxEzbleYUXGciXe2lhk4hzTpq7lbdGq183oOMhzmRqb40mGCQRc6BELwapjLGZ3A4oWbsPmA3kK9tfRmDOTTibly3f/oIiAAoQAT45ZYulOS11YKdp84iYlKU2VnQv6O1ph6ylsV3MAKc6tT9qg/i3WDOik8zdC+pOhJp52xJhaumKTabRmDTIaSTgTXgfQhp26FUD9zhkcuVkvQZQtAqGYsQ==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=E1F0KhzKNLTITEtuMBBwGbCAeEgIHdkg/fCLINgmD14=;\n b=Z3yNXgpimca8EYaQdbdhgNgSam8A6exBXibpuVuHiYBRvhsoAI05XRD5D66/pliU4iqFC4OYbLaGHB8QjJ3v7aMobsNh0ZXSZVumm4G8vJYFumVCY3OvOb+2LDgCvsvnj+KfYeXqyrlZsoBGUPL1tmF142hFo5sqVBRS/ZtffzYOxvi4BIzIZTH+ezY7AOOyf9pTHOMAkOBsc/Z0/CZ1w6oh6p+Uv+wGirn67k6v7l6It9icOzAVHb3wZTcexDc1X3LdRSSG6MXowK5CMxji4jPX5l4AZddeIPnswWeM0DIwEaNTKAUBIRnh8KN+MH4w/petQGNRCnQf6CDs2/G8GA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com;\n dkim=pass header.d=corigine.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=E1F0KhzKNLTITEtuMBBwGbCAeEgIHdkg/fCLINgmD14=;\n b=R9mSMgr0Vdz09WIl9kDrJcDgziTATmibXaUeiS5ewWA76e1NDJnKWvA0/BLTn86Wg2Vzo+nts/mESFxRWaoo3XS4NlEM++gqD3pDjrlIybmc8NmzIN9TNjYf0hgqj00y7HaDTZ7osd5xvIT+47votXbxu3B1bDp7xMsUWrjQ5qg=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=corigine.com;",
        "From": "Jin Liu <jin.liu@corigine.com>",
        "To": "dev@dpdk.org",
        "Cc": "niklas.soderlund@corigine.com, Jin Liu <jin.liu@corigine.com>,\n Chaoyong He <chaoyong.he@corigine.com>",
        "Subject": "[PATCH v4 01/13] net/nfp: change the coding style",
        "Date": "Thu, 23 Jun 2022 04:26:03 +0200",
        "Message-Id": "<20220623022615.3628093-2-jin.liu@corigine.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20220623022615.3628093-1-jin.liu@corigine.com>",
        "References": "<20220617093444.2004000-1-jin.liu@corigine.com>\n <20220623022615.3628093-1-jin.liu@corigine.com>",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-ClientProxiedBy": "LO4P265CA0222.GBRP265.PROD.OUTLOOK.COM\n (2603:10a6:600:33a::10) To DM6PR13MB3004.namprd13.prod.outlook.com\n (2603:10b6:5:191::21)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "70c229fa-ebd6-4a7e-0fb2-08da54bfd65f",
        "X-MS-TrafficTypeDiagnostic": "SN6PR13MB2272:EE_",
        "X-Microsoft-Antispam-PRVS": "\n <SN6PR13MB227229BFE58C76AACB25492A94B59@SN6PR13MB2272.namprd13.prod.outlook.com>",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n c/W9HilCx3yqr1ZySY1g4ndqKqm7QC9d1l1eB3XBXahch2CTcRY15kPuDNB9FK7Qs4i90bC6pJSD6363SSg5phUrL6/fhax5RIPqCZqQ2XsEC4l5xDhaa5joJj5PUz4rSCxERfrkTq9jmygrVNGHEYOGIx3WX5eFYRhGzmBP5nNos3ZNNRgv+Be2ubVabHdBo02LanswNwARLuq+A8vpz3EKCoceBgbUnt5yoqjVI2H8grFyoTrla/JaoGDxW0WMvWAursq62CcKwVjkaIQhUKa6SMmg32AwtVnvqifGBev9n9IqPaPtm3NMrNdOIcMWZ8v61GfFs9GcRmHRUfoIzJVa6JNJ+fO5wqNULdUpoRdk+ruA0D1KR0a8ErqV+S9+wqv+dhGek4idV54ryuaF3Q82IqCrIEUQk3bTTTqVF6cHzxtoScSFp7IsJ7tg5olqKtfCyiy5Fcg0dsNEAVrkaNjWbe0RV3r9NkgI3i+2NF16dY/Gp87d68Dq84WEmP5AjRpbh5KQ2DNLDFsibn5HrruKnfG4SnSnf/CftSR9IdyWPJ6TNaFcmjmJS6t1eSeP0Bx6Qkcfqxa604b4hkcZfYpKuUvxRwyyBck9aA/Ebw9mdNoEIIWgOFIYcGYMc6CYDmJi8rbx2TfrGPXN0U/YhRk2wrvRBerh0B3NfpYj4zXMO0CWel8YD3d64zCyCASI48rNw+OQeB/3/Qy9tuH6cA95KMe7Bf2H1a+98NWGKDbc2i4cQrAMe9MBP5vaJrDytWmU9/N/w47e1zEznohexQ==",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:DM6PR13MB3004.namprd13.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230016)(4636009)(396003)(136003)(39830400003)(346002)(366004)(376002)(1076003)(66574015)(44832011)(6666004)(38100700002)(38350700002)(86362001)(83380400001)(186003)(52116002)(41300700001)(30864003)(316002)(5660300002)(478600001)(2906002)(26005)(4326008)(54906003)(66946007)(6486002)(6512007)(107886003)(36756003)(2616005)(6916009)(66476007)(66556008)(8936002)(8676002)(6506007);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "=?utf-8?q?44oA1ff86KTZcZIc9htEGvZT7rIp?=\n\t=?utf-8?q?nui4MbqjwEhGd4lch6yvj7jkMiGd9IzOsbQsneDcqQCoNPO7GXeJ4T5lyoKToCt06?=\n\t=?utf-8?q?6otaklj+2tCnTOMumnDHNSYfFnrBzWzLhnFtw73SxR+dCXkg4r2fdEQSA5OunHd6n?=\n\t=?utf-8?q?KCdY1degS0fca45JPPagDqljRpSvx8oZ0t+kPiMA33S7IRKY28IQOBLP/wqMqf/Hb?=\n\t=?utf-8?q?SulbeRaPsOZA6k30jmtpsaDZ57NasPUyrd48MGYYA+SsOHxMKMy8IakPjob5UYW/X?=\n\t=?utf-8?q?0d13oYH+UqD8tt/5p10dRBTeymOXk6XPnArBlYxMtT19dGzmGtBH8WBHLiH1evn/+?=\n\t=?utf-8?q?NGZBw/T40GkU65Q0Ikh8P7fNhELqo1RjEK149HFSiguxGgYxKkiMoeCIUBWNa8g2M?=\n\t=?utf-8?q?lkcn8wk65afk5egUPKoYBGrEcgGY/nqZBdWMTadPTkNncGZ0UBVGqvRKPERpLdQkc?=\n\t=?utf-8?q?gntmYvMQ3CdCgKHvzHVLE3MGGG9PuSCMNQBD7O7w8YlDShrr1lWq0zpb5MMCtC5JO?=\n\t=?utf-8?q?mTISpMAdxUZHFngx3GPsJG9Zyuo1xXYCM2dYyM+b0XVHA4cqiT5uRDXKgn1pUEAN2?=\n\t=?utf-8?q?SOHgEsPmMKpgcxEjK7imvs1MprrdlDNRiacBwCBWBIyYbpz6RAWxxHi1ejRJ1L5vn?=\n\t=?utf-8?q?5LpvEVmz906FbVH8RU6ol+7urgigt/49NuTMy+Z2v9KE3gP2nxtAVBQIOj4Ompi6P?=\n\t=?utf-8?q?d0YTuoq3l2BMG6u0m0IGKUL1iyZ3HcE8WkQNYvm8w55MDi6v2sd/G8JTljFaTVzL1?=\n\t=?utf-8?q?83bCZ7psbRfJs0KPbdDfWcBEOJb5YkdJ5XBogBm43KuxYoPn4CRaefOGEav91aup6?=\n\t=?utf-8?q?HN7cdEieXEUFHmjMhN9O86aFCfYX+x/omKAmlNUyLcwKnfev8o4Y7GxrZCaQ7qhZB?=\n\t=?utf-8?q?0E+n4seLQCgFeZewKL67Tva/ZfbdvcTDJUebcFi968E8+B23SdAps67JNHijDyS7z?=\n\t=?utf-8?q?L4N0QTHReYYZe/L07FM7sqca6XDjUB+RGy29nhqHLhJIWT5AyuYhndkXCxeZwxIxF?=\n\t=?utf-8?q?2o9drTgAvUV/QhlEEFlbyvNt+TLF1K0j7ojYKBHjlIuNE36142Lt3MpZrylA2t/J/?=\n\t=?utf-8?q?9Zm5ltWGao26X+fT3IiTALALEUE+gwJcDwK2OMHfAGS0YscKf5k/rCKsLhFjcVguA?=\n\t=?utf-8?q?5S6EUTgRd5Wb1bHAuREUUmOxrjIL2opqETIVi/wYSOmwZlFMNFEL6r8qvFBnxdTLP?=\n\t=?utf-8?q?SbfYTH+rGEu0/3fsYDMC6x/vamHmCvWuSMZUkbyoBbnkGnppIYWGDunt0cuBO/UG5?=\n\t=?utf-8?q?BaBQ/yAWh0HATHLo/YLHVggb979UcZmovs1YcxYHyJok6bqC4MFo6Y1JGtACXyi+u?=\n\t=?utf-8?q?TnvNvahP+ZQSVB8oRppWiAiiPwLQCXFYOYxUMoGwUP8uOnb/vPsvcQdk1KQFmqBxB?=\n\t=?utf-8?q?M+wqGr+6GWt0fhMmU3C5Xvx6101fK91co+87ZDznSUk7Y7D0Be4QxqHJ6+ax1/rao?=\n\t=?utf-8?q?cPsi2ozoPYNqJRU5ynvHzKjzW9lB7bFbo2GXIFhShgOnSY4UsKLMQUYICTBU7LcKT?=\n\t=?utf-8?q?PE1511IyFwrf?=",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 70c229fa-ebd6-4a7e-0fb2-08da54bfd65f",
        "X-MS-Exchange-CrossTenant-AuthSource": "DM6PR13MB3004.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "23 Jun 2022 02:26:54.2137 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "fe128f2c-073b-4c20-818e-7246a585940c",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n clZevsiPHPCea1wU9EKqBkM4eVcAtPnH3PHXmhnn+nNSmulffuikFIH3zgLUQpY7qFy5auKfu2DdYW/Y2nMprA==",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SN6PR13MB2272",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Change the coding style of some logics, to make it more\ncompatible with the DPDK coding style.\n\nSigned-off-by: Chaoyong He <chaoyong.he@corigine.com>\nSigned-off-by: Jin Liu <jin.liu@corigine.com>\nSigned-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>\n---\n drivers/net/nfp/nfp_ethdev.c    | 149 ++++++++++++++++----------------\n drivers/net/nfp/nfp_ethdev_vf.c |   8 +-\n 2 files changed, 77 insertions(+), 80 deletions(-)",
    "diff": "diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c\nindex 9166f65da3..eb0d92a98c 100644\n--- a/drivers/net/nfp/nfp_ethdev.c\n+++ b/drivers/net/nfp/nfp_ethdev.c\n@@ -340,8 +340,7 @@ nfp_net_close(struct rte_eth_dev *dev)\n \n \t/* unregister callback func from eal lib */\n \trte_intr_callback_unregister(pci_dev->intr_handle,\n-\t\t\t\t     nfp_net_dev_interrupt_handler,\n-\t\t\t\t     (void *)dev);\n+\t\t\tnfp_net_dev_interrupt_handler, (void *)dev);\n \n \t/*\n \t * The ixgbe PMD disables the pcie master on the\n@@ -388,8 +387,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)\n \tstruct nfp_pf_dev *pf_dev;\n \tstruct nfp_net_hw *hw;\n \tstruct rte_ether_addr *tmp_ether_addr;\n-\n-\tuint64_t tx_bar_off = 0, rx_bar_off = 0;\n+\tuint64_t rx_bar_off = 0;\n+\tuint64_t tx_bar_off = 0;\n \tuint32_t start_q;\n \tint stride = 4;\n \tint port = 0;\n@@ -404,11 +403,11 @@ nfp_net_init(struct rte_eth_dev *eth_dev)\n \n \t/* NFP can not handle DMA addresses requiring more than 40 bits */\n \tif (rte_mem_check_dma_mask(40)) {\n-\t\tRTE_LOG(ERR, PMD, \"device %s can not be used:\",\n-\t\t\t\t   pci_dev->device.name);\n-\t\tRTE_LOG(ERR, PMD, \"\\trestricted dma mask to 40 bits!\\n\");\n+\t\tRTE_LOG(ERR, PMD,\n+\t\t\t\"device %s can not be used: restricted dma mask to 40 bits!\\n\",\n+\t\t\tpci_dev->device.name);\n \t\treturn -ENODEV;\n-\t};\n+\t}\n \n \tport = ((struct nfp_net_hw *)eth_dev->data->dev_private)->idx;\n \tif (port < 0 || port > 7) {\n@@ -416,14 +415,14 @@ nfp_net_init(struct rte_eth_dev *eth_dev)\n \t\treturn -ENODEV;\n \t}\n \n-\t/* Use PF array of physical ports to get pointer to\n+\t/*\n+\t * Use PF array of physical ports to get pointer to\n \t * this specific port\n \t */\n \thw = pf_dev->ports[port];\n \n \tPMD_INIT_LOG(DEBUG, \"Working with physical port number: %d, \"\n-\t\t\t    \"NFP internal port number: %d\",\n-\t\t\t    port, hw->nfp_idx);\n+\t\t\t\"NFP internal port number: %d\", port, hw->nfp_idx);\n \n \teth_dev->dev_ops = &nfp_net_eth_dev_ops;\n \teth_dev->rx_queue_count = nfp_net_rx_queue_count;\n@@ -456,13 +455,10 @@ nfp_net_init(struct rte_eth_dev *eth_dev)\n \tif (port == 0) {\n \t\thw->ctrl_bar = pf_dev->ctrl_bar;\n \t} else {\n-\t\tif (!pf_dev->ctrl_bar)\n+\t\tif (pf_dev->ctrl_bar == NULL)\n \t\t\treturn -ENODEV;\n-\t\t/* Use port offset in pf ctrl_bar for this\n-\t\t * ports control bar\n-\t\t */\n-\t\thw->ctrl_bar = pf_dev->ctrl_bar +\n-\t\t\t       (port * NFP_PF_CSR_SLICE_SIZE);\n+\t\t/* Use port offset in pf ctrl_bar for this ports control bar */\n+\t\thw->ctrl_bar = pf_dev->ctrl_bar + (port * NFP_PF_CSR_SLICE_SIZE);\n \t}\n \n \tPMD_INIT_LOG(DEBUG, \"ctrl bar: %p\", hw->ctrl_bar);\n@@ -557,8 +553,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)\n \n \ttmp_ether_addr = (struct rte_ether_addr *)&hw->mac_addr;\n \tif (!rte_is_valid_assigned_ether_addr(tmp_ether_addr)) {\n-\t\tPMD_INIT_LOG(INFO, \"Using random mac address for port %d\",\n-\t\t\t\t   port);\n+\t\tPMD_INIT_LOG(INFO, \"Using random mac address for port %d\", port);\n \t\t/* Using random mac addresses for VFs */\n \t\trte_eth_random_addr(&hw->mac_addr[0]);\n \t\tnfp_net_write_mac(hw, (uint8_t *)&hw->mac_addr);\n@@ -583,8 +578,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)\n \tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n \t\t/* Registering LSC interrupt handler */\n \t\trte_intr_callback_register(pci_dev->intr_handle,\n-\t\t\t\t\t   nfp_net_dev_interrupt_handler,\n-\t\t\t\t\t   (void *)eth_dev);\n+\t\t\t\tnfp_net_dev_interrupt_handler, (void *)eth_dev);\n \t\t/* Telling the firmware about the LSC interrupt entry */\n \t\tnn_cfg_writeb(hw, NFP_NET_CFG_LSC, NFP_NET_IRQ_LSC_IDX);\n \t\t/* Recording current stats counters values */\n@@ -656,8 +650,10 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)\n }\n \n static int\n-nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,\n-\t     struct nfp_eth_table *nfp_eth_table, struct nfp_hwinfo *hwinfo)\n+nfp_fw_setup(struct rte_pci_device *dev,\n+\t\tstruct nfp_cpp *cpp,\n+\t\tstruct nfp_eth_table *nfp_eth_table,\n+\t\tstruct nfp_hwinfo *hwinfo)\n {\n \tstruct nfp_nsp *nsp;\n \tconst char *nfp_fw_model;\n@@ -675,12 +671,12 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,\n \n \tif (nfp_eth_table->count == 0 || nfp_eth_table->count > 8) {\n \t\tPMD_DRV_LOG(ERR, \"NFP ethernet table reports wrong ports: %u\",\n-\t\t       nfp_eth_table->count);\n+\t\t\tnfp_eth_table->count);\n \t\treturn -EIO;\n \t}\n \n \tPMD_DRV_LOG(INFO, \"NFP ethernet port table reports %u ports\",\n-\t\t\t   nfp_eth_table->count);\n+\t\t\tnfp_eth_table->count);\n \n \tPMD_DRV_LOG(INFO, \"Port speed: %u\", nfp_eth_table->ports[0].speed);\n \n@@ -689,7 +685,7 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,\n \t\t\tnfp_eth_table->ports[0].speed / 1000);\n \n \tnsp = nfp_nsp_open(cpp);\n-\tif (!nsp) {\n+\tif (nsp == NULL) {\n \t\tPMD_DRV_LOG(ERR, \"NFP error when obtaining NSP handle\");\n \t\treturn -EIO;\n \t}\n@@ -701,19 +697,19 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,\n \treturn err;\n }\n \n-static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)\n+static int\n+nfp_init_phyports(struct nfp_pf_dev *pf_dev)\n {\n+\tint i;\n+\tint ret = 0;\n \tstruct nfp_net_hw *hw;\n \tstruct rte_eth_dev *eth_dev;\n-\tstruct nfp_eth_table *nfp_eth_table = NULL;\n-\tint ret = 0;\n-\tint i;\n+\tstruct nfp_eth_table *nfp_eth_table;\n \n \tnfp_eth_table = nfp_eth_read_ports(pf_dev->cpp);\n-\tif (!nfp_eth_table) {\n+\tif (nfp_eth_table == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"Error reading NFP ethernet table\");\n-\t\tret = -EIO;\n-\t\tgoto error;\n+\t\treturn -EIO;\n \t}\n \n \t/* Loop through all physical ports on PF */\n@@ -726,7 +722,7 @@ static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)\n \n \t\t/* Allocate a eth_dev for this phyport */\n \t\teth_dev = rte_eth_dev_allocate(port_name);\n-\t\tif (!eth_dev) {\n+\t\tif (eth_dev == NULL) {\n \t\t\tret = -ENODEV;\n \t\t\tgoto port_cleanup;\n \t\t}\n@@ -734,8 +730,8 @@ static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)\n \t\t/* Allocate memory for this phyport */\n \t\teth_dev->data->dev_private =\n \t\t\trte_zmalloc_socket(port_name, sizeof(struct nfp_net_hw),\n-\t\t\t\t\t   RTE_CACHE_LINE_SIZE, numa_node);\n-\t\tif (!eth_dev->data->dev_private) {\n+\t\t\t\tRTE_CACHE_LINE_SIZE, numa_node);\n+\t\tif (eth_dev->data->dev_private == NULL) {\n \t\t\tret = -ENOMEM;\n \t\t\trte_eth_dev_release_port(eth_dev);\n \t\t\tgoto port_cleanup;\n@@ -759,7 +755,6 @@ static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)\n \t\t * nfp_net_init\n \t\t */\n \t\tret = nfp_net_init(eth_dev);\n-\n \t\tif (ret) {\n \t\t\tret = -ENODEV;\n \t\t\tgoto port_cleanup;\n@@ -782,24 +777,25 @@ static int nfp_init_phyports(struct nfp_pf_dev *pf_dev)\n \t}\n eth_table_cleanup:\n \tfree(nfp_eth_table);\n-error:\n+\n \treturn ret;\n }\n \n-static int nfp_pf_init(struct rte_pci_device *pci_dev)\n+static int\n+nfp_pf_init(struct rte_pci_device *pci_dev)\n {\n-\tstruct nfp_pf_dev *pf_dev = NULL;\n+\tint err;\n+\tint ret = 0;\n+\tint total_ports;\n \tstruct nfp_cpp *cpp;\n+\tstruct nfp_pf_dev *pf_dev;\n \tstruct nfp_hwinfo *hwinfo;\n-\tstruct nfp_rtsym_table *sym_tbl;\n-\tstruct nfp_eth_table *nfp_eth_table = NULL;\n \tchar name[RTE_ETH_NAME_MAX_LEN];\n-\tint total_ports;\n-\tint ret = -ENODEV;\n-\tint err;\n+\tstruct nfp_rtsym_table *sym_tbl;\n+\tstruct nfp_eth_table *nfp_eth_table;\n \n-\tif (!pci_dev)\n-\t\treturn ret;\n+\tif (pci_dev == NULL)\n+\t\treturn -ENODEV;\n \n \t/*\n \t * When device bound to UIO, the device could be used, by mistake,\n@@ -813,21 +809,21 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)\n \telse\n \t\tcpp = nfp_cpp_from_device_name(pci_dev, 1);\n \n-\tif (!cpp) {\n+\tif (cpp == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"A CPP handle can not be obtained\");\n \t\tret = -EIO;\n \t\tgoto error;\n \t}\n \n \thwinfo = nfp_hwinfo_read(cpp);\n-\tif (!hwinfo) {\n+\tif (hwinfo == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"Error reading hwinfo table\");\n \t\tret = -EIO;\n \t\tgoto error;\n \t}\n \n \tnfp_eth_table = nfp_eth_read_ports(cpp);\n-\tif (!nfp_eth_table) {\n+\tif (nfp_eth_table == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"Error reading NFP ethernet table\");\n \t\tret = -EIO;\n \t\tgoto hwinfo_cleanup;\n@@ -841,7 +837,7 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)\n \n \t/* Now the symbol table should be there */\n \tsym_tbl = nfp_rtsym_table_read(cpp);\n-\tif (!sym_tbl) {\n+\tif (sym_tbl == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"Something is wrong with the firmware\"\n \t\t\t\t\" symbol table\");\n \t\tret = -EIO;\n@@ -865,7 +861,7 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)\n \t/* Allocate memory for the PF \"device\" */\n \tsnprintf(name, sizeof(name), \"nfp_pf%d\", 0);\n \tpf_dev = rte_zmalloc(name, sizeof(*pf_dev), 0);\n-\tif (!pf_dev) {\n+\tif (pf_dev == NULL) {\n \t\tret = -ENOMEM;\n \t\tgoto sym_tbl_cleanup;\n \t}\n@@ -883,9 +879,8 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)\n \n \t/* Map the symbol table */\n \tpf_dev->ctrl_bar = nfp_rtsym_map(pf_dev->sym_tbl, \"_pf0_net_bar0\",\n-\t\t\t\t     pf_dev->total_phyports * 32768,\n-\t\t\t\t     &pf_dev->ctrl_area);\n-\tif (!pf_dev->ctrl_bar) {\n+\t\t\tpf_dev->total_phyports * 32768, &pf_dev->ctrl_area);\n+\tif (pf_dev->ctrl_bar == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"nfp_rtsym_map fails for _pf0_net_ctrl_bar\");\n \t\tret = -EIO;\n \t\tgoto pf_cleanup;\n@@ -895,10 +890,9 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)\n \n \t/* configure access to tx/rx vNIC BARs */\n \tpf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, 0, 0,\n-\t\t\t\t\t      NFP_PCIE_QUEUE(0),\n-\t\t\t\t\t      NFP_QCP_QUEUE_AREA_SZ,\n-\t\t\t\t\t      &pf_dev->hwqueues_area);\n-\tif (!pf_dev->hw_queues) {\n+\t\t\tNFP_PCIE_QUEUE(0), NFP_QCP_QUEUE_AREA_SZ,\n+\t\t\t&pf_dev->hwqueues_area);\n+\tif (pf_dev->hw_queues == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"nfp_rtsym_map fails for net.qc\");\n \t\tret = -EIO;\n \t\tgoto ctrl_area_cleanup;\n@@ -906,7 +900,8 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)\n \n \tPMD_INIT_LOG(DEBUG, \"tx/rx bar address: 0x%p\", pf_dev->hw_queues);\n \n-\t/* Initialize and prep physical ports now\n+\t/*\n+\t * Initialize and prep physical ports now\n \t * This will loop through all physical ports\n \t */\n \tret = nfp_init_phyports(pf_dev);\n@@ -941,15 +936,16 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)\n  * is no need to initialise the PF again. Only minimal work is required\n  * here\n  */\n-static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)\n+static int\n+nfp_pf_secondary_init(struct rte_pci_device *pci_dev)\n {\n-\tstruct nfp_cpp *cpp;\n-\tstruct nfp_rtsym_table *sym_tbl;\n-\tint total_ports;\n \tint i;\n \tint err;\n+\tint total_ports;\n+\tstruct nfp_cpp *cpp;\n+\tstruct nfp_rtsym_table *sym_tbl;\n \n-\tif (!pci_dev)\n+\tif (pci_dev == NULL)\n \t\treturn -ENODEV;\n \n \t/*\n@@ -964,7 +960,7 @@ static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)\n \telse\n \t\tcpp = nfp_cpp_from_device_name(pci_dev, 1);\n \n-\tif (!cpp) {\n+\tif (cpp == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"A CPP handle can not be obtained\");\n \t\treturn -EIO;\n \t}\n@@ -974,7 +970,7 @@ static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)\n \t * here so we have to read the number of ports from firmware\n \t */\n \tsym_tbl = nfp_rtsym_table_read(cpp);\n-\tif (!sym_tbl) {\n+\tif (sym_tbl == NULL) {\n \t\tPMD_INIT_LOG(ERR, \"Something is wrong with the firmware\"\n \t\t\t\t\" symbol table\");\n \t\treturn -EIO;\n@@ -989,13 +985,11 @@ static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)\n \t\tsnprintf(port_name, sizeof(port_name), \"%s_port%d\",\n \t\t\t pci_dev->device.name, i);\n \n-\t\tPMD_DRV_LOG(DEBUG, \"Secondary attaching to port %s\",\n-\t\t    port_name);\n+\t\tPMD_DRV_LOG(DEBUG, \"Secondary attaching to port %s\", port_name);\n \t\teth_dev = rte_eth_dev_attach_secondary(port_name);\n-\t\tif (!eth_dev) {\n+\t\tif (eth_dev == NULL) {\n \t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\"secondary process attach failed, \"\n-\t\t\t\"ethdev doesn't exist\");\n+\t\t\t\t\"secondary process attach failed, ethdev doesn't exist\");\n \t\t\treturn -ENODEV;\n \t\t}\n \t\teth_dev->process_private = cpp;\n@@ -1012,8 +1006,9 @@ static int nfp_pf_secondary_init(struct rte_pci_device *pci_dev)\n \treturn 0;\n }\n \n-static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n-\t\t\t    struct rte_pci_device *dev)\n+static int\n+nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n+\t\tstruct rte_pci_device *dev)\n {\n \tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n \t\treturn nfp_pf_init(dev);\n@@ -1035,7 +1030,8 @@ static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {\n \t},\n };\n \n-static int nfp_pci_uninit(struct rte_eth_dev *eth_dev)\n+static int\n+nfp_pci_uninit(struct rte_eth_dev *eth_dev)\n {\n \tstruct rte_pci_device *pci_dev;\n \tuint16_t port_id;\n@@ -1052,7 +1048,8 @@ static int nfp_pci_uninit(struct rte_eth_dev *eth_dev)\n \treturn -ENOTSUP;\n }\n \n-static int eth_nfp_pci_remove(struct rte_pci_device *pci_dev)\n+static int\n+eth_nfp_pci_remove(struct rte_pci_device *pci_dev)\n {\n \treturn rte_eth_dev_pci_generic_remove(pci_dev, nfp_pci_uninit);\n }\ndiff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c\nindex 0034d68ea6..381a25c03c 100644\n--- a/drivers/net/nfp/nfp_ethdev_vf.c\n+++ b/drivers/net/nfp/nfp_ethdev_vf.c\n@@ -296,11 +296,11 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)\n \n \t/* NFP can not handle DMA addresses requiring more than 40 bits */\n \tif (rte_mem_check_dma_mask(40)) {\n-\t\tRTE_LOG(ERR, PMD, \"device %s can not be used:\",\n-\t\t\t\t   pci_dev->device.name);\n-\t\tRTE_LOG(ERR, PMD, \"\\trestricted dma mask to 40 bits!\\n\");\n+\t\tRTE_LOG(ERR, PMD,\n+\t\t\t\"device %s can not be used: restricted dma mask to 40 bits!\\n\",\n+\t\t\tpci_dev->device.name);\n \t\treturn -ENODEV;\n-\t};\n+\t}\n \n \thw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);\n \n",
    "prefixes": [
        "v4",
        "01/13"
    ]
}