Skip to contentSkip to conversation

auxdisplay: panel: Remove unused callback binding code

PATCH In review Miles Krause 4 participants 6 messages Jul 13 – Jul 14

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 auxdisplay: panel: Remove unused callback binding code

panel_bind_callback() has been compiled out with #if 0 since it was introduced and has no callers. Remove the dead function to reduce maintenance burden.

No functional change.

---
Compile-tested on x86_64 with:

make O=out allmodconfig
make O=out W=1 drivers/auxdisplay/panel.o

Sparse-tested with:

make O=out C=2 CHECK=sparse drivers/auxdisplay/panel.o

---
 drivers/auxdisplay/panel.c | 37 -------------------------------------
 1 file changed, 37 deletions(-)
drivers/auxdisplay/panel.c +0 -37
index d8854cf15268..a7dfc53157bc 100644
@@ -1450,43 +1450,6 @@ static struct logical_input *panel_bind_key(const char *name, const char *press,
 	return key;
 }
 
-#if 0
-/* tries to bind a callback function to the signal name <name>. The function
- * <press_fct> will be called with the <press_data> arg when the signal is
- * activated, and so on for <release_fct>/<release_data>
- * Returns the pointer to the new signal if ok, NULL if the signal could not
- * be bound.
- */
-static struct logical_input *panel_bind_callback(char *name,
-						 void (*press_fct)(int),
-						 int press_data,
-						 void (*release_fct)(int),
-						 int release_data)
-{
-	struct logical_input *callback;
-
-	callback = kmalloc(sizeof(*callback), GFP_KERNEL);
-	if (!callback)
-		return NULL;
-
-	memset(callback, 0, sizeof(struct logical_input));
-	if (!input_name2mask(name, &callback->mask, &callback->value,
-			     &scan_mask_i, &scan_mask_o))
-		return NULL;
-
-	callback->type = INPUT_TYPE_STD;
-	callback->state = INPUT_ST_LOW;
-	callback->rise_time = 1;
-	callback->fall_time = 1;
-	callback->u.std.press_fct = press_fct;
-	callback->u.std.press_data = press_data;
-	callback->u.std.release_fct = release_fct;
-	callback->u.std.release_data = release_data;
-	list_add(&callback->list, &logical_inputs);
-	return callback;
-}
-#endif
-
 static void keypad_init(void)
 {
 	int keynum;

---
base-commit: 30a41cf47aecb4dafb81183b5e046e93498773ff
change-id: 20260712-panel-remove-dead-callback-46b2251e4feb

Best regards,

Signature · 1 line
Miles Krause <[email protected]>
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi Miles,

Thanks for your patch!

Quoted 4 lines · On Mon, 13 Jul 2026 at 03:07, Miles Krause via B4 Relay…

From: Miles Krause <[email protected]>

panel_bind_callback() has been compiled out with #if 0 since it was introduced and has no callers. Remove the dead function to reduce

FTR, that function was used until commit 630231776da4916e ("Staging:
panel: remove support for smartcards") in v2.6.29.

Quoted 5 lines

maintenance burden.

No functional change.

I do agree it can go. It can be revived from git history when needed.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Acked-by
#2 lore raw
Quoted 20 lines · Geert Uytterhoeven

Hi Miles,

Thanks for your patch!

Quoted 4 lines · On Mon, 13 Jul 2026 at 03:07, Miles Krause via B4 Relay…

From: Miles Krause <[email protected]>

panel_bind_callback() has been compiled out with #if 0 since it was introduced and has no callers. Remove the dead function to reduce

FTR, that function was used until commit 630231776da4916e ("Staging:
panel: remove support for smartcards") in v2.6.29.

Quoted 5 lines

maintenance burden.

No functional change.

Quoted 7 lines

I do agree it can go. It can be revived from git history when needed.

Gr{oetje,eeting}s,

Geert

I, too, strongly doubt it will be reused any day.

Willy

#3 lore raw
In reply to Miles Krause
Quoted 6 lines · On Sun, Jul 12, 2026 at 09:07:11PM -0400, Miles Krause via B4 Relay wrote:

panel_bind_callback() has been compiled out with #if 0 since it was introduced and has no callers. Remove the dead function to reduce maintenance burden.

No functional change.

Pushed to my review and testing queue, thanks!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw

Hi Andy,

Quoted 8 lines · Andy Shevchenko
Quoted 5 lines · On Sun, Jul 12, 2026 at 09:07:11PM -0400, Miles Krause via B4 Relay wrote:

panel_bind_callback() has been compiled out with #if 0 since it was introduced and has no callers. Remove the dead function to reduce maintenance burden.

No functional change.

Pushed to my review and testing queue, thanks!

You forgot to fix the incorrectness in the patch description:

"FTR, that function was used until commit 630231776da4916e ("Staging:
panel: remove support for smartcards") in v2.6.29."

Thanks!

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#5 lore raw
Quoted 7 lines · Geert Uytterhoeven
Quoted 5 lines · Andy Shevchenko
Quoted 4 lines · On Sun, Jul 12, 2026 at 09:07:11PM -0400, Miles Krause via B4 Relay wrote:

panel_bind_callback() has been compiled out with #if 0 since it was introduced and has no callers. Remove the dead function to reduce maintenance burden.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

No functional change.

Pushed to my review and testing queue, thanks!

You forgot to fix the incorrectness in the patch description:

"FTR, that function was used until commit 630231776da4916e ("Staging:
panel: remove support for smartcards") in v2.6.29."

Ah, thanks, updated.

Signature · 2 lines
With Best Regards,
Andy Shevchenko