From patchwork Tue Oct 17 14:38:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 10012207 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 1632F60567 for ; Tue, 17 Oct 2017 14:40:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AE6F28932 for ; Tue, 17 Oct 2017 14:40:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FEB728939; Tue, 17 Oct 2017 14:40:04 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 6540128938 for ; Tue, 17 Oct 2017 14:40:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756080AbdJQOjg (ORCPT ); Tue, 17 Oct 2017 10:39:36 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:44296 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758927AbdJQOio (ORCPT ); Tue, 17 Oct 2017 10:38:44 -0400 Received: by mail-wr0-f193.google.com with SMTP id l24so1948141wre.1; Tue, 17 Oct 2017 07:38:43 -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:in-reply-to:references; bh=JGFhO/X1p/SuN23eTUn1a8N5o7xjc+VqGTfgwCKvRKM=; b=MQEMBvsdaJ77r4rkVnuxXFrPz1rY3PXSQ8XN8PMtikndWqnAuORX1P34EI1wQwFEox uTSbRylzUrVE1H846VaASTHTh1nDX3VY0aOqolHRqA+8DqdizUXysTUcOH2cL1DhOpov owEVFF4orReXkGDX/Nlm1GdydYCTORQkHEJvPEOnP9xnd4Njln/794qdlrY3mXe5yFoo haSHvHA3TSh8G7WQ/3ta6CdTZv7tH60Buu9yS+yWSmoRMmdWPGXaNxAF0RFE+lxBcdzD gWENKJEiFcoO84xAHL1tC6lSMtYrJHvUBLjKR9B8DX85RWta3B9/bKbezZ4Gdb1RlAso m1Mg== 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=JGFhO/X1p/SuN23eTUn1a8N5o7xjc+VqGTfgwCKvRKM=; b=ahXo2bKj0gnl5bcM/SS+RojrL1vCni1jky2scOXnwru3aMPPaGMq+VyCF01Tul4OpW 2ihtm77uEQs3Hb0iXAk5WjYkzHAl8+zIktElSjIY0U45218OJzgp9+jHJZ4k8vi0uB6M Evf0HpWkmyR7CXw5RwmEkwHseedbo7t/yYe3y3mw3qKDexM6F1IgylnpY1SLw9ugXD1A OCsYvVubD99JIWtc57nCTIZNgVuH+1FkaJZRcAN567/+zVvwhwkM+mz8dqqPh8lmkIPp L1AjVqwCxT3QCEbAfpfVvLxvadarRmPlm6mruZTjFeGhzMdvXhjFra1dTFZNbOjlPLAg gLuw== X-Gm-Message-State: AMCzsaXxUzw2a7nqw/aWZQRde1Q6mY/dIXkDQPM8DkhxiQrk4aT3kpmO Zg+sHbBmTF2I2xdR5Gr3jmc= X-Google-Smtp-Source: ABhQp+S7hHxNd4BNA3rS1JhCN8Y2Y12+KLiVvcHpHOgjXVuzt3ArqqxWxEURyQwBt/cInjlFrcUO2w== X-Received: by 10.223.188.13 with SMTP id s13mr4262705wrg.39.1508251122441; Tue, 17 Oct 2017 07:38:42 -0700 (PDT) Received: from gmail.com (dell-goyal.wifi.rsr.lip6.fr. [132.227.77.190]) by smtp.gmail.com with ESMTPSA id h8sm10475487wme.30.2017.10.17.07.38.40 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Oct 2017 07:38:41 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Tue, 17 Oct 2017 16:38:39 +0200 From: Bhumika Goyal To: julia.lawall@lip6.fr, vireshk@kernel.org, mturquette@baylibre.com, sboyd@codeaurora.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 1/2] CLK: SPEAr: make structure field and function argument as const Date: Tue, 17 Oct 2017 16:38:33 +0200 Message-Id: <1508251114-7042-2-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508251114-7042-1-git-send-email-bhumirks@gmail.com> References: <1508251114-7042-1-git-send-email-bhumirks@gmail.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 Make the masks field of clk_aux structure const as it do not modify the fields of the aux_clk_masks structure it points to. Make the struct aux_clk_masks *aux argument of the function clk_register_aux as const as the argument is only stored in the masks field of a clk_aux structure which is now made const. Signed-off-by: Bhumika Goyal Acked-by: Viresh Kumar --- drivers/clk/spear/clk-aux-synth.c | 2 +- drivers/clk/spear/clk.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/spear/clk-aux-synth.c b/drivers/clk/spear/clk-aux-synth.c index f271c35..8bea5df 100644 --- a/drivers/clk/spear/clk-aux-synth.c +++ b/drivers/clk/spear/clk-aux-synth.c @@ -136,7 +136,7 @@ static int clk_aux_set_rate(struct clk_hw *hw, unsigned long drate, struct clk *clk_register_aux(const char *aux_name, const char *gate_name, const char *parent_name, unsigned long flags, void __iomem *reg, - struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, + const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk) { struct clk_aux *aux; diff --git a/drivers/clk/spear/clk.h b/drivers/clk/spear/clk.h index 9834944..b9d28b3 100644 --- a/drivers/clk/spear/clk.h +++ b/drivers/clk/spear/clk.h @@ -49,7 +49,7 @@ struct aux_rate_tbl { struct clk_aux { struct clk_hw hw; void __iomem *reg; - struct aux_clk_masks *masks; + const struct aux_clk_masks *masks; struct aux_rate_tbl *rtbl; u8 rtbl_cnt; spinlock_t *lock; @@ -112,7 +112,7 @@ typedef unsigned long (*clk_calc_rate)(struct clk_hw *hw, unsigned long prate, /* clk register routines */ struct clk *clk_register_aux(const char *aux_name, const char *gate_name, const char *parent_name, unsigned long flags, void __iomem *reg, - struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, + const struct aux_clk_masks *masks, struct aux_rate_tbl *rtbl, u8 rtbl_cnt, spinlock_t *lock, struct clk **gate_clk); struct clk *clk_register_frac(const char *name, const char *parent_name, unsigned long flags, void __iomem *reg,