From patchwork Thu Mar 9 10:41:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9613021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3BEB8602B4 for ; Thu, 9 Mar 2017 10:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C25228551 for ; Thu, 9 Mar 2017 10:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 212D5285DE; Thu, 9 Mar 2017 10:44:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEA7828551 for ; Thu, 9 Mar 2017 10:44:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932145AbdCIKn4 (ORCPT ); Thu, 9 Mar 2017 05:43:56 -0500 Received: from mail-wr0-f176.google.com ([209.85.128.176]:33521 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463AbdCIKnl (ORCPT ); Thu, 9 Mar 2017 05:43:41 -0500 Received: by mail-wr0-f176.google.com with SMTP id u48so42155580wrc.0 for ; Thu, 09 Mar 2017 02:42:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QRL7gg7hbHSglKXwx4V/J1HMW8/MpPEuKVL6Qv8nHfs=; b=a2QZHRUuCuAtd477RsnzNjfc+QuZV+/ioyjEBvH44YmVs5vI9LTWISiMvtqcig6U8h jDNlEmGXV0eeJrDUlslRHWa8PPsHyRdt160ySWwCu2z6BJ8TLZ/lTolwBei9U9/DB/Kp 7XAMdnemI77D+KbDLXzJu4eOt6eAM7+x66ycLPE3wL+AdTF01xlgTfhSrRlBBcH6QJLY tufH1NChD48gZUqFTjH5eNtSYw25LbTrBG9Noa8VafFhJ2XDo4GwvFqMt5zjCtfSVVzf ZqqXgXszMH3AWlHVyw+53LpKpr3uG1VPujmoPs9XOZYwD5adcQWTmQkMfWdd81AHdHuJ KVSg== 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:in-reply-to :references; bh=QRL7gg7hbHSglKXwx4V/J1HMW8/MpPEuKVL6Qv8nHfs=; b=rSDIGYzskaD9YPGDaAtHBJ73ZD5mIipTMckBAMPylbHp65OaeKK4BHnwxGtR5yU2Nm 4ceUzIV7a3GP8A7QchiPlR4onhV7NQ7UjrNKC/6Y1CTDHJraFG/8MWsx++Kg5QvmNKMl RIkMncOyABFSa8Wtz+/guLzoIjdxHMsCLhUYP7PzDm8voQDZHJ/JNKh5hrrij9bUm+EH GGB+xs+ynAG++hAyrYwQX0YtvO0/0qWbDVh6+e5onTl3aXb6oIFM11DTQSz1ZXM2Owft ZOFSauEQO5X8ghGosza7xEieRVG7q/LixwqfxhFE1CZgKtAXkpIxIq06GI7y3KRaFt5a t3jQ== X-Gm-Message-State: AMke39lH9kXPq6Eli9F6TCbZV7dQQWdYsNriAcXaLEx/XIwSCnmyq0igy9Zok4eVfd1C1T4m X-Received: by 10.223.150.110 with SMTP id c43mr9964828wra.85.1489056125308; Thu, 09 Mar 2017 02:42:05 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id e6sm7724113wrc.30.2017.03.09.02.42.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2017 02:42:04 -0800 (PST) From: Jerome Brunet To: Michael Turquette , Stephen Boyd , Kevin Hilman , Carlo Caione Cc: Jerome Brunet , linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/9] clk: meson: fix SET_PARM macro Date: Thu, 9 Mar 2017 11:41:46 +0100 Message-Id: <20170309104154.28295-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170309104154.28295-1-jbrunet@baylibre.com> References: <20170309104154.28295-1-jbrunet@baylibre.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP parameter val is not enclosed in parenthesis which is buggy when given an expression instead of a simple value Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman --- drivers/clk/meson/clkc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index 9bb70e7a7d6a..c6be77dd8694 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -25,7 +25,7 @@ #define PARM_GET(width, shift, reg) \ (((reg) & SETPMASK(width, shift)) >> (shift)) #define PARM_SET(width, shift, reg, val) \ - (((reg) & CLRPMASK(width, shift)) | (val << (shift))) + (((reg) & CLRPMASK(width, shift)) | ((val) << (shift))) #define MESON_PARM_APPLICABLE(p) (!!((p)->width))