From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268883AbUJKMel (ORCPT ); Mon, 11 Oct 2004 08:34:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268884AbUJKMeK (ORCPT ); Mon, 11 Oct 2004 08:34:10 -0400 Received: from ozlabs.org ([203.10.76.45]:40895 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S268894AbUJKMdI (ORCPT ); Mon, 11 Oct 2004 08:33:08 -0400 Date: Mon, 11 Oct 2004 22:32:17 +1000 From: David Gibson To: Jan Dittmer Cc: Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Message-ID: <20041011123217.GC28100@zax> Mail-Followup-To: David Gibson , Jan Dittmer , Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org References: <416A7484.1030703@portrix.net> <416A7CB3.9000003@portrix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <416A7CB3.9000003@portrix.net> User-Agent: Mutt/1.5.6+20040907i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 11, 2004 at 02:29:39PM +0200, Jan Dittmer wrote: > Cal Peake wrote: > >On Mon, 11 Oct 2004, Jan Dittmer wrote: > > > > > >>Cal Peake wrote: > >> > >> > >>> inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ > >>>- readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) > >>>+ readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) > >>>#define hermes_write_reg(hw, off, val) do { \ > >> > >>Isn't the correct fix to declare iobase as (void __iomem *) ? > > > > > >iobase is an unsigned long, declaring it as a void pointer is prolly not > >what we want to do here. The typecast seems proper. A lot of other drivers > >do this as well thus it must be proper ;-) > > Why is iobase a unsigned long in the first place? Isn't this broken for > 64bit archs? Um, no. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson