Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp76826rdg; Wed, 11 Oct 2023 22:03:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqfWS3GsEafXm2YllUUTzuj+WKF4dVyU7opo3VBeDsXxp7HRLuOfs1MCWrGqd8zCMYnDlk X-Received: by 2002:a05:6a00:3a1f:b0:690:d620:7804 with SMTP id fj31-20020a056a003a1f00b00690d6207804mr23380333pfb.13.1697087017522; Wed, 11 Oct 2023 22:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697087017; cv=none; d=google.com; s=arc-20160816; b=oSuHYPc+4XcnzlFa+QUE2kPXYYupS+U2m55zjUCZr1VA21pWeg1nhFhLvPGEfF3yjP Y5/jY/Lyuv1GFA50SfusECbGdQau38SUC7omzvn97QQpBYMyhXtjWL8SB1CHrWdkHQed 6Q5vrkJOd7sy7nQfzhcDZV/1f5p2WLXf4Z08tT3VWPVz9onNLJWz0hvRa3+stPSVn7+X UOzVwt7HnaHqQQ35GeWymKk8PAem0udUkrCvNxEOYropy5WJWjpRWi9SgkJ0/DZDxek6 A4fSWkNnpyytg/n1kcHQmd69tyZRfwvVztcMM2Of4QFMu3obluEE0a6MzJDAPWPlJr8t YXxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=E6/jvxDoKsynF/Hhi+qgRno1n6eO8dybkroD/ZkL/wM=; fh=95FgBEo8D9VOkyPUPrWhU1ZnVA3hphIVHa4tLViZeps=; b=rT+UsmGGlX0g/KeNIM8MgZ/WSU54hNyPbOqtopQw+9vkKx0nNAtBWL16HtnKw+SjuL gNQGiNUEKcnvouBdshquKsmhpoU46DRNlFVHqbVFDVjLmMxS9ZXViVyhXRnxmMsExdsH b23qv7KqB01xwuORfxcILsYH7J/5isIMlHfSoRFH7FHwDe4tQ0u3PH4f6LArz34ZxEGM +vaoCG+OPj7wz4bEnJeqxAECcrbtNmeF+0cpEYXvx9Atu1j3Ejum6JCbqMjejcvGCyNf 3ili4/kc7cN4/+oieXp2h9rqyOrevEPZCZ7pTcrw3kOBhkZkK9d8d9o1D+V5jImSQ586 f2gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=M6mkAGec; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id y5-20020a056a001c8500b00690d55d630dsi13186526pfw.274.2023.10.11.22.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 22:03:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=M6mkAGec; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E054180236D6; Wed, 11 Oct 2023 22:03:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347042AbjJLFD0 (ORCPT + 99 others); Thu, 12 Oct 2023 01:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235294AbjJLFDY (ORCPT ); Thu, 12 Oct 2023 01:03:24 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58F6BCC for ; Wed, 11 Oct 2023 22:03:23 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1c5c91bec75so4588735ad.3 for ; Wed, 11 Oct 2023 22:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697087002; x=1697691802; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E6/jvxDoKsynF/Hhi+qgRno1n6eO8dybkroD/ZkL/wM=; b=M6mkAGecRYoqZdOK61WoLgyNpycRh1E0uICCR1ZiDKHrQc/8SQoJcTUgu4ZR8282B+ VxV6UZZjp/LL0vCVorb3NMRTJg2Y9BSJspBQSaIYpXlzBVoJeLY+vLLIYOEdISaJmCJv LQGhf4VDceM6k0y5LmRMe5brYsgSKBeIX5g2mIeGqHOhSHoA/ml0pDJEJf+GsuT5Ap0y pfLrsNKnFL9cYzTD4NAaO2zPsRIWSol2W5ivoEF1Vk6r6s93675EFOF0J2+Lz2YwarBp +YXeAM1yhNOgzAlfNr8QxV7weUZRLE8B/y2LFETUdSdbmS+bLgb/xmIDPODD3ffjy9ou EEKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697087002; x=1697691802; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E6/jvxDoKsynF/Hhi+qgRno1n6eO8dybkroD/ZkL/wM=; b=NH/AyzxKcKlU77knXs4pxHHrMmhzZ3w/etcBp1LMKUFGOmITV+VjiY2cj8D0ADxUBm vd8/aGncy4at/ci+HztwJkqj8nMkKQtEdoynJVkYBBIMfyfmTJWfepw/bqR0Jve6Qh4C IeQDKgRBr+KfDoUo5m3ALPDU+eNhjCEBfUNcBtJqapB1nypKZ4pJR6y+K2zXhqjRcPU1 VtXg/DDRqLDDzZOXvX4KANXaIewXMhocl2tqeg+Necu5Ygb3itKeEqCNmnckFGFZlxRZ ttmB2zdRMHTU3KGLLh5HKU7VgMjD3ETaN7Hzl4Py8ugGXobI6QTMcQc8vsVFtBhoAZf+ nhYA== X-Gm-Message-State: AOJu0YxR8l+bNXUKOlkyztK9rikhWOFqF3hsY+bbIxijGLCKR9DNJu6a Tyw1DKSXb/B5dW1JNQqSe+0Uvq5SIxUcaA== X-Received: by 2002:a17:902:c94f:b0:1c3:8464:cabd with SMTP id i15-20020a170902c94f00b001c38464cabdmr25693137pla.12.1697087002535; Wed, 11 Oct 2023 22:03:22 -0700 (PDT) Received: from Negi (2603-8000-b93d-20a0-29fa-db66-4c18-1f0a.res6.spectrum.com. [2603:8000:b93d:20a0:29fa:db66:4c18:1f0a]) by smtp.gmail.com with ESMTPSA id j9-20020a170902da8900b001c5900c9e8fsm837734plx.81.2023.10.11.22.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 22:03:21 -0700 (PDT) From: Soumya Negi To: Greg Kroah-Hartman , Micky Ching Cc: Soumya Negi , outreachy@lists.linux.dev, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rts5208: Parenthesize macro arguments Date: Wed, 11 Oct 2023 22:02:40 -0700 Message-Id: <20231012050240.20378-1-soumya.negi97@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 22:03:35 -0700 (PDT) Use parenthesis with macro arguments to avoid possible precedence issues. Found by checkpatch.pl Signed-off-by: Soumya Negi --- drivers/staging/rts5208/rtsx.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.h b/drivers/staging/rts5208/rtsx.h index 2e101da83220..1cc05956ab6d 100644 --- a/drivers/staging/rts5208/rtsx.h +++ b/drivers/staging/rts5208/rtsx.h @@ -40,17 +40,17 @@ * macros for easy use */ #define rtsx_writel(chip, reg, value) \ - iowrite32(value, (chip)->rtsx->remap_addr + reg) + iowrite32(value, (chip)->rtsx->remap_addr + (reg)) #define rtsx_readl(chip, reg) \ - ioread32((chip)->rtsx->remap_addr + reg) + ioread32((chip)->rtsx->remap_addr + (reg)) #define rtsx_writew(chip, reg, value) \ - iowrite16(value, (chip)->rtsx->remap_addr + reg) + iowrite16(value, (chip)->rtsx->remap_addr + (reg)) #define rtsx_readw(chip, reg) \ - ioread16((chip)->rtsx->remap_addr + reg) + ioread16((chip)->rtsx->remap_addr + (reg)) #define rtsx_writeb(chip, reg, value) \ - iowrite8(value, (chip)->rtsx->remap_addr + reg) + iowrite8(value, (chip)->rtsx->remap_addr + (reg)) #define rtsx_readb(chip, reg) \ - ioread8((chip)->rtsx->remap_addr + reg) + ioread8((chip)->rtsx->remap_addr + (reg)) #define rtsx_read_config_byte(chip, where, val) \ pci_read_config_byte((chip)->rtsx->pci, where, val) @@ -131,8 +131,8 @@ static inline struct rtsx_dev *host_to_rtsx(struct Scsi_Host *host) * The scsi_lock() and scsi_unlock() macros protect the sm_state and the * single queue element srb for write access */ -#define scsi_unlock(host) spin_unlock_irq(host->host_lock) -#define scsi_lock(host) spin_lock_irq(host->host_lock) +#define scsi_unlock(host) spin_unlock_irq((host)->host_lock) +#define scsi_lock(host) spin_lock_irq((host)->host_lock) #define lock_state(chip) spin_lock_irq(&((chip)->rtsx->reg_lock)) #define unlock_state(chip) spin_unlock_irq(&((chip)->rtsx->reg_lock)) -- 2.17.1