All of lore.kernel.org
 help / color / mirror / Atom feed
* in CVS: drivers/mtd/mtdchar.c:65: called object is not a function
@ 2003-11-04 22:35 Miernik
  2003-11-05 10:28 ` Miernik
  2003-11-05 10:37 ` Miernik
  0 siblings, 2 replies; 6+ messages in thread
From: Miernik @ 2003-11-04 22:35 UTC (permalink / raw)
  To: linux-mtd

I tried patching 2.6.0-test9 kernel with CVS code fetched today at ~ 
22:30 CET, and I ended with this:


  CC [M]  drivers/mtd/mtdcore.o
  CC [M]  drivers/mtd/mtdchar.o
drivers/mtd/mtdchar.c: In function `mtd_open':
drivers/mtd/mtdchar.c:65: called object is not a function
make[3]: *** [drivers/mtd/mtdchar.o] Error 1
make[2]: *** [drivers/mtd] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/usr/src/kernel-source-2.6.0-test9'
make: *** [stamp-build] Error 2


-- 
    Miernik         ________________________ jabber:miernik@amessage.info
___________________/__ tel: +48608233394 __/      mailto:miernik@ctnet.pl
Support impeaching the war criminalist George W. Bush
http://www.votetoimpeach.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: in CVS: drivers/mtd/mtdchar.c:65: called object is not a function
  2003-11-04 22:35 in CVS: drivers/mtd/mtdchar.c:65: called object is not a function Miernik
@ 2003-11-05 10:28 ` Miernik
  2003-11-05 10:37 ` Miernik
  1 sibling, 0 replies; 6+ messages in thread
From: Miernik @ 2003-11-05 10:28 UTC (permalink / raw)
  To: linux-mtd

On 2003-11-04, Miernik <miernik@ctnet.pl> wrote:
> I tried patching 2.6.0-test9 kernel with CVS code fetched today at ~ 
> 22:30 CET, and I ended with this:

After I took the original mtdchar.c from kernel-source, it compiled 
OK, but I got another problem:

  CC [M]  drivers/mtd/mtdchar.o
  CC [M]  drivers/mtd/mtdblock.o
  CC [M]  drivers/mtd/mtd_blkdevs.o
In file included from drivers/mtd/mtd_blkdevs.c:18:
include/linux/blk.h:1: warning: #warning this file is obsolete, please use <linux/blkdev.h> instead
drivers/mtd/mtd_blkdevs.c: In function `register_mtd_blktrans':
drivers/mtd/mtd_blkdevs.c:396: warning: passing arg 1 of `blk_init_queue' from incompatible pointer type
drivers/mtd/mtd_blkdevs.c:396: warning: passing arg 2 of `blk_init_queue' from incompatible pointer type
drivers/mtd/mtd_blkdevs.c:396: too many arguments to function `blk_init_queue'
make[3]: *** [drivers/mtd/mtd_blkdevs.o] Error 1
make[2]: *** [drivers/mtd] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/usr/src/kernel-source-2.6.0-test9'
make: *** [stamp-build] Error 2
miernik@debina:/usr/src/kernel-source-2.6.0-test9$

-- 
    Miernik         ________________________ jabber:miernik@amessage.info
___________________/__ tel: +48608233394 __/      mailto:miernik@ctnet.pl
Learn about crime done by George W. Bush in Iraq, and related to 9/11
http://www.whatreallyhappened.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: in CVS: drivers/mtd/mtdchar.c:65: called object is not a function
  2003-11-04 22:35 in CVS: drivers/mtd/mtdchar.c:65: called object is not a function Miernik
  2003-11-05 10:28 ` Miernik
@ 2003-11-05 10:37 ` Miernik
  2003-11-05 10:41   ` David Woodhouse
  2003-11-07  0:49   ` [PATCH] gets the current CVS MTD code to compile with 2.6.0-test9 Miernik
  1 sibling, 2 replies; 6+ messages in thread
From: Miernik @ 2003-11-05 10:37 UTC (permalink / raw)
  To: linux-mtd

On 2003-11-04, Miernik <miernik@ctnet.pl> wrote:
> I tried patching 2.6.0-test9 kernel with CVS code fetched today at ~ 
> 22:30 CET, and I ended with this:

And another problem: 

  CC [M]  drivers/mtd/chips/sharp.o
drivers/mtd/chips/sharp.c: In function `sharp_do_wait_for_ready':
drivers/mtd/chips/sharp.c:447: warning: comparison of distinct pointer types lacks a cast
  CC [M]  drivers/mtd/maps/map_funcs.o
  CC [M]  drivers/mtd/maps/pcmciamtd.o
