From patchwork Thu Jan 12 03:25:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 135548 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 0AF65B6EFE for ; Thu, 12 Jan 2012 14:26:42 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RlBHw-0003HI-OU; Thu, 12 Jan 2012 03:25:16 +0000 Received: from mail-gy0-f177.google.com ([209.85.160.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RlBHu-0003H4-3F for linux-mtd@lists.infradead.org; Thu, 12 Jan 2012 03:25:14 +0000 Received: by ghbf1 with SMTP id f1so76559ghb.36 for ; Wed, 11 Jan 2012 19:25:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=vMvVkvAt5FjR10AlB9wIdHBzV7SjCS1/jlv2c1pXrUQ=; b=fr6I9oiqR5CId/RtbgqH0v00e6t6H7DYNQAoMdQc+e63Frzz3d3KpEsK+DBSKXkUE3 oJosi3JXKxYlWPQD1r6NCnvetO1oMmFl0ToBQe6WNmYjcJ9GZczd+6Vm6OR/3/W2QT+H PTU7u3l0lLo1X8wUBI6Q4HTRWOSSjrkU7+NH4= Received: by 10.236.182.170 with SMTP id o30mr2793330yhm.69.1326338711328; Wed, 11 Jan 2012 19:25:11 -0800 (PST) Received: from localhost.localdomain ([189.5.21.38]) by mx.google.com with ESMTPS id w28sm6084862yhi.21.2012.01.11.19.25.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jan 2012 19:25:10 -0800 (PST) From: Fabio Estevam To: linux-mtd@lists.infradead.org Subject: [PATCH] drivers: mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined Date: Thu, 12 Jan 2012 01:25:04 -0200 Message-Id: <1326338704-30199-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Fabio Estevam , artem.bityutskiy@linux.intel.com, dwmw2@infradead.org, Fabio Estevam 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: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Fix the following build warning: drivers/mtd/mtdcore.c: In function ‘mtd_release’: drivers/mtd/mtdcore.c:110: warning: unused variable ‘mtd’ This happens when neither CONFIG_MTD_CHAR nor CONFIG_MTD_CHAR_MODULE are defined. Signed-off-by: Fabio Estevam --- drivers/mtd/mtdcore.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 6ae9ca0..b265188 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -107,7 +107,7 @@ static LIST_HEAD(mtd_notifiers); */ static void mtd_release(struct device *dev) { - struct mtd_info *mtd = dev_get_drvdata(dev); + struct mtd_info __maybe_unused *mtd = dev_get_drvdata(dev); dev_t index = MTD_DEVT(mtd->index); /* remove /dev/mtdXro node if needed */