get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 112975,
    "url": "https://patches.dpdk.org/api/patches/112975/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220617093444.2004000-2-jin.liu@corigine.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20220617093444.2004000-2-jin.liu@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220617093444.2004000-2-jin.liu@corigine.com",
    "date": "2022-06-17T09:34:32",
    "name": "[v3,01/13] net/nfp: change the coding style",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "115dced49c2056cfa7ae5bc86fd4f75ba7b05fdf",
    "submitter": {
        "id": 2670,
        "url": "https://patches.dpdk.org/api/people/2670/?format=api",
        "name": "Jin Liu",
        "email": "jin.liu@corigine.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220617093444.2004000-2-jin.liu@corigine.com/mbox/",
    "series": [
        {
            "id": 23606,
            "url": "https://patches.dpdk.org/api/series/23606/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23606",
            "date": "2022-06-17T09:34:31",
            "name": "Add support of NFP3800 chip and firmware with NFDk",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/23606/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/112975/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/112975/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 6CBA1A0093;\n\tFri, 17 Jun 2022 11:35:18 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 61E2A41141;\n\tFri, 17 Jun 2022 11:35:15 +0200 (CEST)",
            "from NAM10-MW2-obe.outbound.protection.outlook.com\n (mail-mw2nam10on2097.outbound.protection.outlook.com [40.107.94.97])\n by mails.dpdk.org (Postfix) with ESMTP id 3FBAD40698\n for <dev@dpdk.org>; Fri, 17 Jun 2022 11:35:12 +0200 (CEST)",
            "from DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21)\n by CO3PR13MB5671.namprd13.prod.outlook.com (2603:10b6:303:17a::16) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.9; Fri, 17 Jun\n 2022 09:35:10 +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.009; Fri, 17 Jun 2022\n 09:35:10 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=g9XlOVQJldad8eGRxOfM7eb9ixkSZ5m7G2FIkMicmej4NcLhyHeFeuVcvc4iA1XXyCeH05kR/g5Th/BGhOwr3WoQDoCcW9okipKR0UqnorW2HpohCxak2MPHEyECJPLOtid1jEWkJW3ARIHFgDZRclu4Ts7WwuSJqkq7x4xOKc6V+8acryOqbyWwU6RDFr2wQnrdHzBggAm/yiYFLoxaXk4n68I4l9AY7eNn9qteaNoWvbYC40AoFNqJVT6AgjCSmhbqg777uMkmPDXdH3b7MHW2R4wIdzb/cnvHyv3RkzfLkEaWgAch2GSTtREWyMqx9dxx6afFvex1K+eLFk3JgQ==",
        "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=mtnfibjDiCuUXyUfl3tJKOeEdB+L3B0ofu0KDcfZi0Yp3Xb5FwmPBYN2kWjdK/ChAQ58GVwqcrEF3JCp5iDtlbLd2us0kob0ZlrohHkj2s6fXZjbOag/8L0Yt0bpzwQhpRe74DxIcfCtOg+qwPhh/1PKPbz7x6Jd8cv40iCZ5MSk7SKUSWYZ8DpvYuOL/foEINtR5UO8lcifGRPnx3KXXos7h3+C0FFCGBoKdXZEWIiM5Zj3BJGDm60vZ7ljw/oT+m50SqxTBsng9RjYcU/zrxN2hQyxTz9/sR2Kz+9qSqPibjyhmqM4LopTTQaWa6/qu49ayjUa6Kj5RPT9j6KQ4Q==",
        "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=rNDdScKv/2a593LtWdRHNeCHa4cKuI5xHgmnnpuod8uhWI2oCSJDSo6384D1PMHCaDQS/u2qsGQ2u3Qa0vVRhqAyIbWKzDtyIDUpSP4jfF3eVzKNoMd1YhxVLdYpmYK22O9iCn+Lvde+rouNj+TljwCgHX5r9LpRtu+D4DT6tPM=",
        "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 v3 01/13] net/nfp: change the coding style",
        "Date": "Fri, 17 Jun 2022 11:34:32 +0200",
        "Message-Id": "<20220617093444.2004000-2-jin.liu@corigine.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20220617093444.2004000-1-jin.liu@corigine.com>",
        "References": "<20220616023939.1798769-1-jin.liu@corigine.com>\n <20220617093444.2004000-1-jin.liu@corigine.com>",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-ClientProxiedBy": "LO4P123CA0192.GBRP123.PROD.OUTLOOK.COM\n (2603:10a6:600:1a4::17) 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": "5df4cc50-0dd6-4fb5-6f26-08da5044ac35",
        "X-MS-TrafficTypeDiagnostic": "CO3PR13MB5671:EE_",
        "X-Microsoft-Antispam-PRVS": "\n <CO3PR13MB567113604FEBB957981307BC94AF9@CO3PR13MB5671.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 OJ0NiJkBBt7dcLoE37N4dXZIGk15FVNN/wMoCCtP3qiQeC4tQgF0ZAl7r4yd0ILa3AwNuRsmqffsjp+dAL/BSJ3kUE2c6Wf9YqF5xfgVryDbgxDQeJU8WQ66iMna/zjpYwHp5Y1fnOPeymQUP5HMuLmx6Y/DEBWqDQ++zDuoXHYnHoOugLjI984CaCl1jNjgm6UZoMXxvfjV7zoMeSsKxzp8d5BtZ7O9f1a/Iy2BL8RuI+bOQ13YFR8TaAmGFYwOjsVI6YPE73qym5tYIY06pQ53DspgMZ++LjswRM8QFuLxETHdDXR1KNVhzfgjrhZF+xBlvU82pKwIB8JxHggYOCxiAJFGh8y+Q5j9Zw02nRHrBFBgfu+jIPAEpr+kMx2xQ+IjiW+ciycKiZpiY8SzKaEq/PIDIYrgEVkBqhP1H5E2VbOUuOnLv9A3CKO3ZZ1psWy6UXZVCjLc6hlevupupt274tgBb3Tk67RxSJo5jB93iLFbpKQRaBbb5pX6wXg2yd44hzyvTwbd8redfuROJBefH/T2rXuAyGS3ciJME+YfMkO7w4wrSC/xifYm9vcnsR9XAy29OxGAt9511fCktjOv8aYZo+3T4tGJXKU7de6BbFLWw58+CFYEQTaBe9UUQCguqPfT7MqDKyO/zPimZUVGfve/I98gk1kpiTJ+6LeTfqvjQcclxnxodE0U2OvfdfSErz21c/ePNCc5SoEWH6oVOtQN3Am/X+de0wYR0s1K6324lKi2AUWzPfAW6OxR",
        "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)(346002)(136003)(366004)(396003)(39840400004)(66476007)(66556008)(26005)(8676002)(66574015)(6666004)(107886003)(66946007)(6506007)(6916009)(44832011)(30864003)(2906002)(316002)(4326008)(38350700002)(186003)(508600001)(54906003)(5660300002)(6486002)(6512007)(1076003)(8936002)(2616005)(36756003)(52116002)(83380400001)(86362001)(38100700002)(41300700001);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "=?utf-8?q?b06FGXTuR5Exj3NFt1mHTb1r0G56?=\n\t=?utf-8?q?9qgCEdJIVVK9yKM0VEccdhBMrnytchsU9whVg4foWCgmpd8o7aQV0exZhHMEJsn/S?=\n\t=?utf-8?q?pldlZK1t6Mmk1dbkopvwAGpR4mJKDMDnWmrngdCJBxhLO0OoCOFg9QDyJFRo/Ocev?=\n\t=?utf-8?q?xqMJ4Ie4y8uhPKRtaFjXTejcyK38blyp4e3UuB5vNTB3ED9RjMEr+SEKJ1ujs0ocw?=\n\t=?utf-8?q?IbAD8GynsWDPrA4OekYleFRfdicgsGETEEsEjVxZepJvqdwUlG0GbqjTdosgFrNac?=\n\t=?utf-8?q?X1NoIDj5oxyKxfLHjQ7qThkyX2pRf8aVs55MhCDkskzKegcd9eMqmFmQfzym+0mzE?=\n\t=?utf-8?q?JV/A5mPxy/hz+JtwMtT+wKzkkYA0/LwOnfvV09sx8g/iR2mxj8R3WpRNxwREZE7Bq?=\n\t=?utf-8?q?MtP4UH1gZi/YJhA+k0VdNKH93wNWPRVjrDVqkY4055gPo6cqZAzEUXmwjU3eAcDQR?=\n\t=?utf-8?q?jQ1f3LK8nIZ73HH6+en6t13EN0j/qdgCYgYABTmpAAe/Mj2Kz4+qXMCUa4eN7CGBe?=\n\t=?utf-8?q?CHvZrJm5fSjMLoyAA8sfXB7sSBKmmaSXdY60N1xoG4cBHNoRXG3ABwmvt0LFNPrfK?=\n\t=?utf-8?q?qUDn+wYXlldmYXyAsTE7FpgpxwtZq/cecibB8kgIMUv7o3FOFZstVzQ0jDj90+dEv?=\n\t=?utf-8?q?3DSetIfhyFS3nGpU15B29yZevWTTQf/DEyR9DtkLtcdzdxkjeqjBq4E3h49LkexK1?=\n\t=?utf-8?q?92nPiNou74WvK2Sb90+TnWy/NMYe5t7yMCcCAMJEWQx514ko3+vx+q0jTGaJxmwOt?=\n\t=?utf-8?q?W+8K0mU3v+xTDqAFDh4PwHb8BOsZCj0IrOn23VxIWCTGpj7Pz9mZyABPQKqjTIuF6?=\n\t=?utf-8?q?QzLpvCfpnJnSHtXLxtb9ujD54NBE/OswmSS4Ey7zYLVhzPG/F6APngI8lmAduhK8v?=\n\t=?utf-8?q?EsGV5dxU6hXNxihyrg8aF2YjmMHvQ109M3xoh5WtAUB0G1lFmp0uW79zwoZT1/czj?=\n\t=?utf-8?q?ekwQ4d05dDJ10dI7evOFDRa3aetEaOinDngdOLfyp9VZKunJqz0o52xfSPJk7nOT+?=\n\t=?utf-8?q?dHQzUgvyaaKL1h6cmGPuAfLIUZAFaQIhIBJNp0CSFu769MDbgRuT8oLZia4gZk9tl?=\n\t=?utf-8?q?YwzXJ3pBhbhLoI6F/Be1WvgFiRG70EFiZ6w2XA6bu/00STYTLFJc4sZ+e/4yA93VR?=\n\t=?utf-8?q?bCvOqeeIHf2zBuA9f0eE+ny5r8PSeRuxnf7W0BNjNdzEtv5cN7KSBRgWtzH6tGJIn?=\n\t=?utf-8?q?4DCHYFs5GDSaWaLiG1ZL4JWIjBEGg6UmtpLZ8v4iwhNqs1IVNQyZ0Udaeu5aAa7mK?=\n\t=?utf-8?q?NFZiQnO7C0BignGxAoqGAv7fKuEzb4Inc2KapalGyKw4GpsErCpdsKfTt2Fp3U2f8?=\n\t=?utf-8?q?wIGOkMb/qhb3j6D9Odq+jKsoagi/ySMF0ODgHObEKLjHONN9R4uG8d5lRjgp54+Om?=\n\t=?utf-8?q?Z5eHtcif6bP2MK5sIVZXFVTpYDMh4qzxDwqPDG+nSrt8kYFbEwJIAe591tfpyQ1ds?=\n\t=?utf-8?q?WaLn7p29xaiURPFdUcLW5f1+4Yk1u6M+Sud5neUGix4TG/BTdlVkG7urPV+d9gHoi?=\n\t=?utf-8?q?1W3AXPwwW8UPusI91syxkLpWRIkrIoK+CG4V1hZKzEx8VV3SvdvU89VNkaxNNHn/M?=\n\t=?utf-8?q?PYt8rKUkvEX8H5B30eLY6KUWNOY9qRO6hN2sB1oY3GnToqAi3m/NyCm4Aa73+AZXm?=\n\t=?utf-8?q?ga874znxP+8tklQO66z0VjRsBYwdzdzQ=3D=3D?=",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 5df4cc50-0dd6-4fb5-6f26-08da5044ac35",
        "X-MS-Exchange-CrossTenant-AuthSource": "DM6PR13MB3004.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "17 Jun 2022 09:35:10.7277 (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 XZ8JoKpAHcpGKvMzmkR9IDnGg6uezAPCRzYEfSej6DJWaToQGkDZo+vrasU5sIqRF0SnYoo0cPGPf2zF/diPRg==",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CO3PR13MB5671",
        "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": [
        "v3",
        "01/13"
    ]
}