Received: by 10.213.65.68 with SMTP id h4csp477450imn; Sat, 31 Mar 2018 02:32:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/HFklVZ9mAKtNOkhlHsPE3ThtP9SB6sIR4ZlNTJunpq4Y/9DQyqm33CSFxDqm3von57MFA X-Received: by 10.98.174.5 with SMTP id q5mr1687159pff.155.1522488776108; Sat, 31 Mar 2018 02:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522488776; cv=none; d=google.com; s=arc-20160816; b=thb005KwWmPYt86ptUJFni5xOjeNjx9qmUMcx1F8/dW/YtxvpHfltBWYW43rkQbb00 K0GGOo+R4KQXSHWzl7DpxYte7x4YzzJp3MPMaKIJz7s0yxOA0dUaImgCX/n8V9pFELE6 XSL80+6L7Us4cCFQTS+bSYXPxoKMHkaWdlK5wljva/zpktLDd/WiwnDS5lO9imHauwg6 0hl8v2+0/hOKDGW6w7MFNU1Waj4q1PDHXy5n7t6hzUTUXbYjRKbOFwPEW9YF/QFz4XtN c4WbpUCoZVCN5Oll/MieEwY0RsJwb0dxCmaTzSZ53vVlrqVI4+IB4sZQ5YBkAAoWVb+T Vs3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=1RRvhNUU9aGZJjvVggFsmLx2vXiQcz1gVb8MWrTq5Z8=; b=qerXuNsHpt3GtBi1NyWwrOZItE1wBsZanpuPmHXUZR0QwviI+eeVjWoc37oKTSB50n y4sdaqsSRKcfj+33pdCojII/HKINg/Nv/Bcq6WHGmrdmxjr4/D0mRnEVToexx4hV5XRg KAwMYM+xO9GzDzssszCNQ1UtJ2h0sx6j/Xhgvb5ghCNbQunO2/DbZ+HVMSpx+6yTwu1r gCFV7enrXyVYQ1ixmYv/7Kbsra8xSio+Z8FT65rHfbSbQ4OLWcIwt98kEcb0PvoUSqpi ws+n69ouJxrhVk+OlnCoMWdw2zkfs94QW0oHHS79dbJNXyo1wSXQkapI+PJZH+gRiu0s 5ZSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F1x41u67; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9-v6si10332693pln.439.2018.03.31.02.32.41; Sat, 31 Mar 2018 02:32:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F1x41u67; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753042AbeCaJbi (ORCPT + 99 others); Sat, 31 Mar 2018 05:31:38 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:40655 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793AbeCaJbg (ORCPT ); Sat, 31 Mar 2018 05:31:36 -0400 Received: by mail-pg0-f68.google.com with SMTP id h3so2351061pgq.7; Sat, 31 Mar 2018 02:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1RRvhNUU9aGZJjvVggFsmLx2vXiQcz1gVb8MWrTq5Z8=; b=F1x41u677Hl5ozA+qxCJ05jWZjqvHlS9sC3Gx0/WS/4LGfKrjUX3xBtNx8LFQgOXA9 HZUPU4wbIcAe2LnZi2qCUu3e89+1yMVBiHEtwlmaUZMOH/OaU74D5AbBcV3V0Pyxr+3H 3gylri02lsm5E4HAiT5mewbH2ocsxyCtBL1H2MpzilTEB/K0GHulUqNcZng0k6RCpNV2 aZon7NuuJRC7TN5Z+Iq0xxSSlrHbPb3MuTgAwlypz1C0bejKuAJRGlwYETt0Vu84af3B L9BGzK+xvNrFZ7+kICtgbNrhOgEoshfm8plh4N+MrP3pF2TW2DVwQ51acIPLVShuQ4KO W3Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1RRvhNUU9aGZJjvVggFsmLx2vXiQcz1gVb8MWrTq5Z8=; b=T6R5hSPZYczNC5AEx4oU29QjQjGaeLO3Zj8kGSt7fbfb0H4tsGu7DujQpA1Urp6Wkz udniphq/5wEvQV37nbel4Iv2unY0mqlQ7s2rsD+00v79JPvu+h4P7kUBSKM1HP+95RI3 NkjjV07p8nGNncrE1SlXpOuXf7YN8jBFR51XyiGRnkCL3Y/MPy+DGaQiB7iV4HU0QWCW 3n8kFzSPOR20uAsJVlLb7KjfIy4uImtQ6w+BtIV5lxpkIKV0iB8aU67VYkik/Z3oGAOJ u4nlOZOix2ACNNWEhcYfnU/eUUgpjH6iacSd8sgwBSAeY5W5Oa5W5fig/QBrLv/jGMMy f+SQ== X-Gm-Message-State: AElRT7GfFlcHEl7gc1oQ6CitF5D59l9ynXXN5YBAMqR49gK5ohxOO45b kX2iNz7VQjJ1JDHfZ7nZWYM= X-Received: by 2002:a17:902:76cb:: with SMTP id j11-v6mr1300148plt.117.1522488695319; Sat, 31 Mar 2018 02:31:35 -0700 (PDT) Received: from localhost.localdomain ([2405:204:5128:5df9:f23e:323b:2a82:8828]) by smtp.googlemail.com with ESMTPSA id i127sm18496689pgc.12.2018.03.31.02.31.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 31 Mar 2018 02:31:34 -0700 (PDT) From: Varsha Rao To: Julia Lawall , Joe Perches , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, cocci , Herbert Xu , "David S. Miller" , Lukas Bulwahn , Nicholas Mc Guire Cc: Varsha Rao Subject: [PATCH v2] crypto: cavium: zip: Remove unnecessary parentheses Date: Sat, 31 Mar 2018 15:01:14 +0530 Message-Id: <20180331093114.5034-1-rvarsha016@gmail.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes the clang warning of extraneous parentheses, with the following coccinelle script. @@ identifier i; constant c; expression e; @@ ( !((e)) | -(( \(i == c\|i != c\|i <= c\|i < c\|i >= c\|i > c\) -)) ) Signed-off-by: Varsha Rao --- Changes in v2: - Modified coccinelle script drivers/crypto/cavium/zip/zip_regs.h | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/crypto/cavium/zip/zip_regs.h b/drivers/crypto/cavium/zip/zip_regs.h index d0be682305c1..874e0236c87e 100644 --- a/drivers/crypto/cavium/zip/zip_regs.h +++ b/drivers/crypto/cavium/zip/zip_regs.h @@ -443,7 +443,7 @@ union zip_corex_bist_status { static inline u64 ZIP_COREX_BIST_STATUS(u64 param1) { - if (((param1 <= 1))) + if (param1 <= 1) return 0x0520ull + (param1 & 1) * 0x8ull; pr_err("ZIP_COREX_BIST_STATUS: %llu\n", param1); return 0; @@ -537,7 +537,7 @@ union zip_dbg_corex_inst { static inline u64 ZIP_DBG_COREX_INST(u64 param1) { - if (((param1 <= 1))) + if (param1 <= 1) return 0x0640ull + (param1 & 1) * 0x8ull; pr_err("ZIP_DBG_COREX_INST: %llu\n", param1); return 0; @@ -568,7 +568,7 @@ union zip_dbg_corex_sta { static inline u64 ZIP_DBG_COREX_STA(u64 param1) { - if (((param1 <= 1))) + if (param1 <= 1) return 0x0680ull + (param1 & 1) * 0x8ull; pr_err("ZIP_DBG_COREX_STA: %llu\n", param1); return 0; @@ -599,7 +599,7 @@ union zip_dbg_quex_sta { static inline u64 ZIP_DBG_QUEX_STA(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x1800ull + (param1 & 7) * 0x8ull; pr_err("ZIP_DBG_QUEX_STA: %llu\n", param1); return 0; @@ -817,7 +817,7 @@ union zip_msix_pbax { static inline u64 ZIP_MSIX_PBAX(u64 param1) { - if (((param1 == 0))) + if (param1 == 0) return 0x0000838000FF0000ull; pr_err("ZIP_MSIX_PBAX: %llu\n", param1); return 0; @@ -846,7 +846,7 @@ union zip_msix_vecx_addr { static inline u64 ZIP_MSIX_VECX_ADDR(u64 param1) { - if (((param1 <= 17))) + if (param1 <= 17) return 0x0000838000F00000ull + (param1 & 31) * 0x10ull; pr_err("ZIP_MSIX_VECX_ADDR: %llu\n", param1); return 0; @@ -875,7 +875,7 @@ union zip_msix_vecx_ctl { static inline u64 ZIP_MSIX_VECX_CTL(u64 param1) { - if (((param1 <= 17))) + if (param1 <= 17) return 0x0000838000F00008ull + (param1 & 31) * 0x10ull; pr_err("ZIP_MSIX_VECX_CTL: %llu\n", param1); return 0; @@ -900,7 +900,7 @@ union zip_quex_done { static inline u64 ZIP_QUEX_DONE(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x2000ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_DONE: %llu\n", param1); return 0; @@ -925,7 +925,7 @@ union zip_quex_done_ack { static inline u64 ZIP_QUEX_DONE_ACK(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x2200ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_DONE_ACK: %llu\n", param1); return 0; @@ -950,7 +950,7 @@ union zip_quex_done_ena_w1c { static inline u64 ZIP_QUEX_DONE_ENA_W1C(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x2600ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_DONE_ENA_W1C: %llu\n", param1); return 0; @@ -975,7 +975,7 @@ union zip_quex_done_ena_w1s { static inline u64 ZIP_QUEX_DONE_ENA_W1S(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x2400ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_DONE_ENA_W1S: %llu\n", param1); return 0; @@ -1004,7 +1004,7 @@ union zip_quex_done_wait { static inline u64 ZIP_QUEX_DONE_WAIT(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x2800ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_DONE_WAIT: %llu\n", param1); return 0; @@ -1029,7 +1029,7 @@ union zip_quex_doorbell { static inline u64 ZIP_QUEX_DOORBELL(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x4000ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_DOORBELL: %llu\n", param1); return 0; @@ -1058,7 +1058,7 @@ union zip_quex_err_ena_w1c { static inline u64 ZIP_QUEX_ERR_ENA_W1C(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x3600ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_ERR_ENA_W1C: %llu\n", param1); return 0; @@ -1087,7 +1087,7 @@ union zip_quex_err_ena_w1s { static inline u64 ZIP_QUEX_ERR_ENA_W1S(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x3400ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_ERR_ENA_W1S: %llu\n", param1); return 0; @@ -1120,7 +1120,7 @@ union zip_quex_err_int { static inline u64 ZIP_QUEX_ERR_INT(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x3000ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_ERR_INT: %llu\n", param1); return 0; @@ -1150,7 +1150,7 @@ union zip_quex_err_int_w1s { static inline u64 ZIP_QUEX_ERR_INT_W1S(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x3200ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_ERR_INT_W1S: %llu\n", param1); return 0; @@ -1179,7 +1179,7 @@ union zip_quex_gcfg { static inline u64 ZIP_QUEX_GCFG(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x1A00ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_GCFG: %llu\n", param1); return 0; @@ -1204,7 +1204,7 @@ union zip_quex_map { static inline u64 ZIP_QUEX_MAP(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x1400ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_MAP: %llu\n", param1); return 0; @@ -1236,7 +1236,7 @@ union zip_quex_sbuf_addr { static inline u64 ZIP_QUEX_SBUF_ADDR(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x1000ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_SBUF_ADDR: %llu\n", param1); return 0; @@ -1276,7 +1276,7 @@ union zip_quex_sbuf_ctl { static inline u64 ZIP_QUEX_SBUF_CTL(u64 param1) { - if (((param1 <= 7))) + if (param1 <= 7) return 0x1200ull + (param1 & 7) * 0x8ull; pr_err("ZIP_QUEX_SBUF_CTL: %llu\n", param1); return 0; -- 2.14.3