Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sisfb: change register I/O functions to use fixed size types

Use fixed-sized types (u8, u16, u32) instead of plain C types.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

Aaro Koskinen and committed by
Paul Mundt
f48b9644 e68046b7

+32 -32
+21 -21
drivers/video/sis/init.c
··· 876 876 /*********************************************/ 877 877 878 878 void 879 - SiS_SetReg(SISIOADDRESS port, unsigned short index, unsigned short data) 879 + SiS_SetReg(SISIOADDRESS port, u8 index, u8 data) 880 880 { 881 - outb((u8)index, port); 882 - outb((u8)data, port + 1); 881 + outb(index, port); 882 + outb(data, port + 1); 883 883 } 884 884 885 885 void 886 - SiS_SetRegByte(SISIOADDRESS port, unsigned short data) 886 + SiS_SetRegByte(SISIOADDRESS port, u8 data) 887 887 { 888 - outb((u8)data, port); 888 + outb(data, port); 889 889 } 890 890 891 891 void 892 - SiS_SetRegShort(SISIOADDRESS port, unsigned short data) 892 + SiS_SetRegShort(SISIOADDRESS port, u16 data) 893 893 { 894 - outw((u16)data, port); 894 + outw(data, port); 895 895 } 896 896 897 897 void 898 - SiS_SetRegLong(SISIOADDRESS port, unsigned int data) 898 + SiS_SetRegLong(SISIOADDRESS port, u32 data) 899 899 { 900 - outl((u32)data, port); 900 + outl(data, port); 901 901 } 902 902 903 - unsigned char 904 - SiS_GetReg(SISIOADDRESS port, unsigned short index) 903 + u8 904 + SiS_GetReg(SISIOADDRESS port, u8 index) 905 905 { 906 - outb((u8)index, port); 906 + outb(index, port); 907 907 return inb(port + 1); 908 908 } 909 909 910 - unsigned char 910 + u8 911 911 SiS_GetRegByte(SISIOADDRESS port) 912 912 { 913 913 return inb(port); 914 914 } 915 915 916 - unsigned short 916 + u16 917 917 SiS_GetRegShort(SISIOADDRESS port) 918 918 { 919 919 return inw(port); 920 920 } 921 921 922 - unsigned int 922 + u32 923 923 SiS_GetRegLong(SISIOADDRESS port) 924 924 { 925 925 return inl(port); 926 926 } 927 927 928 928 void 929 - SiS_SetRegANDOR(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND, unsigned short DataOR) 929 + SiS_SetRegANDOR(SISIOADDRESS Port, u8 Index, u8 DataAND, u8 DataOR) 930 930 { 931 - unsigned short temp; 931 + u8 temp; 932 932 933 933 temp = SiS_GetReg(Port, Index); 934 934 temp = (temp & (DataAND)) | DataOR; ··· 936 936 } 937 937 938 938 void 939 - SiS_SetRegAND(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND) 939 + SiS_SetRegAND(SISIOADDRESS Port, u8 Index, u8 DataAND) 940 940 { 941 - unsigned short temp; 941 + u8 temp; 942 942 943 943 temp = SiS_GetReg(Port, Index); 944 944 temp &= DataAND; ··· 946 946 } 947 947 948 948 void 949 - SiS_SetRegOR(SISIOADDRESS Port, unsigned short Index, unsigned short DataOR) 949 + SiS_SetRegOR(SISIOADDRESS Port, u8 Index, u8 DataOR) 950 950 { 951 - unsigned short temp; 951 + u8 temp; 952 952 953 953 temp = SiS_GetReg(Port, Index); 954 954 temp |= DataOR;
+11 -11
drivers/video/sis/sis.h
··· 309 309 310 310 /* I/O port access macros and functions */ 311 311 312 - void SiS_SetReg(SISIOADDRESS, unsigned short, unsigned short); 313 - void SiS_SetRegByte(SISIOADDRESS, unsigned short); 314 - void SiS_SetRegShort(SISIOADDRESS, unsigned short); 315 - void SiS_SetRegLong(SISIOADDRESS, unsigned int); 316 - void SiS_SetRegANDOR(SISIOADDRESS, unsigned short, unsigned short, unsigned short); 317 - void SiS_SetRegAND(SISIOADDRESS, unsigned short, unsigned short); 318 - void SiS_SetRegOR(SISIOADDRESS, unsigned short, unsigned short); 319 - unsigned char SiS_GetReg(SISIOADDRESS, unsigned short); 320 - unsigned char SiS_GetRegByte(SISIOADDRESS); 321 - unsigned short SiS_GetRegShort(SISIOADDRESS); 322 - unsigned int SiS_GetRegLong(SISIOADDRESS); 312 + void SiS_SetReg(SISIOADDRESS, u8, u8); 313 + void SiS_SetRegByte(SISIOADDRESS, u8); 314 + void SiS_SetRegShort(SISIOADDRESS, u16); 315 + void SiS_SetRegLong(SISIOADDRESS, u32); 316 + void SiS_SetRegANDOR(SISIOADDRESS, u8, u8, u8); 317 + void SiS_SetRegAND(SISIOADDRESS, u8, u8); 318 + void SiS_SetRegOR(SISIOADDRESS, u8, u8); 319 + u8 SiS_GetReg(SISIOADDRESS, u8); 320 + u8 SiS_GetRegByte(SISIOADDRESS); 321 + u16 SiS_GetRegShort(SISIOADDRESS); 322 + u32 SiS_GetRegLong(SISIOADDRESS); 323 323 324 324 #define inSISREG(base) inb(base) 325 325