Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1118770pxf; Fri, 2 Apr 2021 01:31:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+E1OZUJz6BF1Vz1ME7F6wfPeg/m0A7ASRXRGy3ADMa/0lpFm0g60iuXGwROMbhjmRNbsB X-Received: by 2002:a6b:5811:: with SMTP id m17mr9801900iob.102.1617352260421; Fri, 02 Apr 2021 01:31:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617352260; cv=none; d=google.com; s=arc-20160816; b=rWukUWRE2uDupLbXr/ijTbL/MnrB42hCVoVKXdjqMz67amChK2SDgPzny1AnlLtexW SCxqA0qODDwedNUODgFTYpwQzwKKu9UaSRlv/wlx3ldiupt/BSzntPfGKQf3hZ5sH+fa bVplj30MkHco0nYz6b1SruNCNLwBwZ/fMbqPBeqmVPI0y57y1Toc4FK//dwSY962fZ3n D14DteZScuOmY/qRQxRkajKeDWXAcHc+xpwC3EQ58r90cInZNhbNUcNNNUqlf03ErIxQ 4lCb9aOm53d/gmryziiqK0EEb0d1FnFNr6LZsr3BPaB+3VIFMyvtZeOaQ2Jp1v/vm2/Z +/Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=+67nB0pufOf2YuXY5vaeSvV40tLbQQyBoYoIwon4Gd4=; b=W3klTbkI/UE6K9jpLLvrK5sIvh3qWh8kx4/ucTGCT+Pob0j4KwQxe89iSaWJDqiaES qBg6rAUK+nAU7w0sIBA8NbCsZJBaayffULj8aXIo3TnmhbgFpXMvz9BBgfpPCf2FP14/ OpK+OQIQ2/ecUHWYG5dT3Mq9JnE9hf0WQee2e4orlHTsUj+Ao7ueArBx/bNom73WeBui eY85iwGm5nfDA/aBeXCPMxsXUxnhMpvDvmX57k9k4fpX2fUaPukro2jEO657r//vuTUD m1dGLHyXfUdo4N/q5ZTOHQq4ZGS/MCrOfRDP5UgxpPVwTgOWY2bhHKSOdJroe8mOb5g3 6iEg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q13si8356345ilg.122.2021.04.02.01.30.45; Fri, 02 Apr 2021 01:31:00 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230387AbhDBI3R (ORCPT + 99 others); Fri, 2 Apr 2021 04:29:17 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15530 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhDBI3P (ORCPT ); Fri, 2 Apr 2021 04:29:15 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FBY6w3qzMzNsGg; Fri, 2 Apr 2021 16:26:32 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Fri, 2 Apr 2021 16:29:07 +0800 From: Xiaofei Tan To: , CC: , , Xiaofei Tan Subject: [PATCH] tty: pty: Add a blank line after declarations Date: Fri, 2 Apr 2021 16:26:30 +0800 Message-ID: <1617351990-5189-1-git-send-email-tanxiaofei@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan --- drivers/tty/pty.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 5e23745..106265a 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -159,6 +159,7 @@ static int pty_chars_in_buffer(struct tty_struct *tty) static int pty_set_lock(struct tty_struct *tty, int __user *arg) { int val; + if (get_user(val, arg)) return -EFAULT; if (val) @@ -171,6 +172,7 @@ static int pty_set_lock(struct tty_struct *tty, int __user *arg) static int pty_get_lock(struct tty_struct *tty, int __user *arg) { int locked = test_bit(TTY_PTY_LOCK, &tty->flags); + return put_user(locked, arg); } @@ -200,6 +202,7 @@ static int pty_set_pktmode(struct tty_struct *tty, int __user *arg) static int pty_get_pktmode(struct tty_struct *tty, int __user *arg) { int pktmode = tty->packet; + return put_user(pktmode, arg); } @@ -463,6 +466,7 @@ static int pty_install(struct tty_driver *driver, struct tty_struct *tty) static void pty_remove(struct tty_driver *driver, struct tty_struct *tty) { struct tty_struct *pair = tty->link; + driver->ttys[tty->index] = NULL; if (pair) pair->driver->ttys[pair->index] = NULL; -- 2.8.1