From patchwork Tue Jan 10 12:02:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 41425 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2705172wrt; Tue, 10 Jan 2023 04:05:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXtB7fTgU5TLTAOQ/CIbLSJTNXDP1niNQPgpIm495DpT9k8rJNNCnIGRW4NblyZ+vRlzBTIw X-Received: by 2002:a17:90a:7acf:b0:227:24d0:41b9 with SMTP id b15-20020a17090a7acf00b0022724d041b9mr3963549pjl.26.1673352322101; Tue, 10 Jan 2023 04:05:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673352322; cv=none; d=google.com; s=arc-20160816; b=JGpjaDrI6IrBLMRDUersffgTlfPygNMXZDb3515Jl0HVMQSRslvM3Ye0SWKwv03TV6 q2gf4Oqz3LEQL/Ix503o/iUSpMofN4uM9Nwaaj9gnl2EhEMrNxc0cGMzrKZoWW/hJcPi RRjMEQHfqvab11EzLrYNxQSAilHAvJhGT8J9Lm7csqbKO021W3ctCaJE0awZmzbFmtm8 CIoHnf0PBFYc+5MqPdeAqDS+frHA1ZNVxKVxBDA3B6bfFQC/KXOs57LK0FDPR8/hkDx0 iizezodyFk9EDYYw3Z2L40IKhF8fS04Pn3Aa3K5Z3E01leijFoC7nmpgBiNeJaT8745X ZGnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2bZ5OSlOkdHjMRaRadWLcfV8ihWK8AbXZXzVn08J18o=; b=McSBUakiX2jFjrPr+YFVo2b3ys+ZbCRUjXj9TlqHYJWnEsMPWF/8bVxSfG+FRHhy6j ZDyv3F8dY5f1SLJo05MrnGczrtPamtMEUPBr6FiJfPo2SU1hLu2LSDjNdOj5aQnDaBa6 wWNoO+8e6/wNlibTuVyCunT39HuMgGqEet0nlfgmDEzqwMzkHIjXzeSbSZBF2yJewYSO 5iuVaYMW3n/FkuXRRLoimgYVbY0ZnPNgDlmZSqX4v6rVfuG2sbl2Ui5h5J+W1tf0QIZB 75Yb/8YrRMC3viFxGfzuJAjF3Vx8TovV4Iy1JICbhzF5+pOqi8v4IpmsK17e5wLo+hlq bn2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nYRyAgau; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo16-20020a17090b1c9000b00219b5765ff9si15878947pjb.105.2023.01.10.04.05.09; Tue, 10 Jan 2023 04:05:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nYRyAgau; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238088AbjAJMDO (ORCPT + 99 others); Tue, 10 Jan 2023 07:03:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230259AbjAJMDD (ORCPT ); Tue, 10 Jan 2023 07:03:03 -0500 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 052D35833B; Tue, 10 Jan 2023 04:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673352182; x=1704888182; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p/abY3EvdT/9LBFynpim0jdmH9McxhRPFImaHI0+/DE=; b=nYRyAgau1SET0FhgNaZ4vs423kc6qZAPa+INouVOD9tKwuChVcpLqh6b e3NRMN+Bq086y1RotcqulJW+vyXVgov3FWl18skCEyZqeSJEQrN1/5C/d 5IdUAYRswxogKlmUxsCEMTbdwvRpQQms8KdGWfs3YBOtXS4f1fHNjZIh+ rx3LmuJlQ8prf2K9gU1lzNM/I0kgc8/NncVV7nWeS3Q5wY9WJouxekKpj kg/KIlpN5stTaGigItQja77vHm6hnv0M70VmFcXJP5WCnb95JCXDFmTIx M2qKUWWeSG8CTDCGwgP5c5r6Os10SagDT0mnKubV8Ks6iRzi/djwI8Rxl A==; X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="350349997" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="350349997" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 04:03:02 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="799406782" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="799406782" Received: from gbocanex-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.249.44.115]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 04:03:00 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , Johan Hovold , =?utf-8?q?Samuel_Iglesias_Gons=C3=A1lvez?= , Rodolfo Giometti , linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 02/13] tty: Cleamup tty_port_set_suspended() bool parameter Date: Tue, 10 Jan 2023 14:02:15 +0200 Message-Id: <20230110120226.14972-3-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230110120226.14972-1-ilpo.jarvinen@linux.intel.com> References: <20230110120226.14972-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754637084564139337?= X-GMAIL-MSGID: =?utf-8?q?1754637084564139337?= Make callers pass true/false consistently for bool val. Reviewed-by: Jiri Slaby Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/serial_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index e049c760b738..f9564b1e3dfb 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -312,7 +312,7 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state) * a DCD drop (hangup) at just the right time. Clear suspended bit so * we don't try to resume a port that has been shutdown. */ - tty_port_set_suspended(port, 0); + tty_port_set_suspended(port, false); /* * Do not free() the transmit buffer page under the port lock since @@ -1725,7 +1725,7 @@ static void uart_tty_port_shutdown(struct tty_port *port) * a DCD drop (hangup) at just the right time. Clear suspended bit so * we don't try to resume a port that has been shutdown. */ - tty_port_set_suspended(port, 0); + tty_port_set_suspended(port, false); /* * Free the transmit buffer. @@ -2346,7 +2346,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) int tries; unsigned int mctrl; - tty_port_set_suspended(port, 1); + tty_port_set_suspended(port, true); tty_port_set_initialized(port, false); spin_lock_irq(&uport->lock); @@ -2469,7 +2469,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) } } - tty_port_set_suspended(port, 0); + tty_port_set_suspended(port, false); } mutex_unlock(&port->mutex);