Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267334AbUIOTe6 (ORCPT ); Wed, 15 Sep 2004 15:34:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267335AbUIOTe5 (ORCPT ); Wed, 15 Sep 2004 15:34:57 -0400 Received: from mail.kroah.org ([69.55.234.183]:7554 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S267334AbUIOTey (ORCPT ); Wed, 15 Sep 2004 15:34:54 -0400 Date: Wed, 15 Sep 2004 12:34:14 -0700 From: Greg KH To: Linus Torvalds Cc: J?rn Engel , Kernel Mailing List Subject: Re: Being more anal about iospace accesses.. Message-ID: <20040915193414.GA24131@kroah.com> References: <20040915165450.GD6158@wohnheim.fh-wedel.de> <20040915173236.GE6158@wohnheim.fh-wedel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 30 On Wed, Sep 15, 2004 at 10:57:25AM -0700, Linus Torvalds wrote: > > So you can absolutely still continue with > > struct mydev_iolayout { > __u32 status; > __u32 irqmask; > ... > > struct mydev_iolayout __iomem *regs = pci_map(...); > status = ioread32(®s.status); > > which is often a lot more readable, and thus in fact _preferred_. It also > adds another level of type-checking, so I applaud drivers that do this. Currently a few drivers do: status = readl(®s.status); which causes sparse warnings. How should that code be changed to prevent this? Convert them all to ioread32()? Or figure out a way to supress the warning for readl()? thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/