From patchwork Fri Feb 3 00:21:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 139256 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 1863C104792 for ; Fri, 3 Feb 2012 11:23:52 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Rt6ux-0003IK-PS; Fri, 03 Feb 2012 00:22:19 +0000 Received: from mail-pw0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Rt6uu-0003I6-SP for linux-mtd@lists.infradead.org; Fri, 03 Feb 2012 00:22:17 +0000 Received: by pbdx9 with SMTP id x9so2932476pbd.36 for ; Thu, 02 Feb 2012 16:22:14 -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=OOU6WLzZBrKkNZ4ihzDuVqZLlAsaAXKCt2FKvENwX9I=; b=qtssmF2JxFqYXh88ycoHJzDn0tEz4ybTEwZN7jo7oxK4vher85xRqZb2nPZVafFhoj LqGD0E5x8NpNOKkZf4NsA0Cqf87hD2UIOoSEbewCCsXOWgX9ThNpOYaYkAmYz4dl8XAU Y3QBhu0BqHyG7ZkQ2iPeRhbjuH1NsXyFc7IyY= Received: by 10.68.83.105 with SMTP id p9mr12329966pby.92.1328228534523; Thu, 02 Feb 2012 16:22:14 -0800 (PST) Received: from localhost.localdomain (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPS id t5sm9075317pbn.3.2012.02.02.16.22.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Feb 2012 16:22:13 -0800 (PST) From: Brian Norris To: Subject: [PATCH] jffs2: update to new MTD interface (missed a few) Date: Thu, 2 Feb 2012 16:21:09 -0800 Message-Id: <1328228469-10539-1-git-send-email-computersforpeace@gmail.com> X-Mailer: git-send-email 1.7.5.4 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.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (computersforpeace[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: Artem Bityutskiy , Linux Kernel , Randy Dunlap , linux-next@vger.kernel.org, Brian Norris , David Woodhouse 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 There were a few instances of the old MTD interface remaining for JFFS2. We fix one error that shows up (only when CONFIG_JFFS2_FS_WRITEBUFFER is not defined) like this: fs/jffs2/read.c: In function 'jffs2_read_dnode': fs/jffs2/read.c:36:8: error: 'struct mtd_info' has no member named 'read' fs/jffs2/read.c:112:8: error: 'struct mtd_info' has no member named 'read' ... We also simply remove two macros that are not in use, were not updated to the new MTD interface, and don't even utilize the old interface properly. (That means they weren't used since commit 8593fbc6, year 2006; almost 6 years ago, for those who don't want to do the math) Reported-by: Randy Dunlap Signed-off-by: Brian Norris Acked-by: Randy Dunlap --- This fixes some linux-next build errors seen by Randy Dunlap fs/jffs2/os-linux.h | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h index ab65ee3..1cd3aec 100644 --- a/fs/jffs2/os-linux.h +++ b/fs/jffs2/os-linux.h @@ -76,7 +76,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) #define jffs2_write_nand_cleanmarker(c,jeb) (-EIO) #define jffs2_flash_write(c, ofs, len, retlen, buf) jffs2_flash_direct_write(c, ofs, len, retlen, buf) -#define jffs2_flash_read(c, ofs, len, retlen, buf) ((c)->mtd->read((c)->mtd, ofs, len, retlen, buf)) +#define jffs2_flash_read(c, ofs, len, retlen, buf) (mtd_read((c)->mtd, ofs, len, retlen, buf)) #define jffs2_flush_wbuf_pad(c) ({ do{} while(0); (void)(c), 0; }) #define jffs2_flush_wbuf_gc(c, i) ({ do{} while(0); (void)(c), (void) i, 0; }) #define jffs2_write_nand_badblock(c,jeb,bad_offset) (1) @@ -108,8 +108,6 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH) -#define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf)) -#define jffs2_flash_read_oob(c, ofs, len, retlen, buf) ((c)->mtd->read_oob((c)->mtd, ofs, len, retlen, buf)) #define jffs2_wbuf_dirty(c) (!!(c)->wbuf_len) /* wbuf.c */