drivers/mtd/maps/pcmciamtd.c: In function `pcmciamtd_event':
drivers/mtd/maps/pcmciamtd.c:724: structure has no member named `release'
drivers/mtd/maps/pcmciamtd.c: In function `pcmciamtd_detach':
drivers/mtd/maps/pcmciamtd.c:765: structure has no member named `release'
drivers/mtd/maps/pcmciamtd.c: In function `pcmciamtd_attach':
drivers/mtd/maps/pcmciamtd.c:804: structure has no member named `release'
drivers/mtd/maps/pcmciamtd.c:805: structure has no member named `release'
drivers/mtd/maps/pcmciamtd.c:806: structure has no member named `release'
make[4]: *** [drivers/mtd/maps/pcmciamtd.o] Error 1
make[3]: *** [drivers/mtd/maps] Error 2
make[2]: *** [drivers/mtd] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/usr/src/kernel-source-2.6.0-test9'
make: *** [stamp-build] Error 2
miernik@debina:/usr/src/kernel-source-2.6.0-test9$

-- 
    Miernik         ________________________ jabber:miernik@amessage.info
___________________/__ tel: +48608233394 __/      mailto:miernik@ctnet.pl
Sing a declaration against US invasion in Iraq:
http://www.moveon.org/declaration/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: in CVS: drivers/mtd/mtdchar.c:65: called object is not a function
  2003-11-05 10:37 ` Miernik
@ 2003-11-05 10:41   ` David Woodhouse
  2003-11-07  0:49   ` [PATCH] gets the current CVS MTD code to compile with 2.6.0-test9 Miernik
  1 sibling, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2003-11-05 10:41 UTC (permalink / raw)
  To: Miernik; +Cc: linux-mtd

On Wed, 2003-11-05 at 11:37 +0100, Miernik wrote:
> On 2003-11-04, Miernik <miernik@ctnet.pl> wrote:
> > I tried patching 2.6.0-test9 kernel with CVS code fetched today at ~ 
> > 22:30 CET, and I ended with this:
> 
> And another problem: 

I haven't been tracking changes in Linus' 2.6 tree recently. Some stuff
changed in Linus' tree since I last looked. Take a diff between what's
actually in 2.6, and the corresponding $Id$ tag from CVS... those are
the changes which need to be merged into the CVS tree.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] gets the current CVS MTD code to compile with 2.6.0-test9
  2003-11-05 10:37 ` Miernik
  2003-11-05 10:41   ` David Woodhouse
@ 2003-11-07  0:49   ` Miernik
  2003-11-07  9:53     ` David Woodhouse
  1 sibling, 1 reply; 6+ messages in thread
From: Miernik @ 2003-11-07  0:49 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

David Woodhouse wrote:

> I haven't been tracking changes in Linus' 2.6 tree recently. Some stuff
> changed in Linus' tree since I last looked. Take a diff between what's
> actually in 2.6, and the corresponding $Id$ tag from CVS... those are
> the changes which need to be merged into the CVS tree.

Here is a patch which makes the smallest set of changes needed to get 
current CVS code to compile with kernel 2.6.0-test9

I also place it on the web: 
http://www.miernik.ctnet.pl/mtd/mtd-miernik-20031107.diff

Authors of the three changed files: please take a look what I did with 
this, in case I'm destroying something you've meant to do.
If it's OK, please merge it into CVS. 

-- 
    Miernik         ________________________ jabber:miernik@amessage.info
___________________/__ tel: +48608233394 __/      mailto:miernik@ctnet.pl
Bush "won" 2000 elections with 537 Florida votes. More people where illegaly 
prevented to vote:  http://www.observer.co.uk/Print/0,3858,4103063,00.html 

[-- Attachment #2: mtd-miernik-20031107.diff --]
[-- Type: text/plain, Size: 3257 bytes --]

diff -Nur mtd.orig/drivers/mtd/maps/pcmciamtd.c mtd/drivers/mtd/maps/pcmciamtd.c
--- mtd.orig/drivers/mtd/maps/pcmciamtd.c	2003-06-24 09:14:38.000000000 +0200
+++ mtd/drivers/mtd/maps/pcmciamtd.c	2003-11-07 00:07:47.000000000 +0100
@@ -721,7 +721,7 @@
 				del_mtd_device(dev->mtd_info);
 				info("mtd%d: Removed", dev->mtd_info->index);
 			}
-			mod_timer(&link->release, jiffies + HZ/20);
+			pcmciamtd_release((u_long)link);
 		}
 		break;
 	case CS_EVENT_CARD_INSERTION:
@@ -762,8 +762,6 @@
 {
 	DEBUG(3, "link=0x%p", link);
 
-	del_timer(&link->release);
-
 	if(link->state & DEV_CONFIG) {
 		pcmciamtd_release((u_long)link);
 	}
@@ -801,10 +799,6 @@
 	link = &dev->link;
 	link->priv = dev;
 
-	init_timer(&link->release);
-	link->release.function = &pcmciamtd_release;
-	link->release.data = (u_long)link;
-
 	link->conf.Attributes = 0;
 	link->conf.IntType = INT_MEMORY;
 
diff -Nur mtd.orig/drivers/mtd/mtd_blkdevs.c mtd/drivers/mtd/mtd_blkdevs.c
--- mtd.orig/drivers/mtd/mtd_blkdevs.c	2003-09-08 13:37:23.000000000 +0200
+++ mtd/drivers/mtd/mtd_blkdevs.c	2003-11-07 00:16:43.000000000 +0100
@@ -33,7 +33,7 @@
 	struct completion thread_dead;
 	int exiting;
 	wait_queue_head_t thread_wq;
-	struct request_queue rq;
+	struct request_queue *rq;
 	spinlock_t queue_lock;
 };
 
@@ -79,7 +79,7 @@
 static int mtd_blktrans_thread(void *arg)
 {
 	struct mtd_blktrans_ops *tr = arg;
-	struct request_queue *rq = &tr->blkcore_priv->rq;
+	struct request_queue *rq = tr->blkcore_priv->rq;
 
 	/* we might get involved when memory gets low, so use PF_MEMALLOC */
 	current->flags |= PF_MEMALLOC;
@@ -301,7 +301,7 @@
 
 	gd->private_data = new;
 	new->blkcore_priv = gd;
-	gd->queue = &tr->blkcore_priv->rq;
+	gd->queue = tr->blkcore_priv->rq;
 
 	if (new->readonly)
 		set_disk_ro(gd, 1);
@@ -392,14 +392,20 @@
 	init_completion(&tr->blkcore_priv->thread_dead);
 	init_waitqueue_head(&tr->blkcore_priv->thread_wq);
 
-	blk_init_queue(&tr->blkcore_priv->rq, mtd_blktrans_request, 
-		       &tr->blkcore_priv->queue_lock);
-	tr->blkcore_priv->rq.queuedata = tr;
+	tr->blkcore_priv->rq = blk_init_queue(mtd_blktrans_request, &tr->blkcore_priv->queue_lock);
+	if (!tr->blkcore_priv->rq) {
+		unregister_blkdev(tr->major, tr->name);
+		kfree(tr->blkcore_priv);
+		up(&mtd_table_mutex);
+		return -ENOMEM;
+	}
+
+	tr->blkcore_priv->rq->queuedata = tr;
 
 	ret = kernel_thread(mtd_blktrans_thread, tr, 
 			    CLONE_FS|CLONE_FILES|CLONE_SIGHAND);
 	if (ret < 0) {
-		blk_cleanup_queue(&tr->blkcore_priv->rq);
+		blk_cleanup_queue(tr->blkcore_priv->rq);
 		unregister_blkdev(tr->major, tr->name);
 		kfree(tr->blkcore_priv);
 		up(&mtd_table_mutex);
@@ -441,7 +447,7 @@
 	}
 
 	devfs_remove(tr->name);
-	blk_cleanup_queue(&tr->blkcore_priv->rq);
+	blk_cleanup_queue(tr->blkcore_priv->rq);
 	unregister_blkdev(tr->major, tr->name);
 
 	up(&mtd_table_mutex);
diff -Nur mtd.orig/drivers/mtd/mtdchar.c mtd/drivers/mtd/mtdchar.c
--- mtd.orig/drivers/mtd/mtdchar.c	2003-05-21 12:50:43.000000000 +0200
+++ mtd/drivers/mtd/mtdchar.c	2003-11-07 00:07:47.000000000 +0100
@@ -62,7 +62,7 @@
 
 static int mtd_open(struct inode *inode, struct file *file)
 {
-	int minor = minor(inode->i_rdev);
+	int minor = iminor(inode);
 	int devnum = minor >> 1;
 	struct mtd_info *mtd;
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gets the current CVS MTD code to compile with 2.6.0-test9
  2003-11-07  0:49   ` [PATCH] gets the current CVS MTD code to compile with 2.6.0-test9 Miernik
@ 2003-11-07  9:53     ` David Woodhouse
  0 siblings, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2003-11-07  9:53 UTC (permalink / raw)
  To: Miernik; +Cc: linux-mtd

On Fri, 2003-11-07 at 01:49 +0100, Miernik wrote:
> Authors of the three changed files: please take a look what I did with 
> this, in case I'm destroying something you've meant to do.
> If it's OK, please merge it into CVS. 

Looks sane; I've committed all but pcmciamtd.c which you said on IRC you
were still working on.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-11-07  9:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-04 22:35 in CVS: drivers/mtd/mtdchar.c:65: called object is not a function Miernik
2003-11-05 10:28 ` Miernik
2003-11-05 10:37 ` Miernik
2003-11-05 10:41   ` David Woodhouse
2003-11-07  0:49   ` [PATCH] gets the current CVS MTD code to compile with 2.6.0-test9 Miernik
2003-11-07  9:53     ` David Woodhouse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.