From patchwork Wed Jul 24 15:56:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 2832916 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8DBF3C0319 for ; Wed, 24 Jul 2013 15:57:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2A2E20412 for ; Wed, 24 Jul 2013 15:56:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 76AF920410 for ; Wed, 24 Jul 2013 15:56:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754020Ab3GXP4I (ORCPT ); Wed, 24 Jul 2013 11:56:08 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:58284 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754041Ab3GXP4E (ORCPT ); Wed, 24 Jul 2013 11:56:04 -0400 Received: by mail-pb0-f54.google.com with SMTP id ro2so9907353pbb.41 for ; Wed, 24 Jul 2013 08:56:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=Ulh9cvYJn/tkLlO+QdZwrBI4yE0iv9sa6hu9FI+M22A=; b=WodfuJhkYVI5Q0aRrl20giM3BHRSRUtjRveu5MdmMGeI9W7F9PweMPFGPLZaXlUj4T s9Ropq3rClasYf7eNKFXUPIFihLqhlKqbbbnGrDrx1PbtpcUzOggR9DqBGAMVaG1E9uT DI27NMHD+623rVuuB/5CxCVX2TXYNkdhWDNED09IrG23fXGvPvqXYO0M7eDYZPG+xsgB sCaQjFR+aAphBkqjHZ2f24ZAKJmr1lDmvISnkgnA7cQvFxrnNeacXIEZgIDziZImryyc +nXrk1v+cJePVGMW2jM7XRq8eDt8XRLHxI0m+z348a6B8U/HTF6f+XTxWDYyTdmq6wDA d1iQ== X-Received: by 10.66.253.100 with SMTP id zz4mr43502447pac.48.1374681363011; Wed, 24 Jul 2013 08:56:03 -0700 (PDT) Received: from brutus.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPSA id w8sm16469231paj.4.2013.07.24.08.56.01 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Jul 2013 08:56:02 -0700 (PDT) From: Olof Johansson To: Artem Bityutskiy Cc: Pekon Gupta , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, David Woodhouse , Olof Johansson Subject: [PATCH] mtd: nand: omap2: Fix compilation warning Date: Wed, 24 Jul 2013 08:56:32 -0700 Message-Id: <1374681392-6183-1-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQkwKjhzSRo4/Kyo7WKqt1FIjPEX1qQweqp8XuW++zQcGWvfYPKYRmgkA/DeI2bThkoATuWz Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fb1585bc13b (mtd: nand: omap2: clean-up BCHx_HW and BCHx_SW ECC configurations in device_probe) introduced a warning when the new option is disabled, i.e. with omap2plus_defconfig: drivers/mtd/nand/omap2.c:1075:13: warning: 'omap3_enable_hwecc_bch' defined but not used [-Wunused-function] Fix this by rescoping the ifdef. Also remove a redudant #endif/#ifdef pair. Signed-off-by: Olof Johansson --- drivers/mtd/nand/omap2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index c4c7e0d..cbf8b28 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1060,6 +1060,7 @@ static int omap_dev_ready(struct mtd_info *mtd) } } +#ifdef CONFIG_MTD_NAND_OMAP_BCH /** * omap3_enable_hwecc_bch - Program OMAP3 GPMC to perform BCH ECC correction * @mtd: MTD device structure @@ -1141,7 +1142,6 @@ static void omap3_enable_hwecc_bch(struct mtd_info *mtd, int mode) writel(ECCCLEAR | ECC1, info->reg.gpmc_ecc_control); } -#ifdef CONFIG_MTD_NAND_ECC_BCH /** * omap3_calculate_ecc_bch4 - Generate 7 bytes of ECC bytes * @mtd: MTD device structure @@ -1959,8 +1959,7 @@ static int omap_nand_probe(struct platform_device *pdev) omap_oobinfo.oobfree->offset = omap_oobinfo.eccpos[0] + omap_oobinfo.eccbytes; goto custom_ecc_layout; -#endif -#ifdef CONFIG_MTD_NAND_ECC_BCH + case OMAP_ECC_BCH8_CODE_HW_DETECTION_SW: pr_info("using OMAP_ECC_BCH8_CODE_HW_DETECTION_SW ECC\n"); info->nand.ecc.mode = NAND_ECC_HW;