From patchwork Wed Jan 16 14:36:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 212537 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [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 B2E7D2C0094 for ; Thu, 17 Jan 2013 01:38:15 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TvU7P-0003Vs-7S; Wed, 16 Jan 2013 14:37:31 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TvU7G-0003T7-Qw for linux-mtd@lists.infradead.org; Wed, 16 Jan 2013 14:37:25 +0000 Received: from ukl by metis.ext.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1TvU7C-00017x-8T; Wed, 16 Jan 2013 15:37:19 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: linux-mtd@lists.infradead.org Date: Wed, 16 Jan 2013 15:36:56 +0100 Message-Id: <1358347016-507-2-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358347016-507-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1357835498-23904-1-git-send-email-u.kleine-koenig@pengutronix.de> <1358347016-507-1-git-send-email-u.kleine-koenig@pengutronix.de> In-Reply-To: <1357835498-23904-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1357835498-23904-1-git-send-email-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ukl@pengutronix.de X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on metis.extern.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=4.0 tests=BAYES_00,NO_RELAYS shortcircuit=no autolearn=ham version=3.3.2 Subject: [PATCH v4 2/2] mtd/uclinux: add a comment about why uclinux_ram_map must not be static X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:51:10 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) X-PTX-Original-Recipient: linux-mtd@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130116_093723_205658_9B87A051 X-CRM114-Status: GOOD ( 12.39 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Mike Frysinger , kernel@pengutronix.de, Greg Ungerer X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list 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 I was (at least) the second person trying to fix a warning by sparse, so document in the code why this is a bad idea and add an extern declaration to make sparse happy. Signed-off-by: Uwe Kleine-König Acked-by: Mike Frysinger Acked-by: Greg Ungerer --- No changes between v3 and v4. Changes since v2, id:1350027693-19528-2-git-send-email-u.kleine-koenig@pengutronix.de: - note in the commit log that an extern declaration was added for sparse Changes since v1: - new patch --- drivers/mtd/maps/uclinux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index f56d0aa..c1af83d 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c @@ -29,6 +29,12 @@ #define MAP_NAME "ram" #endif +/* + * Blackfin uses uclinux_ram_map during startup, so it must not be static. + * Provide a dummy declaration to make sparse happy. + */ +extern struct map_info uclinux_ram_map; + struct map_info uclinux_ram_map = { .name = MAP_NAME, .size = 0,