Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1547384ybh; Mon, 20 Jul 2020 00:38:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQWDsnxwTxgkXcffEfQydQvBzsMHIGJ2YZVVabMqSRipSRNgdIc+eo8ksZ5lRzsrOLegAG X-Received: by 2002:aa7:d744:: with SMTP id a4mr20365627eds.94.1595230695436; Mon, 20 Jul 2020 00:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595230695; cv=none; d=google.com; s=arc-20160816; b=izschQUBuggrrLcWOuZmsfIbxkVhQrD172LaxAXdI2mVYDEz3fPWgKKOb1ZVv1GZl7 bQPZuxJsWV5ZtjFJle8MAFgloYTfLGjms+JOWyHoFMwJwwkwDpgVW8zQTtMnqiYKOmJx rjz05VahpNZFap6VC6Oy9sPc+vpAUiZJ/TEycZt/1a9rFvK7nnn9DuUYhaadAHLdEWaQ HhXOI+2DSJ81YnF/f7DFkhWzIU3u0DoPiCorP/YBV/7hiP0LDIlkKfvrZ0Q3lBbYydN8 CFaJNna2Sq88uYDVsEANMGoSXUlUFRKWpTmH8wAb1QQ6qQ7KZh0LNqx8JLqk4vc5S/Uk vOhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=fE17XYj2LovtDVGLqGZFZjPfuqFUNAFIU0Im3iB7HEo=; b=jKMs1+UlFp6RuQjxssk1AwjnRTXASJmjZmIDyoWFmWqeVo6MnQBVBx7OkkLJJDG9Wl RxGxM/pSSMiZgEj/Rh2j697ji3EnJBT1f4X/29tj8GOFDuQwxhGoUzPkj4SeRXNoXtlF /rjKoId+sQa/RcYAAKptUSf/+bWKDlx46bghTmLihs1bMTV6ch0idDvnjbSySZJLzl+6 FAsqgyeu75RzFgSA0XGyudGcctKdNn39IsUEgqxOHUMY2NuKGfvvEeuCUPpSb2/ehHub NcV4cudUWj6pG9DoB2fa3FoplZles5mkDrhhGsjfrtNadtAcWmh2344F645kFWCcJ/Dm tmdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z24si10093862eja.705.2020.07.20.00.37.52; Mon, 20 Jul 2020 00:38:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726587AbgGTHfM (ORCPT + 99 others); Mon, 20 Jul 2020 03:35:12 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:45184 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726015AbgGTHfM (ORCPT ); Mon, 20 Jul 2020 03:35:12 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7FDB657DAFAFD591F2F8; Mon, 20 Jul 2020 15:35:08 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 20 Jul 2020 15:35:00 +0800 From: Xiongfeng Wang To: CC: , , Subject: [PATCH] Input: psmouse: add a newline when printing 'proto' by sysfs Date: Mon, 20 Jul 2020 15:38:46 +0800 Message-ID: <20200720073846.120724-1-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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