From patchwork Tue Feb 28 09:30:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9595021 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 C452D60574 for ; Tue, 28 Feb 2017 09:31:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0DCD2851E for ; Tue, 28 Feb 2017 09:31:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5CA228522; Tue, 28 Feb 2017 09:31:53 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 3588A2851E for ; Tue, 28 Feb 2017 09:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751395AbdB1Jbs (ORCPT ); Tue, 28 Feb 2017 04:31:48 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:38247 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbdB1Jbe (ORCPT ); Tue, 28 Feb 2017 04:31:34 -0500 Received: by mail-wm0-f48.google.com with SMTP id u199so6697097wmd.1 for ; Tue, 28 Feb 2017 01:30:26 -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; bh=lJ/P877j7cvNF8VchvKUQsPphI/nY91IoySQD+7gvhg=; b=LtZrTyeNQlqlSsr458NSIAiDXesg69/YAbvJooBTJwU0nQtcFcOB+tJOyvrGXDxBfd ILcK6Q3gXdRLFjwGZ7Q1STj4nSV/J0g0TvS8nHezn8XjfoKaCSPPkk5TOL3nte8o/gkR zziDHx6niI0L1V82fwh1GH5MzdybE32VcQ1Basd7U84IAeM4JrD1NNUIzhnGQrwu3YxS 0vxWXg+aeeJCwhpq5Uz+XnKtYVMhXs5Q5qDRUS2nntbhnxMVsDC50jCq7MIVkKgBp4yz sphfQFhIs8YczUPY+joLzZzf4WtZiXRpIFqFkxKljuaESIMzm1Zzoa5RyrTB2p0/bg10 hfaQ== 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=lJ/P877j7cvNF8VchvKUQsPphI/nY91IoySQD+7gvhg=; b=FTnLQ1HnYZ9yZSCornUeIUgrPIkTbiNBXkQSmzH4Mn7ikLGZ/wk+U2KdTsD4KeMMUy 4I4P/rUFkhIuDeetlr1zlqw7JaeBNVAqKZyY5pCjMiB7BMlKNRO1j6aSvK6IHnJGx2HF CzGmCZw2HG2WRzZ1VS6rmjXV8Zn2dkXPa3QxkisTGaNorlKLwriRZjuEvv0z0sDfWd8w Djz6Z5yOA+iWDR5oQvIEM9czjD5YUQyNaMkTSUJ5viU6UvDQu7AfckxatdR5X733JSYf MqJea/frBvd9ZkDFB2QTbSlE7S3r3xCcZvKDljc08BXZEsvItzI09nkS5Oiy9PHxug6K Ajdw== X-Gm-Message-State: AMke39kO2vccLBQXX49vcplwNs8iqewtNEAKNLWwu4d27AZCQm9Qc151L+Rljoo/Uaka+3Qz X-Received: by 10.28.137.211 with SMTP id l202mr1521698wmd.118.1488274225707; Tue, 28 Feb 2017 01:30:25 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id 35sm1496820wrj.4.2017.02.28.01.30.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 01:30:25 -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] clk: meson: fix SET_PARM macro Date: Tue, 28 Feb 2017 10:30:16 +0100 Message-Id: <20170228093016.5624-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.3 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))