From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH v4 8/9] MIPS: SGI-IP27: fix readb/writeb addressing Date: Sun, 11 Aug 2019 09:29:07 +0200 Message-ID: <20190811072907.GA1416@kroah.com> References: <20190809103235.16338-1-tbogendoerfer@suse.de> <20190809103235.16338-9-tbogendoerfer@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Andy Shevchenko Cc: Thomas Bogendoerfer , Ralf Baechle , Paul Burton , James Hogan , Dmitry Torokhov , Lee Jones , "David S. Miller" , Srinivas Kandagatla , Alessandro Zummo , Alexandre Belloni , Jiri Slaby , Evgeniy Polyakov , linux-mips@vger.kernel.org, Linux Kernel Mailing List , linux-input , netdev , "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" , "open list:SERIAL DRIVERS" List-Id: linux-input@vger.kernel.org On Sat, Aug 10, 2019 at 04:22:23PM +0300, Andy Shevchenko wrote: > On Fri, Aug 9, 2019 at 1:34 PM Thomas Bogendoerfer > wrote: > > > > Our chosen byte swapping, which is what firmware already uses, is to > > do readl/writel by normal lw/sw intructions (data invariance). This > > also means we need to mangle addresses for u8 and u16 accesses. The > > mangling for 16bit has been done aready, but 8bit one was missing. > > Correcting this causes different addresses for accesses to the > > SuperIO and local bus of the IOC3 chip. This is fixed by changing > > byte order in ioc3 and m48rtc_rtc structs. > > > /* serial port register map */ > > struct ioc3_serialregs { > > - uint32_t sscr; > > - uint32_t stpir; > > - uint32_t stcir; > > - uint32_t srpir; > > - uint32_t srcir; > > - uint32_t srtr; > > - uint32_t shadow; > > + u32 sscr; > > + u32 stpir; > > + u32 stcir; > > + u32 srpir; > > + u32 srcir; > > + u32 srtr; > > + u32 shadow; > > }; > > Isn't it a churn? AFAIU kernel documentation the uint32_t is okay to > use, just be consistent inside one module / driver. > Am I mistaken? No, but really it uint* shouldn't be used anywhere in the kernel source as it does not make sense. thanks, greg k-h