* [PATCH] bus: arm-ccn: Fix cpu notifier priority @ 2016-03-08 12:14 Jan Glauber 2016-03-09 8:40 ` Pawel Moll 0 siblings, 1 reply; 5+ messages in thread From: Jan Glauber @ 2016-03-08 12:14 UTC (permalink / raw) To: linux-arm-kernel Fix cpu priority of notifier block that was erroneously set to return value of next statement. Signed-off-by: Jan Glauber <jglauber@cavium.com> --- drivers/bus/arm-ccn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c index 7082c72..d4a939e 100644 --- a/drivers/bus/arm-ccn.c +++ b/drivers/bus/arm-ccn.c @@ -1271,7 +1271,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn) * picked to have a chance to migrate events before perf is notified. */ ccn->dt.cpu_nb.notifier_call = arm_ccn_pmu_cpu_notifier; - ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1, + ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1; err = register_cpu_notifier(&ccn->dt.cpu_nb); if (err) goto error_cpu_notifier; -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] bus: arm-ccn: Fix cpu notifier priority 2016-03-08 12:14 [PATCH] bus: arm-ccn: Fix cpu notifier priority Jan Glauber @ 2016-03-09 8:40 ` Pawel Moll 2016-03-09 14:24 ` Jan Glauber 2016-03-10 14:34 ` Jan Glauber 0 siblings, 2 replies; 5+ messages in thread From: Pawel Moll @ 2016-03-09 8:40 UTC (permalink / raw) To: linux-arm-kernel On Tue, 2016-03-08 at 13:14 +0100, Jan Glauber wrote: > Fix cpu priority of notifier block that was erroneously set to > return value of next statement. > > Signed-off-by: Jan Glauber <jglauber@cavium.com> > --- > drivers/bus/arm-ccn.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c > index 7082c72..d4a939e 100644 > --- a/drivers/bus/arm-ccn.c > +++ b/drivers/bus/arm-ccn.c > @@ -1271,7 +1271,7 @@ static int arm_ccn_pmu_init(struct arm_ccn > *ccn) > * picked to have a chance to migrate events before perf is > notified. > */ > ccn->dt.cpu_nb.notifier_call = arm_ccn_pmu_cpu_notifier; > - ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1, > + ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1; > err = register_cpu_notifier(&ccn->dt.cpu_nb); > if (err) > goto error_cpu_notifier; Damn, of course! I have never made (or heard about) such a typo before - I wish the compiler warned about it :-( By all means: Acked-by: Pawel Moll <pawel.moll@arm.com> Cc: <stable@vger.kernel.org> # 4.2+ Arnd, would you be still able to pick it up in this cycle? Thanks Both! Pawe? ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] bus: arm-ccn: Fix cpu notifier priority 2016-03-09 8:40 ` Pawel Moll @ 2016-03-09 14:24 ` Jan Glauber 2016-03-10 14:34 ` Jan Glauber 1 sibling, 0 replies; 5+ messages in thread From: Jan Glauber @ 2016-03-09 14:24 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 09, 2016 at 08:40:45AM +0000, Pawel Moll wrote: > On Tue, 2016-03-08 at 13:14 +0100, Jan Glauber wrote: > > Fix cpu priority of notifier block that was erroneously set to > > return value of next statement. > > > > Signed-off-by: Jan Glauber <jglauber@cavium.com> > > --- > > drivers/bus/arm-ccn.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c > > index 7082c72..d4a939e 100644 > > --- a/drivers/bus/arm-ccn.c > > +++ b/drivers/bus/arm-ccn.c > > @@ -1271,7 +1271,7 @@ static int arm_ccn_pmu_init(struct arm_ccn > > *ccn) > > * picked to have a chance to migrate events before perf is > > notified. > > */ > > ccn->dt.cpu_nb.notifier_call = arm_ccn_pmu_cpu_notifier; > > - ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1, > > + ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1; > > err = register_cpu_notifier(&ccn->dt.cpu_nb); > > if (err) > > goto error_cpu_notifier; > > Damn, of course! I have never made (or heard about) such a typo before > - I wish the compiler warned about it :-( Yeah, I was also surprised that we have plenty of cosmetical checks but nothing that catches this bug. Maybe it's not too hard to catch the simple case, just check for a line with assignment and no brackets / parenthesis ended by a comma? Jan > By all means: > > Acked-by: Pawel Moll <pawel.moll@arm.com> > Cc: <stable@vger.kernel.org> # 4.2+ > > Arnd, would you be still able to pick it up in this cycle? > > Thanks Both! > > Pawe? ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] bus: arm-ccn: Fix cpu notifier priority 2016-03-09 8:40 ` Pawel Moll 2016-03-09 14:24 ` Jan Glauber @ 2016-03-10 14:34 ` Jan Glauber 2016-03-10 14:56 ` Pawel Moll 1 sibling, 1 reply; 5+ messages in thread From: Jan Glauber @ 2016-03-10 14:34 UTC (permalink / raw) To: linux-arm-kernel On Wed, Mar 09, 2016 at 08:40:45AM +0000, Pawel Moll wrote: > On Tue, 2016-03-08 at 13:14 +0100, Jan Glauber wrote: > > Fix cpu priority of notifier block that was erroneously set to > > return value of next statement. > > > > Signed-off-by: Jan Glauber <jglauber@cavium.com> > > --- > > drivers/bus/arm-ccn.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c > > index 7082c72..d4a939e 100644 > > --- a/drivers/bus/arm-ccn.c > > +++ b/drivers/bus/arm-ccn.c > > @@ -1271,7 +1271,7 @@ static int arm_ccn_pmu_init(struct arm_ccn > > *ccn) > > * picked to have a chance to migrate events before perf is > > notified. > > */ > > ccn->dt.cpu_nb.notifier_call = arm_ccn_pmu_cpu_notifier; > > - ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1, > > + ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1; > > err = register_cpu_notifier(&ccn->dt.cpu_nb); > > if (err) > > goto error_cpu_notifier; > > Damn, of course! I have never made (or heard about) such a typo before > - I wish the compiler warned about it :-( Hi Pawel, actually my patch description is wrong. The compiler evaluates both statements but does _not_ overwrite the value of the first statement (would require parenthesis to do so). So it is just a cosmetical change, feel free to drop it. Sorry for the noise, Jan > By all means: > > Acked-by: Pawel Moll <pawel.moll@arm.com> > Cc: <stable@vger.kernel.org> # 4.2+ > > Arnd, would you be still able to pick it up in this cycle? > > Thanks Both! > > Pawe? ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] bus: arm-ccn: Fix cpu notifier priority 2016-03-10 14:34 ` Jan Glauber @ 2016-03-10 14:56 ` Pawel Moll 0 siblings, 0 replies; 5+ messages in thread From: Pawel Moll @ 2016-03-10 14:56 UTC (permalink / raw) To: linux-arm-kernel On Thu, 2016-03-10 at 15:34 +0100, Jan Glauber wrote: > On Wed, Mar 09, 2016 at 08:40:45AM +0000, Pawel Moll wrote: > > On Tue, 2016-03-08 at 13:14 +0100, Jan Glauber wrote: > > > Fix cpu priority of notifier block that was erroneously set to > > > return value of next statement. > > > > > > Signed-off-by: Jan Glauber <jglauber@cavium.com> > > > --- > > > drivers/bus/arm-ccn.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c > > > index 7082c72..d4a939e 100644 > > > --- a/drivers/bus/arm-ccn.c > > > +++ b/drivers/bus/arm-ccn.c > > > @@ -1271,7 +1271,7 @@ static int arm_ccn_pmu_init(struct arm_ccn > > > *ccn) > > > * picked to have a chance to migrate events before perf > > > is > > > notified. > > > */ > > > ccn->dt.cpu_nb.notifier_call = arm_ccn_pmu_cpu_notifier; > > > - ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1, > > > + ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1; > > > err = register_cpu_notifier(&ccn->dt.cpu_nb); > > > if (err) > > > goto error_cpu_notifier; > > > > Damn, of course! I have never made (or heard about) such a typo > > before > > - I wish the compiler warned about it :-( > > actually my patch description is wrong. The compiler evaluates both > statements but does _not_ overwrite the value of the first statement > (would require parenthesis to do so). I must admit I looked at the code change rather than at the description, but thinking about it now, comma has the lowest precedence, so the assignments will win. Still, with gcc 6 now warning about suspicious indentations, my wish still stays a wish ;-) > So it is just a cosmetical change, feel free to drop it. Oh no, it's still a bug (only maybe not a "stable-class" one). And one I'll remember :-) Thanks! Pawel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-10 14:56 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-08 12:14 [PATCH] bus: arm-ccn: Fix cpu notifier priority Jan Glauber 2016-03-09 8:40 ` Pawel Moll 2016-03-09 14:24 ` Jan Glauber 2016-03-10 14:34 ` Jan Glauber 2016-03-10 14:56 ` Pawel Moll
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).