Linux Input Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Input: psmouse: add a newline when printing 'proto' by sysfs
@ 2020-07-20  7:38 Xiongfeng Wang
  2020-07-22  5:34 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Xiongfeng Wang @ 2020-07-20  7:38 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, linux-kernel, wangxiongfeng2

When I cat parameter 'proto' by sysfs, it displays as follows. It's
better to add a newline for easy reading.

root@syzkaller:~# cat /sys/module/psmouse/parameters/proto
autoroot@syzkaller:~#

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
---
 drivers/input/mouse/psmouse-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 527ae0b9a191..0b4a3039f312 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -2042,7 +2042,7 @@ static int psmouse_get_maxproto(char *buffer, const struct kernel_param *kp)
 {
 	int type = *((unsigned int *)kp->arg);
 
-	return sprintf(buffer, "%s", psmouse_protocol_by_type(type)->name);
+	return sprintf(buffer, "%s\n", psmouse_protocol_by_type(type)->name);
 }
 
 static int __init psmouse_init(void)
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: psmouse: add a newline when printing 'proto' by sysfs
  2020-07-20  7:38 [PATCH] Input: psmouse: add a newline when printing 'proto' by sysfs Xiongfeng Wang
@ 2020-07-22  5:34 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2020-07-22  5:34 UTC (permalink / raw)
  To: Xiongfeng Wang; +Cc: linux-input, linux-kernel

On Mon, Jul 20, 2020 at 03:38:46PM +0800, Xiongfeng Wang wrote:
> When I cat parameter 'proto' by sysfs, it displays as follows. It's
> better to add a newline for easy reading.
> 
> root@syzkaller:~# cat /sys/module/psmouse/parameters/proto
> autoroot@syzkaller:~#
> 
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  7:38 [PATCH] Input: psmouse: add a newline when printing 'proto' by sysfs Xiongfeng Wang
2020-07-22  5:34 ` Dmitry Torokhov

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git