From: Nishka Dasgupta <nishkadg.linux@gmail.com> To: vireshk@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Cc: Nishka Dasgupta <nishkadg.linux@gmail.com> Subject: [PATCH] clk: spear: Make structure i2s_sclk_masks constant Date: Tue, 13 Aug 2019 14:27:14 +0530 [thread overview] Message-ID: <20190813085714.8079-1-nishkadg.linux@gmail.com> (raw) Static structure i2s_sclk_masks, having type aux_clk_masks, is only used when it is passed as the sixth argument to function clk_register_aux(). However, clk_register_aux() is defined with its sixth argument as const. Hence i2s_sclk_masks is not modified by clk_register_aux, which is also the only usage of the former. Therefore make i2s_sclk_masks constant as it is never modified. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> --- drivers/clk/spear/spear1340_clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c index e5bc8c828cf0..9163bbb46411 100644 --- a/drivers/clk/spear/spear1340_clock.c +++ b/drivers/clk/spear/spear1340_clock.c @@ -335,7 +335,7 @@ static const struct aux_clk_masks i2s_prs1_masks = { }; /* i2s sclk (bit clock) syynthesizers masks */ -static struct aux_clk_masks i2s_sclk_masks = { +static const struct aux_clk_masks i2s_sclk_masks = { .eq_sel_mask = AUX_EQ_SEL_MASK, .eq_sel_shift = SPEAR1340_I2S_SCLK_EQ_SEL_SHIFT, .eq1_mask = AUX_EQ1_SEL, -- 2.19.1
WARNING: multiple messages have this Message-ID (diff)
From: Nishka Dasgupta <nishkadg.linux@gmail.com> To: vireshk@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Cc: Nishka Dasgupta <nishkadg.linux@gmail.com> Subject: [PATCH] clk: spear: Make structure i2s_sclk_masks constant Date: Tue, 13 Aug 2019 14:27:14 +0530 [thread overview] Message-ID: <20190813085714.8079-1-nishkadg.linux@gmail.com> (raw) Static structure i2s_sclk_masks, having type aux_clk_masks, is only used when it is passed as the sixth argument to function clk_register_aux(). However, clk_register_aux() is defined with its sixth argument as const. Hence i2s_sclk_masks is not modified by clk_register_aux, which is also the only usage of the former. Therefore make i2s_sclk_masks constant as it is never modified. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> --- drivers/clk/spear/spear1340_clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c index e5bc8c828cf0..9163bbb46411 100644 --- a/drivers/clk/spear/spear1340_clock.c +++ b/drivers/clk/spear/spear1340_clock.c @@ -335,7 +335,7 @@ static const struct aux_clk_masks i2s_prs1_masks = { }; /* i2s sclk (bit clock) syynthesizers masks */ -static struct aux_clk_masks i2s_sclk_masks = { +static const struct aux_clk_masks i2s_sclk_masks = { .eq_sel_mask = AUX_EQ_SEL_MASK, .eq_sel_shift = SPEAR1340_I2S_SCLK_EQ_SEL_SHIFT, .eq1_mask = AUX_EQ1_SEL, -- 2.19.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-08-13 8:57 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-13 8:57 Nishka Dasgupta [this message] 2019-08-13 8:57 ` [PATCH] clk: spear: Make structure i2s_sclk_masks constant Nishka Dasgupta 2019-08-19 2:20 ` Viresh Kumar 2019-08-19 2:20 ` Viresh Kumar 2019-09-06 17:27 ` Stephen Boyd 2019-09-06 17:27 ` Stephen Boyd
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190813085714.8079-1-nishkadg.linux@gmail.com \ --to=nishkadg.linux@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=mturquette@baylibre.com \ --cc=sboyd@kernel.org \ --cc=vireshk@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.