From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0044.outbound.protection.outlook.com [104.47.38.44]) by dpdk.org (Postfix) with ESMTP id 0AC551B159 for ; Fri, 8 Dec 2017 06:22:40 +0100 (CET) Received: from CY1PR03CA0031.namprd03.prod.outlook.com (10.174.128.41) by CY1PR03MB2362.namprd03.prod.outlook.com (10.166.207.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Fri, 8 Dec 2017 05:22:38 +0000 Received: from BN1BFFO11FD029.protection.gbl (2a01:111:f400:7c10::1:145) by CY1PR03CA0031.outlook.office365.com (2603:10b6:600::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:38 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD029.mail.protection.outlook.com (10.58.144.92) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:35 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vB85MKGd013022; Thu, 7 Dec 2017 22:22:35 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta Date: Fri, 8 Dec 2017 10:51:19 +0530 Message-ID: <1512710487-32388-7-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841553122082; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(7966004)(336005)(39380400002)(376002)(39860400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(8936002)(5660300001)(575784001)(6666003)(2950100002)(36756003)(8656006)(86362001)(4326008)(6916009)(77096006)(81166006)(50226002)(8676002)(47776003)(356003)(2906002)(68736007)(81156014)(85426001)(305945005)(498600001)(105606002)(48376002)(97736004)(50466002)(76176011)(53936002)(33646002)(2351001)(51416003)(316002)(16586007)(54906003)(296002)(104016004)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2362; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD029; 1:aGl1iA5XQut5DNz/RBMHUfCRj/e+83gwXyJ5TZH/SoVw7XCh7OFvbFkfHKLUjePBGGplpFW9lYx9Fd5j39SeUnpTLotIpMpBuUzMUs7h5en4DDfnixFcQtWQGkNcTmv9 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 47a4e827-3e3d-43ca-c322-08d53dfbb0ae X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2362; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2362; 3:FQKcAuISTeKH5hftyVErKXC2eGA+2wOZ6hDrcLdRBTZXf0O/Phz0zd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xOAu0EqvkhAu2DcIZNGjxgZ9hqqE7NIjaVEVBxrhqtqKfmNXq/Dq+VWTk2fK2H4sQaX2nSkanwVSw7H5KDj8mHfFvAR3RQsZz/XGzPsh8Inv/vv20rjAg1abbjV2IKrXcm/NkqXvr+QIPp/l7nAt7P2Eh3TbXbdxQR6viDei4AymEu4edaRa/9cOLSHoU9WpnbGOpS26HQ7nZaxYrNS19FCNPjDwxaag4b5vWmQNsAag8AgoRFLZEktH4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231022)(6055026)(6096035)(201703131430075)(201703131520075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123563025)(20161123561025)(20161123559100)(20161123565025)(20161123556025)(201708071742011); SRVR:CY1PR03MB2362; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2362; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2362; 23:0gUrufSlFOPhEJrrjQ8nGnluJFO4Q1GjK0+sfvl3w?= =?us-ascii?Q?vaaIbDajQKJiA4e4cDDwg33BiS8JW2rPsO3mFBtDEFso5P8r/Uv2cF27gnzk?= =?us-ascii?Q?HohoUA8ImREC1DnGFdnttW3v+RjqYm03NcaJWgBxmoZ9baGXab8Zku1HHzog?= =?us-ascii?Q?UdnnmOvwv26RXhrd5dywqlqooZJuXSn62Mf2JMNxQnjBwPUS3olqpIpMndq0?= =?us-ascii?Q?FkfZT0jzz4gOalczlm4VfhYFEL8aycFz8nJTmSBnaeh/GwCeejH+eiU1LUT/?= =?us-ascii?Q?VuAXZgHaDGSQ3kX8wbZo61Qc1ZYEAB98ZNnO79Qwbdq+XJNzgAZ8Rqo27HQK?= =?us-ascii?Q?qmQSKChnU2Wby6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ttzvTb3P/IUbi5k0GXt4kGuz+Zem8igBGtrRqil8+6Z1EgUkKxfXTlxH9L42/3DeeNrz4wKoou3TkRW+MKjNE3VV3Ib9/vTmY/K2LcC9APX+K8NgETU4SS5M49j40UfiYXShmaYknTRIphU2J//WEfM6iO5dxNK3LumP4IYVGhLHNMrTBwpjrHNcM8663fQcX0zzOD3Sozso1Oc8DVzdiPUrylDcA4s4jpRfNfPbdhAQ1HKaRcPcnnh/5wb7vH+Taou9CGd4zWLTjy245uwDZHU+QG5D70Nmrto3lR4HDUgLz/E6O43WV7w=; 5:q7Gz0CCcLElA/pKU1gnmH6lvW7Lsi7e150gYamaUbNv4n0Kh574/yVpCQv+FQq5thFY+ALKhYhzoF3i6jJUNf/XPxdTzK7iPIVlMYYMkymkzTzSob/CWJK8UKmEClFzKWn95qPBGOZOiK1cBQ12R9HsV73Cdhblc1OxsR3uFozg=; 24:fF1y4XOl8rdtGqUpWn7MR57Mbd3naGqE/MrfNu5C3Wpc0dtVy53+n7eMpYMmOoH4kIkHLkkn06p+eU11Ze/2BfEsnjl8NBd58IE+vpJV4eQ=; 7:ilxMwTwokTtI6eXd0vwAsLGOXhD7xkRXbOLv+fmoMYx8P88AuMX/d96FDQRV2LQF5EAVBALhMmK6kN0Q2poprqFNNbOLRlQcMwuDf1O/N07qZroF/ElXqP7MkpJG/X5RdMgJX98UsqDZ6JDARpUDi9JpsPQqsov4EmqxNipjZ37rrF3DqkLSF/z7ou+2qkmuxSsis1LOsG+Bq7PLzR2tCzXdh20Gv+xI8N6CcT5H1itLHkPb++VqOnBoI6F5fDlc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:35.1406 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47a4e827-3e3d-43ca-c322-08d53dfbb0ae X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB2362 Subject: [dpdk-dev] [PATCH 06/14] bus/fslmc: add braces for pointers in macros X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 05:22:40 -0000 From: Nipun Gupta Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 43 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 7937293..a432b6f 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -199,56 +199,57 @@ enum qbman_fd_format { }; /*Macros to define operations on FD*/ #define DPAA2_SET_FD_ADDR(fd, addr) do { \ - fd->simple.addr_lo = lower_32_bits((uint64_t)(addr)); \ - fd->simple.addr_hi = upper_32_bits((uint64_t)(addr)); \ + (fd)->simple.addr_lo = lower_32_bits((uint64_t)(addr)); \ + (fd)->simple.addr_hi = upper_32_bits((uint64_t)(addr)); \ } while (0) -#define DPAA2_SET_FD_LEN(fd, length) (fd)->simple.len = length +#define DPAA2_SET_FD_LEN(fd, length) ((fd)->simple.len = length) #define DPAA2_SET_FD_BPID(fd, bpid) ((fd)->simple.bpid_offset |= bpid) -#define DPAA2_SET_FD_IVP(fd) ((fd->simple.bpid_offset |= 0x00004000)) +#define DPAA2_SET_FD_IVP(fd) (((fd)->simple.bpid_offset |= 0x00004000)) #define DPAA2_SET_FD_OFFSET(fd, offset) \ - ((fd->simple.bpid_offset |= (uint32_t)(offset) << 16)) -#define DPAA2_SET_FD_INTERNAL_JD(fd, len) fd->simple.frc = (0x80000000 | (len)) -#define DPAA2_SET_FD_FRC(fd, frc) fd->simple.frc = frc -#define DPAA2_RESET_FD_CTRL(fd) (fd)->simple.ctrl = 0 + (((fd)->simple.bpid_offset |= (uint32_t)(offset) << 16)) +#define DPAA2_SET_FD_INTERNAL_JD(fd, len) \ + ((fd)->simple.frc = (0x80000000 | (len))) +#define DPAA2_SET_FD_FRC(fd, frc) ((fd)->simple.frc = frc) +#define DPAA2_RESET_FD_CTRL(fd) ((fd)->simple.ctrl = 0) #define DPAA2_SET_FD_ASAL(fd, asal) ((fd)->simple.ctrl |= (asal << 16)) #define DPAA2_SET_FD_FLC(fd, addr) do { \ - fd->simple.flc_lo = lower_32_bits((uint64_t)(addr)); \ - fd->simple.flc_hi = upper_32_bits((uint64_t)(addr)); \ + (fd)->simple.flc_lo = lower_32_bits((uint64_t)(addr)); \ + (fd)->simple.flc_hi = upper_32_bits((uint64_t)(addr)); \ } while (0) -#define DPAA2_SET_FLE_INTERNAL_JD(fle, len) (fle->frc = (0x80000000 | (len))) +#define DPAA2_SET_FLE_INTERNAL_JD(fle, len) ((fle)->frc = (0x80000000 | (len))) #define DPAA2_GET_FLE_ADDR(fle) \ - (uint64_t)((((uint64_t)(fle->addr_hi)) << 32) + fle->addr_lo) + (uint64_t)((((uint64_t)((fle)->addr_hi)) << 32) + (fle)->addr_lo) #define DPAA2_SET_FLE_ADDR(fle, addr) do { \ - fle->addr_lo = lower_32_bits((uint64_t)addr); \ - fle->addr_hi = upper_32_bits((uint64_t)addr); \ + (fle)->addr_lo = lower_32_bits((uint64_t)addr); \ + (fle)->addr_hi = upper_32_bits((uint64_t)addr); \ } while (0) #define DPAA2_GET_FLE_CTXT(fle) \ (uint64_t)((((uint64_t)((fle)->reserved[1])) << 32) + \ (fle)->reserved[0]) #define DPAA2_FLE_SAVE_CTXT(fle, addr) do { \ - fle->reserved[0] = lower_32_bits((uint64_t)addr); \ - fle->reserved[1] = upper_32_bits((uint64_t)addr); \ + (fle)->reserved[0] = lower_32_bits((uint64_t)addr); \ + (fle)->reserved[1] = upper_32_bits((uint64_t)addr); \ } while (0) #define DPAA2_SET_FLE_OFFSET(fle, offset) \ ((fle)->fin_bpid_offset |= (uint32_t)(offset) << 16) #define DPAA2_SET_FLE_BPID(fle, bpid) ((fle)->fin_bpid_offset |= (uint64_t)bpid) #define DPAA2_GET_FLE_BPID(fle) ((fle)->fin_bpid_offset & 0x000000ff) -#define DPAA2_SET_FLE_FIN(fle) (fle->fin_bpid_offset |= (uint64_t)1 << 31) +#define DPAA2_SET_FLE_FIN(fle) ((fle)->fin_bpid_offset |= (uint64_t)1 << 31) #define DPAA2_SET_FLE_IVP(fle) (((fle)->fin_bpid_offset |= 0x00004000)) #define DPAA2_SET_FD_COMPOUND_FMT(fd) \ - (fd->simple.bpid_offset |= (uint32_t)1 << 28) + ((fd)->simple.bpid_offset |= (uint32_t)1 << 28) #define DPAA2_GET_FD_ADDR(fd) \ ((uint64_t)((((uint64_t)((fd)->simple.addr_hi)) << 32) + (fd)->simple.addr_lo)) #define DPAA2_GET_FD_LEN(fd) ((fd)->simple.len) #define DPAA2_GET_FD_BPID(fd) (((fd)->simple.bpid_offset & 0x00003FFF)) -#define DPAA2_GET_FD_IVP(fd) ((fd->simple.bpid_offset & 0x00004000) >> 14) +#define DPAA2_GET_FD_IVP(fd) (((fd)->simple.bpid_offset & 0x00004000) >> 14) #define DPAA2_GET_FD_OFFSET(fd) (((fd)->simple.bpid_offset & 0x0FFF0000) >> 16) #define DPAA2_GET_FLE_OFFSET(fle) (((fle)->fin_bpid_offset & 0x0FFF0000) >> 16) -#define DPAA2_SET_FLE_SG_EXT(fle) (fle->fin_bpid_offset |= (uint64_t)1 << 29) +#define DPAA2_SET_FLE_SG_EXT(fle) ((fle)->fin_bpid_offset |= (uint64_t)1 << 29) #define DPAA2_IS_SET_FLE_SG_EXT(fle) \ - ((fle->fin_bpid_offset & ((uint64_t)1 << 29)) ? 1 : 0) + (((fle)->fin_bpid_offset & ((uint64_t)1 << 29)) ? 1 : 0) #define DPAA2_INLINE_MBUF_FROM_BUF(buf, meta_data_size) \ ((struct rte_mbuf *)((uint64_t)(buf) - (meta_data_size))) -- 2.7.4