Input: fsia6b: Increase size of phys to hold full name
Subsystems (3)
Markus Koch
maintainerPATCH 1/1 Input: fsia6b: Increase size of phys to hold full name
The driver appends "/input0" to the phys name of the serio device. This commit ensures that there is enough space in the variable to do so.
--- drivers/input/joystick/fsia6b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/fsia6b.c +1 -1
@@ -56,7 +56,7 @@ struct fsia6b {struct input_dev *dev;struct ibus_packet packet; -char phys[32 ]; + char phys[sizeof_field(struct serio, phys)+7]; }; static irqreturn_t fsia6b_serio_irq(struct serio *serio,
Signature · 1 line
2.49.0
Markus Koch
maintainerHi,
I sent a patch 2 weeks ago [1] and haven't heard back yet. The same happened for another patch I submitted at the end of last year [2], where in the meantime the patch of someone else (doing exactly the same) got merged. Therefore I have to ask:
Am I doing something wrong? Is there a preferred way to submit patches for this subsystem that I'm missing (like Gitlab PRs or something)? I'm happy to change my workflow if it helps you.
Thank you,
Markus
[1]: https://patchwork.kernel.org/project/linux-input/patch/[email protected]/
[2]: https://patchwork.kernel.org/project/linux-input/patch/[email protected]/
Markus Koch
maintainerHi,
just following up again since I haven't heard back at all about my patch from late March [1].
It's OK if you'd like this issue solved in a completely different way, or not at all (I saw some controversy about this topic on the mailing list), just let me know so that I can act accordingly. Or, if more time is needed, a quick "we're still investigating how to handle these cases" is also appreciated.
Thanks!
Markus
[1]: https://patchwork.kernel.org/project/linux-input/patch/[email protected]/
Dmitry Torokhov
maintainerHi Markus,
Quoted 11 lines · Markus Koch
Hi,
I sent a patch 2 weeks ago [1] and haven't heard back yet. The same happened for another patch I submitted at the end of last year [2], where in the meantime the patch of someone else (doing exactly the same) got merged. Therefore I have to ask:
Am I doing something wrong? Is there a preferred way to submit patches for this subsystem that I'm missing (like Gitlab PRs or something)? I'm happy to change my workflow if it helps you.
No, you are not doing anything wrong, the issue is on my side. I have quite a bit of backlog and so often go through my mailbox in LIFO order. This means that I might sometimes merge a "newer" patch instead of picking up the first one.
As far as extending "phys" I indeed do not want to do that because it is perfectly fine to have truncated phys (or we can extend it when we encounter a device that actually needs it vs doing it just to appease the check). I think switching from snprintf() to scnprintf() will shut off the warning. Could you please let me know if it does it from you?
Thanks.
Signature · 1 line
Dmitry
Markus Koch
maintainerPATCH v2 1/1 Input: fsia6b: Suppress buffer truncation warning for phys
---
v2: As suggested, I changed snprintf to scnprintf, which removes the warning.
drivers/input/joystick/fsia6b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/fsia6b.c +1 -1
@@ -149,7 +149,7 @@ static int fsia6b_serio_connect(struct serio *serio, struct serio_driver *drv) } fsia6b->dev = input_dev; -snprintf (fsia6b->phys,sizeof (fsia6b->phys),"%s/input0" , serio->phys); +scnprintf (fsia6b->phys,sizeof (fsia6b->phys),"%s/input0" , serio->phys); input_dev->name =DRIVER_DESC ; input_dev->phys = fsia6b->phys;
Signature · 1 line
2.49.0
Re: [PATCH v2] Input: fsia6b: Suppress buffer truncation warning for phys
Quoted 3 lines · Markus Koch
Reported-by kernel test robot <[email protected]>Signed-off-by Markus Koch <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry