From patchwork Sat Jan 29 19:21:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 537959 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp646691imr; Sat, 29 Jan 2022 11:21:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKN4RIp6gEOC4cpwtwruwVwo9EoW/iBazH2eN0HzV4k04U7UbIKDKEn9r80v6E10dC9WYm X-Received: by 2002:a05:6402:27c7:: with SMTP id c7mr13855340ede.276.1643484098042; Sat, 29 Jan 2022 11:21:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643484098; cv=none; d=google.com; s=arc-20160816; b=HzNi/L7S5DlgJOQa20Bpu/L+e2nwyY5RzD7GnMaSe/Wm50Zo2fuzFqDef5rqKbY/Hm CLjSE69SYH2YCldu5b5NgBERwjxQvdF1ieiisygNtnEDYnPaUsLFQkSjtRTZn5oS7pqa 3QD4zGi85itikVhgg+ja8WpIsUXGMoy6Cz2eq5t1Vg0fjlJEC5oiRNK35aLsqxrfvgSq mDtQrJEdbLlCgAg+BCv9C3Y9cz52Q/hk+C2CxYfQG4GZHQ6XxvhZP8w+rXWA2TPNNMiG NPw3j4tQimEBaXCU6QYfNWU/mWkFI0BEOcYR8gTjGH7DBt/GQz5IZ5LKWqdHehC4+f8G L+ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=yD+QSOb44b5d4p7EfD5u/30mo+BcPaVbBKgI/Hk+b9I=; b=JL2ro7J4Fo//tNu/5rZS0b1URCzwAGmdL6Ej4SZ8Zc0TmGt7Y//At/Ewxb231FHxj9 rw64SGoR3dp+TT+5azHqOm8HfwQcRrCswUlEaDATJehSYYCb/SnMI8WDqq/jpShPBcew /FfbUqgqhxfFGuvgVf8PSXGOWbevSzAmf49SsdLhj0Vff64I4fjs9p5acBwxytry+51m oYc5H7Us6s561boSiNpcNDG4+FQRbj/AWfGJgJ8cBnJ1lMPGz72x3+4oVhfHPHDJBEeg 9TosfVx04nxPMwtHvpHA1wuQO7GWFJxlZ9VOYW7J2EEe7fzjbQhG1GB0IG+aIUN7v9WT mwZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id y6si5003372eds.260.2022.01.29.11.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jan 2022 11:21:38 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 867E382FA3; Sat, 29 Jan 2022 20:21:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id B761A83510; Sat, 29 Jan 2022 20:21:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 4E21C8192A for ; Sat, 29 Jan 2022 20:21:31 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9B0E6ED1; Sat, 29 Jan 2022 11:21:30 -0800 (PST) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B89FB3F774; Sat, 29 Jan 2022 11:21:28 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini --smtp-encryption=tls , Sughosh Ganu Subject: [PATCH] dm: Use parenthesis for the device_get_ops macro argument Date: Sun, 30 Jan 2022 00:51:08 +0530 Message-Id: <20220129192108.6618-1-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Use parenthesis for the device_get_ops macro argument. This prevents errors when using an expression for the parameter. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Simon Glass --- include/dm/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dm/device.h b/include/dm/device.h index f790041706..77c27ba92e 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -212,7 +212,7 @@ struct udevice_rt { #define DM_MAX_SEQ_STR 3 /* Returns the operations for a device */ -#define device_get_ops(dev) (dev->driver->ops) +#define device_get_ops(dev) ((dev)->driver->ops) #if CONFIG_IS_ENABLED(OF_PLATDATA_RT) u32 dev_get_flags(const struct udevice *dev);