Commit adac72f4 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] [2.5 patch] fix the compilation of drivers_net_tokenring_tms380tr.c

[ Guys, assume this is OK? ]

From:  Adrian Bunk <bunk@fs.tum.de>

  Since 2.5.61 compilation of drivers/net/tokenring/tms380tr.c fails with
  the following error:

  <--  snip  -->

  ...
    gcc -Wp,-MD,drivers/net/tokenring/.tms380tr.o.d -D__KERNEL__ -Iinclude
  -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
  -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6
  -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include
  -DKBUILD_BASENAME=tms380tr -DKBUILD_MODNAME=tms380tr -c -o
  drivers/net/tokenring/tms380tr.o drivers/net/tokenring/tms380tr.c
  drivers/net/tokenring/tms380tr.c: In function `tms380tr_open':
  drivers/net/tokenring/tms380tr.c:260: invalid type argument of `->'
  drivers/net/tokenring/tms380tr.c:260: invalid type argument of `->'
  drivers/net/tokenring/tms380tr.c:260: invalid type argument of `->'
  drivers/net/tokenring/tms380tr.c:260: invalid type argument of `->'
  drivers/net/tokenring/tms380tr.c:260: invalid type argument of `->'
  drivers/net/tokenring/tms380tr.c:260: invalid type argument of `->'
  drivers/net/tokenring/tms380tr.c: In function `tms380tr_init_adapter':
  drivers/net/tokenring/tms380tr.c:1461: warning: long unsigned int format, different type arg (arg3)
  make[3]: *** [drivers/net/tokenring/tms380tr.o] Error 1

  <--  snip  -->


  The following patch by Jochen Friedrich fixes both the compile error and
  the warning:
parent cbb0da8e
......@@ -257,7 +257,7 @@ int tms380tr_open(struct net_device *dev)
int err;
/* init the spinlock */
spin_lock_init(tp->lock);
spin_lock_init(&tp->lock);
/* Reset the hardware here. Don't forget to set the station address. */
......@@ -1458,7 +1458,7 @@ static int tms380tr_init_adapter(struct net_device *dev)
if(tms380tr_debug > 3)
{
printk(KERN_DEBUG "%s: buffer (real): %lx\n", dev->name, (long) &tp->scb);
printk(KERN_DEBUG "%s: buffer (virt): %lx\n", dev->name, (long) ((char *)&tp->scb - (char *)tp) + tp->dmabuffer);
printk(KERN_DEBUG "%s: buffer (virt): %lx\n", dev->name, (long) ((char *)&tp->scb - (char *)tp) + (long) tp->dmabuffer);
printk(KERN_DEBUG "%s: buffer (DMA) : %lx\n", dev->name, (long) tp->dmabuffer);
printk(KERN_DEBUG "%s: buffer (tp) : %lx\n", dev->name, (long) tp);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment