Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: tca8418 - remove set but not used variable 'max_keys'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/input/keyboard/tca8418_keypad.c: In function tca8418_keypad_probe:
drivers/input/keyboard/tca8418_keypad.c:269:24: warning: variable max_keys set but not used [-Wunused-but-set-variable]

It's not used since commit 16ff7cb1848a ("Input:
tca8418-keypad - switch to using managed resources")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

YueHaibing and committed by
Dmitry Torokhov
b02f6b6b b89a9f2f

+1 -2
+1 -2
drivers/input/keyboard/tca8418_keypad.c
··· 266 266 struct tca8418_keypad *keypad_data; 267 267 struct input_dev *input; 268 268 u32 rows = 0, cols = 0; 269 - int error, row_shift, max_keys; 269 + int error, row_shift; 270 270 u8 reg; 271 271 272 272 /* Check i2c driver capabilities */ ··· 291 291 } 292 292 293 293 row_shift = get_count_order(cols); 294 - max_keys = rows << row_shift; 295 294 296 295 /* Allocate memory for keypad_data and input device */ 297 296 keypad_data = devm_kzalloc(dev, sizeof(*keypad_data), GFP_KERNEL);