Skip to content

Commit b2036f5

Browse files
committed
kp: Make kp_mode an unsigned int type variable
kp_mode's range is 0 - 3, means it only accepts positive values and can never be negative. Kprofiles also have a check to fallback to 0 if kp_mode exceeds 3 but doesn't do it for the opposite. Therefore, make kp_mode an unsigned int type variable to ignore negative values. Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
1 parent 8ce8b40 commit b2036f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static bool screen_on = true;
3838
static bool auto_kprofiles __read_mostly = true;
3939
module_param(auto_kprofiles, bool, 0664);
4040

41-
static int kp_mode = CONFIG_DEFAULT_KP_MODE;
41+
static unsigned int kp_mode = CONFIG_DEFAULT_KP_MODE;
4242
module_param(kp_mode, int, 0664);
4343

4444
DEFINE_MUTEX(kplock);

0 commit comments

Comments
 (0)