Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751332AbVI2XCV (ORCPT ); Thu, 29 Sep 2005 19:02:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751334AbVI2XCU (ORCPT ); Thu, 29 Sep 2005 19:02:20 -0400 Received: from mail.fh-wedel.de ([213.39.232.198]:41695 "EHLO moskovskaya.fh-wedel.de") by vger.kernel.org with ESMTP id S1751332AbVI2XCU (ORCPT ); Thu, 29 Sep 2005 19:02:20 -0400 Date: Fri, 30 Sep 2005 01:02:23 +0200 From: =?iso-8859-1?Q?J=F6rn?= Engel To: Linus Torvalds Cc: Deepak Saxena , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix IXP4xx MTD driver no cast warning Message-ID: <20050929230222.GA30887@wohnheim.fh-wedel.de> References: <20050929195205.GA30002@plexity.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1138 Lines: 30 On Thu, 29 September 2005 13:00:18 -0700, Linus Torvalds wrote: > On Thu, 29 Sep 2005, Deepak Saxena wrote: > > > > drivers/mtd/maps/ixp4xx.c: In function 'ixp4xx_flash_probe': > > drivers/mtd/maps/ixp4xx.c:199: warning: assignment makes integer from > > pointer without a cast > > Please don't. The warning is entirely warranted, as far as I can tell. > > Shutting up warnings just because they are warnings is bad practice. > Either fix them, or leave them be. > > If you do an "ioremap()", then the result is a "(void __iomem *)". If you > assign it to something that is "unsigned long", you _should_ get a > warning. Code is correct, as far as this specific mapping driver is concerned. But it would make some sense to convert one of the map_priv_[12] in struct map_info to (void __iomem *). J?rn -- It does not matter how slowly you go, so long as you do not stop. -- Confucius - 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/