Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp135072pxf; Tue, 6 Apr 2021 17:19:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9LaSeYOoNQtvMW0fBHjckgJVhha2ODcRwpe7vept6esC8fTvxy/drzFNmK/vydc38JhW9 X-Received: by 2002:a17:906:6d01:: with SMTP id m1mr672999ejr.501.1617754781692; Tue, 06 Apr 2021 17:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617754781; cv=none; d=google.com; s=arc-20160816; b=euCuuoSD2SL2nET+ZpOwmyuAUUVEXY4zzpI2ApCyz7D2vO7O/c0EFTISAlsQZk6n0U ZivAW2yBJ+qNADLNA+B0h8T8YUCG5TDyjS9Mt676fvD48mm+PoBYiSfTqkEDxDHGchpM Ln2+UOR3wRx7Pn3oztWHu3YlVnI7JcrnyRnL3o12MKIYaMkc1abLNuIHHY68m/IM20Qt xteYlg/6kOgitRBklDtiBgrd0b4JxUqwz+EmH0A7COW1FjNDFN3YWb5b7ilWnp+iw28a y7UpTZ9MQYo/9e0yWUEgjiL/+kfZ3ExWTgSzWZ7qlcbqd6zHnpvuXdpiUW+rk3X/kG8s 13og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=NV/6ZglcId3EqzJb0gRM1tXv7VTKbU+xMPockkT811w=; b=YU/wISQ6zUo2qhaqe2Uazsah5lZH5PDryRH1owERj3xArgfV0lTc0t/hK73T8baMul DcWdfkJhAHGhdpsK2fBVr3ZRnLXEs+4lwCNb077ecMxeW7INgT+X/ROhxv3RYjGd56Go TB5RxpDr2FBp42c+yuGGfmTiMPmPJjwAhnPx8CNBbfpg1Gf31H37zCacQRdtpdo2SRmY zzJ4USXz8vte2ezapzIPi4omnVXB48NZG6+aO7Gs+xzywG3D2x7Xjm4h0r+KMLBg6eH8 JDGhgLbNRvpuKBM1UNyWVWR/zl6nBjoJ7Ax3xYJaoETBG6VYWCCj0BhschLofmHzrcLJ TlKg== 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 ke3si16899496ejc.747.2021.04.06.17.19.19; Tue, 06 Apr 2021 17:19:41 -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 S245545AbhDFL1w (ORCPT + 99 others); Tue, 6 Apr 2021 07:27:52 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:16349 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245501AbhDFL1n (ORCPT ); Tue, 6 Apr 2021 07:27:43 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FF4vP6jdXz93fR; Tue, 6 Apr 2021 19:25:21 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Tue, 6 Apr 2021 19:27:24 +0800 From: Xiaofei Tan To: , CC: , , Xiaofei Tan Subject: [PATCH v2 04/10] tty: tty_jobctrl: Fix coding style issues of block comments Date: Tue, 6 Apr 2021 19:24:42 +0800 Message-ID: <1617708288-14847-5-git-send-email-tanxiaofei@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1617708288-14847-1-git-send-email-tanxiaofei@huawei.com> References: <1617708288-14847-1-git-send-email-tanxiaofei@huawei.com> 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 Fix coding style issues of block comments, reported by checkpatch.pl. Besides, do some expression optimization for the sentenses. Signed-off-by: Xiaofei Tan --- drivers/tty/tty_jobctrl.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/tty/tty_jobctrl.c b/drivers/tty/tty_jobctrl.c index 86070f7..7003b6b 100644 --- a/drivers/tty/tty_jobctrl.c +++ b/drivers/tty/tty_jobctrl.c @@ -204,8 +204,10 @@ int tty_signal_session_leader(struct tty_struct *tty, int exit_session) spin_lock_irq(&p->sighand->siglock); if (p->signal->tty == tty) { p->signal->tty = NULL; - /* We defer the dereferences outside fo - the tasklist lock */ + /* + * We defer the dereferences outside of + * the tasklist lock period + */ refs++; } if (!p->signal->leader) { @@ -328,9 +330,11 @@ void disassociate_ctty(int on_exit) */ void no_tty(void) { - /* FIXME: Review locking here. The tty_lock never covered any race - between a new association and proc_clear_tty but possible we need - to protect against this anyway */ + /* + * FIXME: Review locking here. The tty_lock never covered any race + * between a new association and proc_clear_tty but possibly we need + * to protect against this period anyway + */ struct task_struct *tsk = current; disassociate_ctty(0); @@ -536,7 +540,7 @@ static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t _ /* * (tty == real_tty) is a cheap way of * testing if the tty is NOT a master pty. - */ + */ if (tty == real_tty && current->signal->tty != real_tty) return -ENOTTY; -- 2.8.1