sched/core: Consolidate switch_count assignment

Message ID 202312191445+0800-wangjinchao@xfusion.com
State New
Headers
Series sched/core: Consolidate switch_count assignment |

Commit Message

Wang Jinchao Dec. 19, 2023, 6:45 a.m. UTC
  Eliminate redundancy by consolidating the switch_count assignment,
removing the duplicate operation.

Signed-off-by: Wang Jinchao <wangjinchao@xfusion.com>
---
 kernel/sched/core.c | 1 -
 1 file changed, 1 deletion(-)
  

Patch

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a708d225c28e..ecac59aa211d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6646,7 +6646,6 @@  static void __sched notrace __schedule(unsigned int sched_mode)
 				delayacct_blkio_start();
 			}
 		}
-		switch_count = &prev->nvcsw;
 	}
 
 	next = pick_next_task(rq, prev, &rf);