mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
sched: Constify function scope static struct sched_param usage
Function-scope statics are discouraged because they are easily overlooked and can cause subtle bugs/races due to their global (non-SMP safe) nature. Linus noticed that we did this for sched_param - at minimum make the const. Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: Message-ID: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
524429c31b
commit
c9b5f501ef
4 changed files with 4 additions and 4 deletions
|
|
@ -577,7 +577,7 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) { }
|
|||
*/
|
||||
static int irq_thread(void *data)
|
||||
{
|
||||
static struct sched_param param = {
|
||||
static const struct sched_param param = {
|
||||
.sched_priority = MAX_USER_RT_PRIO/2,
|
||||
};
|
||||
struct irqaction *action = data;
|
||||
|
|
|
|||
Loading…
Reference in a new issue