Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp340444img; Thu, 21 Mar 2019 22:19:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHznG43PmbzFh6L5NtlWh/ibOerJzpvpCz1DZpsRxP1h9b4I4fVdNX2+3grvMkqn1jn3pe X-Received: by 2002:a17:902:1003:: with SMTP id b3mr7670196pla.306.1553231956302; Thu, 21 Mar 2019 22:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553231956; cv=none; d=google.com; s=arc-20160816; b=TW04XNx2Wyh9IVyC2lP0zmIqo/vg1EiUY6edq8EDZZh4fomZfddtHifkM7AG0iuK3H h4hdjW7NJiAoW1EBv9nWu4pJzbRzYDDKqHHnuAWi4/Ea6jVM7WDAk34GWTCMy56UnjM3 khRDkn0CpBu99YfSyy5dH5kNODGyQpNfJRqXbV60QMb6g7YZRXokggcHpw50OGqDqV71 FkcfjG7GH42KRw93hqbDuXgCMkN4n2UJCEkcHQN3a2j0M5riUOgMRFlfALNi2V+T2lAQ pF87N1Tb2Vuniy/a+azs2GO7q196hCjHGlUAY5ngfH78qP5C15M7+cmUT/PsJzh5iJm6 3r+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FpCTj9P+3/VHKq5EEwa1HZoqkUV0+kFj45DKgmQeqgk=; b=gQwqZi4KqOOh31IxS4EaZulcCeNXCq3aIkCnf30rT4AYSvPddz65XDprZ+VXpYF4Df XLskNuuHb5a1XxUcnxKxRenOnX3Eui37RMiN0vMEwf/z3KNpvB5XUJdzVR17ApJvoWWL Xb0vQbH4o6i3OhHdhJ+QyDcEHFFHZAZZUcmjWqFuNR2kaTACPSVimN/e3E4TIg+BlMqP Jgmkb3u/flUd3lFEziPj3mGLrdhVKxBffWNFxVtIapDsalq1AKptlDidzh5Q2yhTCiyK U/2pWI4w4cW2kKSwFsG0NaRfrepG7BfCzpGiQMOrlAmq8UtlGgY0cjH6faXDdDC3heHr NgZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tomli.me header.s=1490979754 header.b=k6y5ZOvq; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tomli.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10si5972172pgk.36.2019.03.21.22.19.01; Thu, 21 Mar 2019 22:19:16 -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=@tomli.me header.s=1490979754 header.b=k6y5ZOvq; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tomli.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727533AbfCVFSW (ORCPT + 99 others); Fri, 22 Mar 2019 01:18:22 -0400 Received: from tomli.me ([153.92.126.73]:58774 "EHLO tomli.me" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbfCVFSU (ORCPT ); Fri, 22 Mar 2019 01:18:20 -0400 Received: from tomli.me (localhost [127.0.0.1]) by tomli.me (OpenSMTPD) with ESMTP id bb710996; Fri, 22 Mar 2019 05:18:17 +0000 (UTC) X-HELO: localhost.lan Authentication-Results: tomli.me; auth=pass (login) smtp.auth=tomli Received: from Unknown (HELO localhost.lan) (2402:f000:1:1501:200:5efe:dddb:8cda) by tomli.me (qpsmtpd/0.95) with ESMTPSA (DHE-RSA-CHACHA20-POLY1305 encrypted); Fri, 22 Mar 2019 05:18:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tomli.me; h=from:to:cc:subject:date:message-id:in-reply-to:references:mime-version:content-transfer-encoding; s=1490979754; bh=7ltqg8+7zIPf/AJ9ObdCJj16r01sZ0GKTZoaxG1SW/Y=; b=k6y5ZOvqD5JbOq7Wk37InG7q3uDzKKUnMDf8M2W16sAZgdQXUxJvFbsnkO86hjqBrk1wMqyCziURXQbgqwu1qMEHdgtPyUx+HfNS7F6m1oTSKyk+H8XjSAEJPHFkXaPeLR162AVuHUw+zphFBXcqFxqYpXWCwNPWWD0nrUJXpagZIq7GnxdaL24Bh1ayJCk5r26N4wc0Wlg8GCLFfNXhI9+o54UfU3sryF/gdy669yU1emSDvEZET1YlHqiL8EQW3kTfKcJ/L8LMEz4ivGHDofEak11lHxGd/bAdA82hoq7jcoRiPvKunHyP+hWq7sgpy2LoVkAY1PA2pRt1n11miQ== From: Yifeng Li To: Sudip Mukherjee , Teddy Wang , linux-kernel@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Yifeng Li Subject: [PATCH v2 1/7] fbdev: sm712fb: use type "u8" for 8-bit I/O. Date: Fri, 22 Mar 2019 13:17:53 +0800 Message-Id: <20190322051759.15007-2-tomli@tomli.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322051759.15007-1-tomli@tomli.me> References: <20190322051759.15007-1-tomli@tomli.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit converts "unsigned int" and "int" in I/O wrappers to "u8". It improves readability since it's consistent with the prototypes of readb() and writeb(). More importantly, it reduces readers' confusion, since the upcoming 2D acceleration code will use a different wordsize. Signed-off-by: Yifeng Li --- drivers/video/fbdev/sm712.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/sm712.h b/drivers/video/fbdev/sm712.h index bb144f038267..89e446db2ac7 100644 --- a/drivers/video/fbdev/sm712.h +++ b/drivers/video/fbdev/sm712.h @@ -59,19 +59,19 @@ extern void __iomem *smtc_regbaseaddress; #define SIZE_CR30_CR4D (0x4D - 0x30 + 1) #define SIZE_CR90_CRA7 (0xA7 - 0x90 + 1) -static inline void smtc_crtcw(int reg, int val) +static inline void smtc_crtcw(u8 reg, u8 val) { smtc_mmiowb(reg, 0x3d4); smtc_mmiowb(val, 0x3d5); } -static inline void smtc_grphw(int reg, int val) +static inline void smtc_grphw(u8 reg, u8 val) { smtc_mmiowb(reg, 0x3ce); smtc_mmiowb(val, 0x3cf); } -static inline void smtc_attrw(int reg, int val) +static inline void smtc_attrw(u8 reg, u8 val) { smtc_mmiorb(0x3da); smtc_mmiowb(reg, 0x3c0); @@ -79,13 +79,13 @@ static inline void smtc_attrw(int reg, int val) smtc_mmiowb(val, 0x3c0); } -static inline void smtc_seqw(int reg, int val) +static inline void smtc_seqw(u8 reg, u8 val) { smtc_mmiowb(reg, 0x3c4); smtc_mmiowb(val, 0x3c5); } -static inline unsigned int smtc_seqr(int reg) +static inline u8 smtc_seqr(u8 reg) { smtc_mmiowb(reg, 0x3c4); return smtc_mmiorb(0x3c5); -- 2.20.1