* [PATCH] counter: interrupt-cnt: Add const qualifier for actions_list array
@ 2021-06-10 1:36 William Breathitt Gray
2021-06-10 3:23 ` Oleksij Rempel
0 siblings, 1 reply; 3+ messages in thread
From: William Breathitt Gray @ 2021-06-10 1:36 UTC (permalink / raw)
To: jic23, linux
Cc: linux-iio, linux-kernel, kernel, William Breathitt Gray, Oleksij Rempel
The struct counter_synapse actions_list member expects a const enum
counter_synapse_action array. This patch renames
interrupt_cnt_synapse_actionss to interrupt_cnt_synapse_actions and adds
a const qualifier to match actions_list.
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
---
drivers/counter/interrupt-cnt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/counter/interrupt-cnt.c b/drivers/counter/interrupt-cnt.c
index 827d785e19b4..5df7cd13d4c7 100644
--- a/drivers/counter/interrupt-cnt.c
+++ b/drivers/counter/interrupt-cnt.c
@@ -77,7 +77,7 @@ static const struct counter_count_ext interrupt_cnt_ext[] = {
},
};
-static enum counter_synapse_action interrupt_cnt_synapse_actionss[] = {
+static const enum counter_synapse_action interrupt_cnt_synapse_actions[] = {
COUNTER_SYNAPSE_ACTION_RISING_EDGE,
};
@@ -194,8 +194,8 @@ static int interrupt_cnt_probe(struct platform_device *pdev)
priv->counter.signals = &priv->signals;
priv->counter.num_signals = 1;
- priv->synapses.actions_list = interrupt_cnt_synapse_actionss;
- priv->synapses.num_actions = ARRAY_SIZE(interrupt_cnt_synapse_actionss);
+ priv->synapses.actions_list = interrupt_cnt_synapse_actions;
+ priv->synapses.num_actions = ARRAY_SIZE(interrupt_cnt_synapse_actions);
priv->synapses.signal = &priv->signals;
priv->cnts.name = "Channel 0 Count";
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] counter: interrupt-cnt: Add const qualifier for actions_list array
2021-06-10 1:36 [PATCH] counter: interrupt-cnt: Add const qualifier for actions_list array William Breathitt Gray
@ 2021-06-10 3:23 ` Oleksij Rempel
2021-06-11 18:02 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Oleksij Rempel @ 2021-06-10 3:23 UTC (permalink / raw)
To: William Breathitt Gray; +Cc: jic23, linux, linux-iio, linux-kernel, kernel
Hi William,
On Thu, Jun 10, 2021 at 10:36:42AM +0900, William Breathitt Gray wrote:
> The struct counter_synapse actions_list member expects a const enum
> counter_synapse_action array. This patch renames
> interrupt_cnt_synapse_actionss to interrupt_cnt_synapse_actions and adds
> a const qualifier to match actions_list.
>
> Cc: Oleksij Rempel <o.rempel@pengutronix.de>
> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Reviewed-by: <o.rempel@pengutronix.de>
thank you!
> ---
> drivers/counter/interrupt-cnt.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/counter/interrupt-cnt.c b/drivers/counter/interrupt-cnt.c
> index 827d785e19b4..5df7cd13d4c7 100644
> --- a/drivers/counter/interrupt-cnt.c
> +++ b/drivers/counter/interrupt-cnt.c
> @@ -77,7 +77,7 @@ static const struct counter_count_ext interrupt_cnt_ext[] = {
> },
> };
>
> -static enum counter_synapse_action interrupt_cnt_synapse_actionss[] = {
> +static const enum counter_synapse_action interrupt_cnt_synapse_actions[] = {
> COUNTER_SYNAPSE_ACTION_RISING_EDGE,
> };
>
> @@ -194,8 +194,8 @@ static int interrupt_cnt_probe(struct platform_device *pdev)
> priv->counter.signals = &priv->signals;
> priv->counter.num_signals = 1;
>
> - priv->synapses.actions_list = interrupt_cnt_synapse_actionss;
> - priv->synapses.num_actions = ARRAY_SIZE(interrupt_cnt_synapse_actionss);
> + priv->synapses.actions_list = interrupt_cnt_synapse_actions;
> + priv->synapses.num_actions = ARRAY_SIZE(interrupt_cnt_synapse_actions);
> priv->synapses.signal = &priv->signals;
>
> priv->cnts.name = "Channel 0 Count";
> --
> 2.32.0
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] counter: interrupt-cnt: Add const qualifier for actions_list array
2021-06-10 3:23 ` Oleksij Rempel
@ 2021-06-11 18:02 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2021-06-11 18:02 UTC (permalink / raw)
To: Oleksij Rempel
Cc: William Breathitt Gray, linux, linux-iio, linux-kernel, kernel
On Thu, 10 Jun 2021 05:23:47 +0200
Oleksij Rempel <o.rempel@pengutronix.de> wrote:
> Hi William,
>
> On Thu, Jun 10, 2021 at 10:36:42AM +0900, William Breathitt Gray wrote:
> > The struct counter_synapse actions_list member expects a const enum
> > counter_synapse_action array. This patch renames
> > interrupt_cnt_synapse_actionss to interrupt_cnt_synapse_actions and adds
> > a const qualifier to match actions_list.
> >
> > Cc: Oleksij Rempel <o.rempel@pengutronix.de>
> > Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
>
> Reviewed-by: <o.rempel@pengutronix.de>
Applied to the togreg branch of iio.git and pushed out as testing for 0-day
to see if it can find anything we missed.
Thanks,
Jonathan
>
> thank you!
>
> > ---
> > drivers/counter/interrupt-cnt.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/counter/interrupt-cnt.c b/drivers/counter/interrupt-cnt.c
> > index 827d785e19b4..5df7cd13d4c7 100644
> > --- a/drivers/counter/interrupt-cnt.c
> > +++ b/drivers/counter/interrupt-cnt.c
> > @@ -77,7 +77,7 @@ static const struct counter_count_ext interrupt_cnt_ext[] = {
> > },
> > };
> >
> > -static enum counter_synapse_action interrupt_cnt_synapse_actionss[] = {
> > +static const enum counter_synapse_action interrupt_cnt_synapse_actions[] = {
> > COUNTER_SYNAPSE_ACTION_RISING_EDGE,
> > };
> >
> > @@ -194,8 +194,8 @@ static int interrupt_cnt_probe(struct platform_device *pdev)
> > priv->counter.signals = &priv->signals;
> > priv->counter.num_signals = 1;
> >
> > - priv->synapses.actions_list = interrupt_cnt_synapse_actionss;
> > - priv->synapses.num_actions = ARRAY_SIZE(interrupt_cnt_synapse_actionss);
> > + priv->synapses.actions_list = interrupt_cnt_synapse_actions;
> > + priv->synapses.num_actions = ARRAY_SIZE(interrupt_cnt_synapse_actions);
> > priv->synapses.signal = &priv->signals;
> >
> > priv->cnts.name = "Channel 0 Count";
> > --
> > 2.32.0
> >
> >
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-11 18:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 1:36 [PATCH] counter: interrupt-cnt: Add const qualifier for actions_list array William Breathitt Gray
2021-06-10 3:23 ` Oleksij Rempel
2021-06-11 18:02 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).