From patchwork Tue Aug 21 08:54:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10826 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4B4C823E1B for ; Tue, 21 Aug 2012 08:56:20 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id EB1ABA1850E for ; Tue, 21 Aug 2012 08:56:11 +0000 (UTC) Received: by ghbg10 with SMTP id g10so5953504ghb.11 for ; Tue, 21 Aug 2012 01:56:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=z5A6vaUsS/3tJvSDz2tOeURqVJDvq3Je7eiXpsoctuY=; b=cjYZEZ5LtvAeBvK136pT3M2Pl7cXeIHIknhDJ/WIO2N440ec9tK9i4osBJVidYRQjt prwBpBoLkjfvb1svYYYuIxQa/nYMtjBwk7CBZylBH0t3Zb24WmAqUWZAbIfuV0WKDRcc m/t2n8MktxROTvnSrgerDuvaM3jU+pMXTaMneWhZIgb4tEK4FqAZ/ualgYQ2G9HZplOO wC++Xf8AjpRXrANmFu53MJ4RO5mfmsuRBjKPMZjwoIFmWv87TjxnnNsauay/husm+2oB FwPMN+LevCWyk/A/5HfopS+JBVl0cPtqKv/Vsth5nfbuV/wSRaASfILuJ9kvtSQdCUTH TlZg== Received: by 10.50.10.201 with SMTP id k9mr12702874igb.28.1345539378596; Tue, 21 Aug 2012 01:56:18 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp131875igc; Tue, 21 Aug 2012 01:56:18 -0700 (PDT) Received: by 10.68.219.226 with SMTP id pr2mr42122003pbc.1.1345539378048; Tue, 21 Aug 2012 01:56:18 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id px6si2148867pbc.64.2012.08.21.01.56.17 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 01:56:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f50.google.com with SMTP id md12so9064065pbc.37 for ; Tue, 21 Aug 2012 01:56:17 -0700 (PDT) Received: by 10.68.217.100 with SMTP id ox4mr42269684pbc.87.1345539377726; Tue, 21 Aug 2012 01:56:17 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id to6sm1054139pbc.12.2012.08.21.01.56.15 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Aug 2012 01:56:17 -0700 (PDT) From: Sachin Kamat To: linux-mtd@lists.infradead.org Cc: dedekind1@gmail.com, sachin.kamat@linaro.org, patches@linaro.org, dwmw2@infradead.org Subject: [PATCH 2/2] mtd: s3c2410: Fix compiler warnings Date: Tue, 21 Aug 2012 14:24:10 +0530 Message-Id: <1345539250-4509-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1345539250-4509-1-git-send-email-sachin.kamat@linaro.org> References: <1345539250-4509-1-git-send-email-sachin.kamat@linaro.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmThv264SFqimnUZc4BNFiINVOVwNVUu3cPlgp2z+2fdKcsN7T70wcdBAs6gctuMseqxQ5Z Fixes the following warnings: ‘s3c2410_nand_correct_data’ defined but not used [-Wunused-function] ‘s3c2410_nand_enable_hwecc’ defined but not used [-Wunused-function] ‘s3c2412_nand_enable_hwecc’ defined but not used [-Wunused-function] ‘s3c2440_nand_enable_hwecc’ defined but not used [-Wunused-function] ‘s3c2410_nand_calculate_ecc’ defined but not used [-Wunused-function] ‘s3c2412_nand_calculate_ecc’ defined but not used [-Wunused-function] ‘s3c2440_nand_calculate_ecc’ defined but not used [-Wunused-function] The above functions are called only when CONFIG_MTD_NAND_S3C2410_HWECC is defined. Thus making them conditional. Signed-off-by: Sachin Kamat --- drivers/mtd/nand/s3c2410.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index b8a556e..18e8046 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -442,6 +442,7 @@ static int s3c2412_nand_devready(struct mtd_info *mtd) /* ECC handling functions */ +#ifdef CONFIG_MTD_NAND_S3C2410_HWECC static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc) { @@ -596,6 +597,7 @@ static int s3c2440_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, return 0; } +#endif /* over-ride the standard functions for a little more speed. We can * use read/write block to move the data buffers to/from the controller