Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp1355223ima; Fri, 1 Feb 2019 22:24:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN58m6IxgGFRM6Ye0PNXYD39nMdo5DOUb3EXbaFyINSowBbQuHsAtbIcQwGSOq5yqb9+T9Xc X-Received: by 2002:a62:44d8:: with SMTP id m85mr43059601pfi.164.1549088676096; Fri, 01 Feb 2019 22:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549088676; cv=none; d=google.com; s=arc-20160816; b=r9kBrkXpxdO8mmyzGctgEM/tgm11FsWxNkfi4qtbE7U1jPTPd+VSxlUEcrxxKoQ9hJ 5uLL/R5fMvV6oCw/4udGnPAEtCyW0ALwZTKrkXA2jSAn7eEcIJOxJOGdR5rSQUZhv6e9 jj3OuVeHaiSPqNleps9wwkh2h2v+WC5onk8vemyGy66odT9Gvf2QNrtx1S38ppQqtBj3 jI2BB2dMyDV/xUO783nI1QrqZXCyWY3n5w5vFbBHoUhByWFR1jeRU2rCDoG35ic7Ztm1 bg+i3Y3S6iBhfRvpDXih+iImpmr6MnIwOBk8p1xGZWcXbBiwqaaFrrkTvxaD/qJL/NTN ECIQ== 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=fvkta5Cinxda7iFnd+/vieb4z6ewDyIBytjrepByHWQ=; b=yNseBqW08dVpa4DOrGc8yAIIAG8Ow8muXNVqnfvEs+En2dxdRfqTs6Wvl+Q1y3g977 Q97KtjA6ws1K2B04ZnM1rrv8f0Vl8fd/NgKz3VN4HiMHd9qk6BslF4cftGO+U+V8br/4 aBbJ1+QGoPBvYRNGjpIfoO6shkfkLJ6sAPgJo6fgir7TTB8feLEEFNtTJy1g2DEFoH9X X3CSpyJyaoH3nCVVSzHhgXhATVdFtvl+ad9sny+tga0JUS6qwDnXww7jdsCR4tWdQdj6 tzf8aeRTZh99XdNMfvMW3lFfp7un2oMNh2fJUD/naMOVKRZcUpMVst469icT3JXELQLh Oy3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tomli.me header.s=1490979754 header.b=jyFdyIc7; 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 l7si1724353pgk.169.2019.02.01.22.24.20; Fri, 01 Feb 2019 22:24:36 -0800 (PST) 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=jyFdyIc7; 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 S1727630AbfBBGYB (ORCPT + 99 others); Sat, 2 Feb 2019 01:24:01 -0500 Received: from tomli.me ([153.92.126.73]:45102 "EHLO tomli.me" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726011AbfBBGYA (ORCPT ); Sat, 2 Feb 2019 01:24:00 -0500 X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Sat, 02 Feb 2019 01:23:43 EST Received: from tomli.me (localhost [127.0.0.1]) by tomli.me (OpenSMTPD) with ESMTP id 60300660; Sat, 2 Feb 2019 06:17:18 +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:7b76:77ab) by tomli.me (qpsmtpd/0.95) with ESMTPSA (DHE-RSA-CHACHA20-POLY1305 encrypted); Sat, 02 Feb 2019 06:17: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=sEFDZFlfDqKnYMQYk7vg5Y9I18fK+Xt8XdV3FTX5+0M=; b=jyFdyIc7VKf6ekP38FjjcyNFO7ZNH0+csscqp/3jG+SBtjegsYccFgnZH5S3WEevLZJO5XajWkAoi7eyBS+8ulq+MtSEyG+BIilpkThywIHMHqyXzGtd85/lTEDP+3/J6vZK8tHS8exdNdbj15ZCgPZ3xyHhIg8Zhurcafi4RClOfSo8EPjlwovcLaYL6L0ckyAf3yzlc2E3l4U5aNpsHvLeh0IRFNlySpgmDSFQB4JgBkBWJe34ssg9NqWBPLVnhksYj+Jj/rs79KknEEu5f235FxzPCNcHmbuSHmKq1JCad3pyK7IPB70tOSmNs0rDnrCA+useqMKnYQ6Rp2wt0A== From: Yifeng Li To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Yifeng Li , Sudip Mukherjee , Teddy Wang , Bartlomiej Zolnierkiewicz Subject: [PATCH 2/8] fbdev: sm712fb: use type "u8" for 8-bit I/O. Date: Sat, 2 Feb 2019 14:16:42 +0800 Message-Id: <20190202061648.30374-3-tomli@tomli.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190202061648.30374-1-tomli@tomli.me> References: <20190202061648.30374-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 99077e91ae10..942019dc816a 100644 --- a/drivers/video/fbdev/sm712.h +++ b/drivers/video/fbdev/sm712.h @@ -63,19 +63,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); @@ -83,13 +83,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