From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266364AbUIMIgp (ORCPT ); Mon, 13 Sep 2004 04:36:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266427AbUIMIgp (ORCPT ); Mon, 13 Sep 2004 04:36:45 -0400 Received: from imladris.demon.co.uk ([193.237.130.41]:19722 "EHLO phoenix.infradead.org") by vger.kernel.org with ESMTP id S266364AbUIMIgn (ORCPT ); Mon, 13 Sep 2004 04:36:43 -0400 Date: Mon, 13 Sep 2004 09:36:28 +0100 From: Christoph Hellwig To: Benjamin Herrenschmidt Cc: Andrew Morton , Linus Torvalds , Linux Kernel list , Jeff Garzik Subject: Re: [PATCH] sata_svw: Fix __iomem related warnings Message-ID: <20040913093628.A24406@infradead.org> Mail-Followup-To: Christoph Hellwig , Benjamin Herrenschmidt , Andrew Morton , Linus Torvalds , Linux Kernel list , Jeff Garzik References: <1095049642.4536.256.camel@gaston> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <1095049642.4536.256.camel@gaston>; from benh@kernel.crashing.org on Mon, Sep 13, 2004 at 02:27:22PM +1000 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 13, 2004 at 02:27:22PM +1000, Benjamin Herrenschmidt wrote: > This patch adds some (ugly) casts to sata_svw to remove the > warnings generated by the new iomem stuff. Umm, maybe it's just me - but shouldn't you fix them properly? > > - writeb(tf->ctl, ioaddr->ctl_addr); > + writeb(tf->ctl, (void __iomem *)ioaddr->ctl_addr); e.g. ioaddr->ctl_addr should get a __iomem attribute > + writew(tf->feature | (((u16)tf->hob_feature) << 8), > + (void __iomem *)ioaddr->feature_addr); > + writew(tf->nsect | (((u16)tf->hob_nsect) << 8), > + (void __iomem *)ioaddr->nsect_addr); > + writew(tf->lbal | (((u16)tf->hob_lbal) << 8), > + (void __iomem *)ioaddr->lbal_addr); > + writew(tf->lbam | (((u16)tf->hob_lbam) << 8), > + (void __iomem *)ioaddr->lbam_addr); > + writew(tf->lbah | (((u16)tf->hob_lbah) << 8), > + (void __iomem *)ioaddr->lbah_addr); dito for all the others. just hacking around the annotations with casts seems ather pointless.