public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org,
	tim@physik3.uni-rostock.de, linux-kernel@vger.kernel.org
Subject: [PATCH] nwflash: fix build errors and warning
Date: Sun, 27 Jul 2008 00:02:20 +0900	[thread overview]
Message-ID: <20080726150155.GA3562@localhost.localdomain> (raw)
In-Reply-To: <20080726141808.GB8871@flint.arm.linux.org.uk>

On Sat, Jul 26, 2008 at 03:18:08PM +0100, Russell King - ARM Linux wrote:
> On Fri, Jul 25, 2008 at 01:48:18AM -0700, akpm@linux-foundation.org wrote:
> > From: Akinobu Mita <akinobu.mita@gmail.com>
> > 
> > Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> > Cc: Russell King <linux@arm.linux.org.uk>
> > Cc: Tim Schmielau <tim@physik3.uni-rostock.de>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> 
> Argh...  Are people now submitting untested patches as a rule?
> 
> drivers/char/nwflash.c: In function 'flash_read':
> drivers/char/nwflash.c:129: error: 'p' undeclared (first use in this function)
> drivers/char/nwflash.c:129: error: (Each undeclared identifier is reported only once
> drivers/char/nwflash.c:129: error: for each function it appears in.)
> drivers/char/nwflash.c:129: error: 'count' undeclared (first use in this function)
> drivers/char/nwflash.c:136: warning: passing argument 4 of 'simple_read_from_buffer' discards qualifiers from pointer target type
> make[2]: *** [drivers/char/nwflash.o] Error 1
> make[1]: *** [drivers/char] Error 2
> make: *** [drivers] Error 2

Sorry. I'm preparing cross compiler. But this patch should fix this
problem.

From: Akinobu Mita <akinobu.mita@gmail.com>
Subject: nwflash: fix build errors and warning

The commit 6ee8928d94841aa764aeaf645ad16daff811dc26
(nwflash: use simple_read_from_buffer()) broke nwflash.

drivers/char/nwflash.c: In function 'flash_read':
drivers/char/nwflash.c:129: error: 'p' undeclared (first use in this function)
drivers/char/nwflash.c:129: error: (Each undeclared identifier is reported only once
drivers/char/nwflash.c:129: error: for each function it appears in.)
drivers/char/nwflash.c:129: error: 'count' undeclared (first use in this function)
drivers/char/nwflash.c:136: warning: passing argument 4 of 'simple_read_from_buffer' discards qualifiers from pointer target type
make[2]: *** [drivers/char/nwflash.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/char/nwflash.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: 2.6-mm/drivers/char/nwflash.c
===================================================================
--- 2.6-mm.orig/drivers/char/nwflash.c
+++ 2.6-mm/drivers/char/nwflash.c
@@ -126,14 +126,15 @@ static ssize_t flash_read(struct file *f
 
 	if (flashdebug)
 		printk(KERN_DEBUG "flash_read: flash_read: offset=0x%lX, "
-		       "buffer=%p, count=0x%X.\n", p, buf, count);
+		       "buffer=%p, count=0x%zX.\n", *ppos, buf, size);
 	/*
 	 * We now lock against reads and writes. --rmk
 	 */
 	if (mutex_lock_interruptible(&nwflash_mutex))
 		return -ERESTARTSYS;
 
-	ret = simple_read_from_buffer(buf, size, ppos, FLASH_BASE, gbFlashSize);
+	ret = simple_read_from_buffer(buf, size, ppos, (void *)FLASH_BASE,
+					gbFlashSize);
 	mutex_unlock(&nwflash_mutex);
 
 	return ret;

       reply	other threads:[~2008-07-26 15:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200807250848.m6P8mIWF001718@imap1.linux-foundation.org>
     [not found] ` <20080726141808.GB8871@flint.arm.linux.org.uk>
2008-07-26 15:02   ` Akinobu Mita [this message]
2008-07-26 15:32     ` [PATCH] nwflash: fix build errors and warning Russell King - ARM Linux
2008-07-26 16:10       ` Akinobu Mita
2008-07-26 15:52     ` Alan Cox
2008-07-26 16:26       ` Russell King - ARM Linux
2008-07-27 20:23       ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080726150155.GA3562@localhost.localdomain \
    --to=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tim@physik3.uni-rostock.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox