Re: [PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-17 Thread Arnd Bergmann
On Wed, Mar 17, 2021 at 9:05 PM Ingo Molnar wrote: > * Arnd Bergmann wrote: > > On Wed, Mar 17, 2021 at 9:45 AM Ingo Molnar wrote: > > > > > > More importantly, we use this pattern when we don't want !CONFIG_BUG > > > to remove the 'condition'. > > > > > > I.e. the "side effect" here is

Re: [PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-17 Thread Ingo Molnar
* Arnd Bergmann wrote: > On Wed, Mar 17, 2021 at 9:45 AM Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > * Jiapeng Chong wrote: > > > > > > > Fix the following coccicheck warnings: > > > > > > > > ./kernel/sched/core.c:8039:2-5: WARNING: Use BUG_ON instead of if > > > > condition followed

Re: [PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-17 Thread Arnd Bergmann
On Wed, Mar 17, 2021 at 9:45 AM Ingo Molnar wrote: > * Ingo Molnar wrote: > > * Jiapeng Chong wrote: > > > > > Fix the following coccicheck warnings: > > > > > > ./kernel/sched/core.c:8039:2-5: WARNING: Use BUG_ON instead of if > > > condition followed by BUG. > > > > > > Reported-by: Abaci

Re: [PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-17 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Jiapeng Chong wrote: > > > Fix the following coccicheck warnings: > > > > ./kernel/sched/core.c:8039:2-5: WARNING: Use BUG_ON instead of if > > condition followed by BUG. > > > > Reported-by: Abaci Robot > > Signed-off-by: Jiapeng Chong > > --- > >

Re: [PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-17 Thread Ingo Molnar
* Jiapeng Chong wrote: > Fix the following coccicheck warnings: > > ./kernel/sched/core.c:8039:2-5: WARNING: Use BUG_ON instead of if > condition followed by BUG. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > kernel/sched/core.c | 3 +-- > 1 file changed, 1

Re: [PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-17 Thread Christophe Leroy
Le 17/03/2021 à 07:45, Jiapeng Chong a écrit : Fix the following coccicheck warnings: ./arch/powerpc/platforms/cell/spufs/sched.c:908:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Consider using WARN_ON() instead of BUG_ON() if relevant. If not, explain in the commit

[PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-17 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./arch/powerpc/platforms/cell/spufs/sched.c:908:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/platforms/cell/spufs/sched.c | 3 +-- 1 file changed, 1 insertion(+),

[PATCH] sched: replace if (cond) BUG() with BUG_ON()

2021-03-16 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./kernel/sched/core.c:8039:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- kernel/sched/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git