From patchwork Tue Sep 18 13:32:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 184714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2234C2C007D for ; Tue, 18 Sep 2012 23:28:56 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TDxps-0002Td-Ij; Tue, 18 Sep 2012 13:27:32 +0000 Received: from mga09.intel.com ([134.134.136.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TDxpq-0002T9-4F for linux-mtd@lists.infradead.org; Tue, 18 Sep 2012 13:27:30 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 18 Sep 2012 06:27:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,442,1344236400"; d="asc'?scan'208";a="194364469" Received: from linux.jf.intel.com (HELO linux.intel.com) ([10.23.219.25]) by orsmga001.jf.intel.com with ESMTP; 18 Sep 2012 06:27:27 -0700 Received: from [10.237.72.96] (sauron.fi.intel.com [10.237.72.96]) by linux.intel.com (Postfix) with ESMTP id A7B932C8001; Tue, 18 Sep 2012 06:27:27 -0700 (PDT) Message-ID: <1347975164.7112.63.camel@sauron.fi.intel.com> Subject: Re: [PATCH V3] mtd: basic (read only) driver for BCMA serial flash From: Artem Bityutskiy To: =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= Date: Tue, 18 Sep 2012 16:32:44 +0300 In-Reply-To: <1347875449-19318-1-git-send-email-zajec5@gmail.com> References: <1347875449-19318-1-git-send-email-zajec5@gmail.com> X-Mailer: Evolution 3.4.4 (3.4.4-1.fc17) Mime-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dedekind1[at]gmail.com) -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [134.134.136.24 listed in list.dnswl.org] 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.8 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (dedekind1[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FSL_FREEMAIL_2 FSL_FREEMAIL_2 0.0 FSL_FREEMAIL_1 FSL_FREEMAIL_1 0.9 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list Cc: linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Mon, 2012-09-17 at 11:50 +0200, Rafał Miłecki wrote: > This registers MTD driver for serial flash platform device. Right now it > supports reading only, writing still has to be implemented. > > Signed-off-by: Rafał Miłecki > --- > V2: fix mem leak (add failure path in init) > signed-off-by > V3: drop BROKEN > drop useless check in bcm47xxsflash_remove > marm flash memory as ROM (until we implement writing) Aiaiai complained: --- before_patching.log +++ after_patching.log @@ @@ +drivers/mtd/devices/bcm47xxsflash.c:30:30: warning: incorrect type in argument 1 (different address spaces) [sparse] +drivers/mtd/devices/bcm47xxsflash.c:30:30: expected void const volatile [noderef] *mem [sparse] +drivers/mtd/devices/bcm47xxsflash.c:30:30: got unsigned char [usertype] *src [sparse] +drivers/mtd/devices/bcm47xxsflash.c:37:38: warning: incorrect type in argument 1 (different address spaces) [sparse] +drivers/mtd/devices/bcm47xxsflash.c:37:38: expected void const volatile [noderef] *mem [sparse] +drivers/mtd/devices/bcm47xxsflash.c:37:38: got unsigned int [usertype] * [sparse] +drivers/mtd/devices/bcm47xxsflash.c:43:30: warning: incorrect type in argument 1 (different address spaces) [sparse] +drivers/mtd/devices/bcm47xxsflash.c:43:30: expected void const volatile [noderef] *mem [sparse] +drivers/mtd/devices/bcm47xxsflash.c:43:30: got unsigned char [usertype] *[assigned] src [sparse] I pushed your patch to l2-mtd.git with these changes: diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c index f711a51..a328872 100644 --- a/drivers/mtd/devices/bcm47xxsflash.c +++ b/drivers/mtd/devices/bcm47xxsflash.c @@ -15,7 +15,7 @@ static int bcm47xxsflash_read(struct mtd_info *mtd, loff_t from, size_t len, { struct bcma_sflash *sflash = mtd->priv; size_t bytes_read = 0; - u8 *src = (u8 *)KSEG0ADDR(sflash->window + from); + __iomem u8 *src = (__iomem u8 *)KSEG0ADDR(sflash->window + from); int i; size_t unaligned_before, unaligned_after; @@ -34,7 +34,7 @@ static int bcm47xxsflash_read(struct mtd_info *mtd, loff_t from, size_t len, } for (i = from - unaligned_before; i < from + len - unaligned_after; i += 4) { - *(u32 *)buf = readl((u32 *)src); + *(u32 *)buf = readl(src); buf += 4; src += 4; bytes_read += 4;