Received: by 10.192.165.156 with SMTP id m28csp868674imm; Thu, 19 Apr 2018 08:52:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx49G0356vuyioaVkOQd1YCJWHIEuDj0jHm/iHutyfejr7TXnFaIYf/R675/cexfC3LZ+W5a2 X-Received: by 10.101.102.198 with SMTP id c6mr4394669pgw.127.1524153134232; Thu, 19 Apr 2018 08:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524153134; cv=none; d=google.com; s=arc-20160816; b=ZHCUiQz7S+wTH5/6EThRIc00P370MnHS4LTGHLSW6xDQw/y1ddqU7kf8ctKZOEYst5 VB/wMhQ8uNn6lPlMtw3mnyH55B5RKh2xO9ql1WJ5sdccwv5K6fWI904KrqvHvWhkJtWa taAkcFjrEaOwJAao/cihxQGzyDLD2ugC+ypfwsUMFwpWJDQx4tS8QjnBLu2GhvaNAFgR E24/ZVwJOf6ITTRSnOn/pHpTxDnhYoWKTECtYi95XFC9WyTn2uWv+8KwfS5xe8TEeqQW cAul5xvJEY91U9eQYv1oaaZ/WXc5YCoworxpehIqF4OShuhrpbhxqg5XK+O51YflmMt3 rQMQ== 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=mMNv+nocrk3gxzheKREOtB5T1t1v/CWP7GXGoCozk/r+3+qXbFpiReAdzO+3KF+nKH LWGY3DiUOfK0d87J9KbP7dxuk5D/afDR87gHUPBgOFmvBHZg1g0liFbhaVPUhcQELWkv 55/niUGKMXBE+3bciW+4lyX5guUjn/DHOJn8L9i4qy9h7nzmgaeGFZ8MSpbyx7Ma+9fN TAdJh7Sa2kAJo70pL0GseuJSpXFtsYWLkR2kdYLW96V7TGyUC36ErapsB/9pnWlWvL3r xUMx2NhE20Jw/NbAFR0Opl9gggXsJhGr/YyUggaVVUwB1vt+NgGC7gMIuKWwE42qBQW4 WQQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YvjhT4Hg; 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 e17si3089067pgt.179.2018.04.19.08.51.58; Thu, 19 Apr 2018 08:52:14 -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=YvjhT4Hg; 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 S1753437AbeDSPuY (ORCPT + 99 others); Thu, 19 Apr 2018 11:50:24 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:44808 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332AbeDSPuW (ORCPT ); Thu, 19 Apr 2018 11:50:22 -0400 Received: by mail-pl0-f68.google.com with SMTP id s13-v6so3477953plq.11; Thu, 19 Apr 2018 08:50:22 -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=YvjhT4HgSTGls/T/S6Qfh8Qp4Xogz+atTD+jbR/Gj5p/AaruG75fyWoB/FKV24F3gH KEerYF1+gnh6cEfvLEEFySGAQNyO5BSGVrMiazFm8l/qc+46svytlsRG82lwn88QbbKr yo5k1hguLlCQaP8i67FNi2Bl5/uq3K4VBC4NtUxU00RbXSWfmcAhoKcU3/YsXKRTX3T+ WogFUu9IJoYXrYtW18AXN9Eq8wqijyP934xpYctLkQsIJrTDMaz8c+Y+TruIUAYOewTR SqLRc5zQ2AbL9Q5CG6h53GvNajPgN+4VRAOT09jbIxzt7oEHt2//4RpLX9JQsDL/X0Qu VGOg== 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=AfF9IamNE87+ZUE9Ftzn6Rzw7ARMXj38wdfr5V3UCTY/PbtCb73UrfkDDYTRn60FKH omXWsntTj2xsBww5qgzvDdVz/oQKslJJECfQGbBBrogRvjE1ivhPif3EFAEhh29LPXlx y/oGEZ8nBujnC8SWzxXVBfHkF7GGIsNj8NsrYwK1VHuOxDCV38i8q80NnrEkFND4MgoD ZvEB9HyHPo5ykGBme6+7ERV9yE9w4crUUtAublzfMxCGPDtY4NvHSAh1hmbpYQt6l6Nl bDZkm+lOBkT4JH8X5tKNa4sy4Q0eA2ZQ4Pw9PfRKyCExSxeuZ4EYfXy8vy9P4NZthnty y/qw== X-Gm-Message-State: ALQs6tBPfBLLnVt6aeXctoCUX6Wj/LElzQwiDKJvtE9OzczbnNF+t1WG Q45cAN6c44AmarVgPQwqRM0= X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr6738350plb.317.1524153021320; Thu, 19 Apr 2018 08:50:21 -0700 (PDT) Received: from localhost.localdomain ([2405:204:5485:38e2:5f51:99e1:2fe2:e6a1]) by smtp.googlemail.com with ESMTPSA id d199sm7940068pfd.95.2018.04.19.08.50.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Apr 2018 08:50:20 -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: [RESEND PATCH v2] crypto: cavium: zip: Remove unnecessary parentheses Date: Thu, 19 Apr 2018 21:19:43 +0530 Message-Id: <20180419154943.21983-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