From patchwork Mon Sep 17 18:33:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 146858 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4099864ljw; Mon, 17 Sep 2018 11:34:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZdyyl2Lg24kqD1k04qfvZpq7TUN9nYeaQjPnSPCFHdezYznPnEVbFgNpGjzBcjMxUaiPE2 X-Received: by 2002:a17:902:9a06:: with SMTP id v6-v6mr26129057plp.316.1537209276202; Mon, 17 Sep 2018 11:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537209276; cv=none; d=google.com; s=arc-20160816; b=aZKvbZcZ33JjA/3Y+D+lCwT44VUVy8u4J+ChyXZq6P5ICx9xuhL4xgSenJt6Kkxl3M 4t+xkxkUZro18Fwp/SSbvblh5J1YbdX3KvBWx1aDnCxbf0e/111WqkaYptYj1fKMXDX9 NxWUpToaBYRu3kEi+3qg1DTrgzvVPGW82C/m65LQBQo0YxtlwEpd1iEVoAsINxbBjHck W65TbTquiDj2UX+VSnHo6+v0C3OWEDhBdASLVtd0YH1kb6rbswlrQj325plncO9zzY/B ZfktSWaMm91c9tvN92Ah8fU+mPCCX8x0oU0km9H91Ldgi0yjRGIn6rUb1JQp+RlFV5OH fEUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=B0zBpssfvxrtSCSyQbtyOm38bQlWUmZUf/lgu2ZUuu8=; b=xafUOTs//6bBxiUUioqXhUS7nywUvDpf1eisHU3RSMK6JzYZ3cAh+QoRtdHPiAn2sb 68yDr4DvskifskuWHMru5RYXm+jOXYxFFrKZcySOgD1HSjvd7vNACmdgCj4XLYcAOXVU K4VU4+lxk2pHyXiGl1OxWpZplrV9KYYRSIbZkifCYZIXM1K0j4oKsL3vsMsVIwPzAKb5 iiMd6ozfv/B7zfy3PQKxMUuYGd2rmgzBIJSxWGYqey5Kn70YS+FY8D1hQDlbo2poSTVT DjZqmPxS00xErJz/4gl6z0cQZFKwuFC5gStqVC1e8LUKUlBfUb7vQM29N2VccJNGX5O0 11IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gydhJQmQ; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10-v6si16221777pgg.315.2018.09.17.11.34.36; Mon, 17 Sep 2018 11:34:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-serial-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=@linaro.org header.s=google header.b=gydhJQmQ; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728299AbeIRADH (ORCPT + 2 others); Mon, 17 Sep 2018 20:03:07 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39724 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728382AbeIRADG (ORCPT ); Mon, 17 Sep 2018 20:03:06 -0400 Received: by mail-pg1-f196.google.com with SMTP id i190-v6so8075483pgc.6 for ; Mon, 17 Sep 2018 11:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=B0zBpssfvxrtSCSyQbtyOm38bQlWUmZUf/lgu2ZUuu8=; b=gydhJQmQB9w8ls3zQWkNha1rmmvVTOnARsOVMj4ZvhJhMzm9Xe/ArVavuZd74PwTxn Tm+dcT/GYyJlf8SzmUoXuHTBtkcLZrf8X5hTIbucDMWR5qhbRxAJd8YHWLBa3qt94Fpo RYC8jIw7x/VCC9WtLCVKC7n3Z3IXqSkbyO948= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=B0zBpssfvxrtSCSyQbtyOm38bQlWUmZUf/lgu2ZUuu8=; b=fkTKzPszZc/jggU5JRPFM1zyr+AUAC8UsePZWyDPv7ezQEFj1UmAIEO2UhcPr9y/Jh hNDK92thXr4cgIJAFS5JSCewII/5DJvhdtHnl00peUnC/5qEC0uzJ7x8mjhQLZodhoiZ b0One/xdazlfkQ33i2c3d2nv1zqq7T4CG9YenBB6EtRrS67R0A9c8z6jG/jsjt81CFnt fzO6RbMJ0JYVVe6b2/4R3+Tx95oaPT99rP2esrTslOBARFjAETRlE5eqmja2icxWt0hb LWy4KO10KCcq47Oj6EWMwXCXue3mr+euUgUhP03bcC0NZggwd5TJdQYS7YH43r89buaT X20g== X-Gm-Message-State: APzg51BIZLRrjjDroBVQDqx3CVWAsAfem2gRrF+Vm9SXIqQ5qECyZEOz dV4skStUnfK6ZRhWwa0ykE6wbQ== X-Received: by 2002:a62:47d1:: with SMTP id p78-v6mr27118912pfi.197.1537209273296; Mon, 17 Sep 2018 11:34:33 -0700 (PDT) Received: from ubuntu.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id i7-v6sm17544137pgs.17.2018.09.17.11.34.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Sep 2018 11:34:32 -0700 (PDT) From: Baolin Wang To: gregkh@linuxfoundation.org, jslaby@suse.com Cc: orsonzhai@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, broonie@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/5] serial: sprd: Change 'int' to 'unsigned int' Date: Mon, 17 Sep 2018 11:33:43 -0700 Message-Id: <7167a2917e6469e7d7a04fa4558f3486b8294722.1537208449.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <96e34fdadaf3f354f5d8e0d2895508e7c7918839.1537208449.git.baolin.wang@linaro.org> References: <96e34fdadaf3f354f5d8e0d2895508e7c7918839.1537208449.git.baolin.wang@linaro.org> In-Reply-To: <96e34fdadaf3f354f5d8e0d2895508e7c7918839.1537208449.git.baolin.wang@linaro.org> References: <96e34fdadaf3f354f5d8e0d2895508e7c7918839.1537208449.git.baolin.wang@linaro.org> Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org The register offset value should be 'unsigned int' type. Moreover, prefer 'unsigned int' to bare use of 'unsigned'. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang --- Changes from v1: - Add acked tag from Chunyan. --- drivers/tty/serial/sprd_serial.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 1.9.1 diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 03b0cd4..8d5c9cd 100644 --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -109,12 +109,14 @@ struct sprd_uart_port { static struct sprd_uart_port *sprd_port[UART_NR_MAX]; static int sprd_ports_num; -static inline unsigned int serial_in(struct uart_port *port, int offset) +static inline unsigned int serial_in(struct uart_port *port, + unsigned int offset) { return readl_relaxed(port->membase + offset); } -static inline void serial_out(struct uart_port *port, int offset, int value) +static inline void serial_out(struct uart_port *port, unsigned int offset, + int value) { writel_relaxed(value, port->membase + offset); } @@ -598,8 +600,7 @@ static void sprd_putc(struct uart_port *port, int c) writeb(c, port->membase + SPRD_TXD); } -static void sprd_early_write(struct console *con, const char *s, - unsigned n) +static void sprd_early_write(struct console *con, const char *s, unsigned int n) { struct earlycon_device *dev = con->data;