Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp568910imm; Wed, 4 Jul 2018 02:03:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe5o9TlPS5DdGNOSv837x3lqwT/LIwg0gTuOzVBWRcKmhStIhZ/hoO2IYT9DThQ74xI65M3 X-Received: by 2002:a17:902:7407:: with SMTP id g7-v6mr1280427pll.85.1530695036244; Wed, 04 Jul 2018 02:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530695036; cv=none; d=google.com; s=arc-20160816; b=O0v9D14dfpuELVTF6Uvl5PFsIaKAuO0xyO3j56DZA6hWakDZ63r0/sOk9tqEBze8+N C8jlc5FZzKZxcrue1xHKI+6sXi1ZkK4Y8itBA+ygf1TMZniUTwwMU4L4DEzDm7/7ldqd ZXu0Pi6Yol1hqFdYZl5yzBtfaKrZcHNTJ7gwxDjgo5YMnmtBb+7QhdX1rlZK17LX2Fwu uJHutX2bGDxP7IC+eyotvGONgaj/iPsFrjff7H/XYsYkoUdLfMp8hOT8T0FvpDqDjXqV jr3299KuxmrZJRpOdw2cu1KYoHcdPY3Scvv9i0BeIuzNnQKvyJeHFfILQTHOtuDkbjW6 2sAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=2BkPSalFsSkPJVjHXXPW0MqHlY03OO74gBSLetpCqdU=; b=vf/gsaaEqAtCmRsoRahJFJph9fDUahWOZ1l6G5baDb/S2v9hPVYdySY8ArIXWsVrCZ 0eVuu5c93X3W3Zca7Xwk2yfDafIstlHW+CreS342XsDjKVAOwESXYBj0Ju+bjRcQISI0 JltHd+7cg0erQXhvlUjdUf2a4LjP5t4ZjFnCUA7ErXyKB0cnNqU+87oIS6TEwYN5so5o Lbsc34Gj6wvsv5pWgg3OxGjIOpGxjtLP+FpQi89dYAfx7qvebUXE1fEXVs4+3HrVS8mG CdTmsmxKkqKbYAfJj5oYqfhqD+b/0fVv6/EIzPR6/5wxY6man/YzIIvgvwGQBWPh5xG6 czSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b=VwfM+4Fq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13-v6si2742052pgq.627.2018.07.04.02.03.41; Wed, 04 Jul 2018 02:03:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@Synaptics.onmicrosoft.com header.s=selector1-synaptics-com header.b=VwfM+4Fq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933831AbeGDJCj (ORCPT + 99 others); Wed, 4 Jul 2018 05:02:39 -0400 Received: from mail-co1nam03on0047.outbound.protection.outlook.com ([104.47.40.47]:3377 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932439AbeGDJCd (ORCPT ); Wed, 4 Jul 2018 05:02:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2BkPSalFsSkPJVjHXXPW0MqHlY03OO74gBSLetpCqdU=; b=VwfM+4FqQQ9XTdHpEm1a3rVqrZzYsudLRonhN9gJyIlXPiIjO4KVDQP3CjFo6VNjGH/4vNmnSWCU5to1Z7cEVHS8xC2jx/ZO7hSwiN4usNgYdLUDFYTow9+gl8aweTmIx32gliXBvR9dbcVlcg6j/RBfbQPfFJh6fvVgyqh4FP4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by DM5PR03MB2636.namprd03.prod.outlook.com (2603:10b6:3:43::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.24; Wed, 4 Jul 2018 09:02:29 +0000 Date: Wed, 4 Jul 2018 17:00:40 +0800 From: Jisheng Zhang To: Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/3] serial: 8250: let serial8250_get_divisor() get uart_port * as param Message-ID: <20180704170040.39ac9cf3@xhacker.debian> In-Reply-To: <20180704165908.4bb8b090@xhacker.debian> References: <20180704165908.4bb8b090@xhacker.debian> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TYAPR01CA0152.jpnprd01.prod.outlook.com (2603:1096:404:7e::20) To DM5PR03MB2636.namprd03.prod.outlook.com (2603:10b6:3:43::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f0cc7b6-544a-455e-d5c0-08d5e18cdff3 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:DM5PR03MB2636; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2636;3: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yp/V13oSdk7vLugQrm+iq+njbSs8C1o2j5zq/a1o4gl8KJOqXjsdnQIIEElLGxLwfRSO//IcdsqF+0BMKuqQ/Ct/BjuOMj0lR4vXSbJDR0p+UK7E39xi0x32I0F8K+bmpQv497OkjVhL+gY+/mZilLqwCeVXWWCWd5bMuzuxoXiL4xoofZviwFI+GlFqzSpJmBiosnPYFgIYjdvMEqIsdJBGcMEPZ0sQA8V05c1UoqWQcXRB7Ci52ZrtPawYYAhITaH5a49kAP5jSZOd+NZgVaFrTebtdPmiS4PB4ROzN18oh2keDNRLDlG8Numm84O+p7h1Ou5tPcpx9tQAN5FoKG7;4:yrZMWFZtGklZTQiLhbqK3PmAetHq9b9bsFiDYKngJW5rqDalv17j8+3txzW68hqEMfj2cBy4uywRLmXokQJNv5GJYjB2AZd0mhgAIHv9CeBjY6jQW2RlfCaIPWWUqZVxUukB6zN517guwSLr4QLfdRMHgld4qX5Iuj/mKF14i+RSVgCkymcHKZl5LhwTwdj1RNSnoZVIWSyK7shFnwQpFftkYgfWHtfjFioAy5XCnCGnBChZdCd7EOJI4EjyPVC69xuR1k+kRwwLLuuFldTGAQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DM5PR03MB2636;BCL:0;PCL:0;RULEID:;SRVR:DM5PR03MB2636; X-Forefront-PRVS: 0723A02764 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(366004)(346002)(136003)(376002)(39850400004)(199004)(189003)(1076002)(3846002)(23726003)(4326008)(6116002)(50226002)(81166006)(8936002)(68736007)(81156014)(8676002)(105586002)(7736002)(305945005)(25786009)(11346002)(6666003)(446003)(476003)(5660300001)(106356001)(956004)(486006)(2906002)(66066001)(47776003)(97736004)(53936002)(230700001)(478600001)(72206003)(55016002)(9686003)(33896004)(110136005)(14444005)(86362001)(386003)(6506007)(186003)(16526019)(26005)(15760500003)(316002)(52116002)(7696005)(50466002)(76176011)(39210200001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB2636;H:xhacker.debian;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB2636;23:IRHF9wJ9ctdoSAHRW53xX3T9YjYIca5oJG75RaN7V?= =?us-ascii?Q?amJNJ4pn1MbKvhM158TAw2X7O2n7Zh2jouzg05f0sIRZfIFvXJsYe0XBNsco?= =?us-ascii?Q?I1fNOo6eLvwDxt3UcsLXbMLa+mG7YqApv46vnOP8KvYCK6OOEZDyJwJbRpZR?= =?us-ascii?Q?xEIcp9FqUnv4b96w6N1aZev2UCxnkwL5Kg0CdsUOlB9yBcGO7q19J74OBXHr?= =?us-ascii?Q?ZEzuZjwRE4vef9yCjV/5n8ZA4nRdLtpL1oRnU2QEjjzh73B82dAYhid3ihus?= =?us-ascii?Q?NAVhYedwdezGP48Ru/DgR11fDu+NKyVlAvFNPtuaTJ3mn9jpBpnLTEet/921?= =?us-ascii?Q?d9DAF0XGGLrWk0xRp500oVBG0G9OfVrtuIl/MLLedkyhccjEMSir5cr0QUk0?= =?us-ascii?Q?PaFOXSuKgj2FxxOMk3nqP0xsMP7Wdac1rhAR2OcuRhkv+JHQBNrRgqqK2z0Y?= =?us-ascii?Q?Z7MVolzf3tmEPbBLz6ciWdxs+z1GiDD0jqAz0WqHeXiF9QM1a4633v29c3ML?= =?us-ascii?Q?dEeoglCzNcaQKv6t8M51FZryNFU+9Y75Ovp+xeS+6yBnst0FoOIXHG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+ImCDcVVJbcbcm6E4gkeuT+0ib+gJ4WNvM+CVUzCPLuM8B/V01mE40S8ASUTyzH3XMoB6wP15fejeXMhrBeiUGZBroHyoiyfq97ogw0+9Ry7zIFPKlWEmWUYsLGOy2IVMOjMHvOMWVffeMAgbMYfDPpQSpVAH69VdNnkm00CFPssVCJLgcPLxFuRFY8LgLcL3iJXlsbmTqeF6TX9a0IcXGnyDo4IbEZHh2+J//4WKsQs X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2018 09:02:29.1576 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f0cc7b6-544a-455e-d5c0-08d5e18cdff3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2636 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Align serial8250_get_divisor() with serial8250_set_divisor() to accept uart_port pointer as the first parameter. No functionality changes. Signed-off-by: Jisheng Zhang --- drivers/tty/serial/8250/8250_port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index cf541aab2bd0..709fe6b4265c 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -2498,11 +2498,11 @@ static unsigned int npcm_get_divisor(struct uart_8250_port *up, return DIV_ROUND_CLOSEST(port->uartclk, 16 * baud + 2) - 2; } -static unsigned int serial8250_get_divisor(struct uart_8250_port *up, +static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int baud, unsigned int *frac) { - struct uart_port *port = &up->port; + struct uart_8250_port *up = up_to_u8250p(port); unsigned int quot; /* @@ -2636,7 +2636,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, cval = serial8250_compute_lcr(up, termios->c_cflag); baud = serial8250_get_baud_rate(port, termios, old); - quot = serial8250_get_divisor(up, baud, &frac); + quot = serial8250_get_divisor(port, baud, &frac); /* * Ok, we're now changing the port state. Do it with @@ -3197,7 +3197,7 @@ static void serial8250_console_restore(struct uart_8250_port *up) termios.c_cflag = port->state->port.tty->termios.c_cflag; baud = serial8250_get_baud_rate(port, &termios, NULL); - quot = serial8250_get_divisor(up, baud, &frac); + quot = serial8250_get_divisor(port, baud, &frac); serial8250_set_divisor(port, baud, quot, frac); serial_port_out(port, UART_LCR, up->lcr); -- 2.18.0