[patch] 2.6.5-rc2: fix scsi_transport_spi.c with gcc 2.95

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 03/20/04

  • Next message: Andrea Arcangeli: "Re: CONFIG_PREEMPT and server workloads"
    Date:	Sat, 20 Mar 2004 13:18:54 +0100
    To: Linus Torvalds <torvalds@osdl.org>
    
    

    I got the following compile error in 2.6.5-rc2 using gcc 2.95:

    <-- snip -->

    ...
      CC drivers/scsi/scsi_transport_spi.o
    drivers/scsi/scsi_transport_spi.c: In function `spi_dv_retrain':
    drivers/scsi/scsi_transport_spi.c:388: parse error before `;'
    drivers/scsi/scsi_transport_spi.c:392: parse error before `;'
    drivers/scsi/scsi_transport_spi.c: In function `spi_dv_device_internal':
    drivers/scsi/scsi_transport_spi.c:463: parse error before `;'
    drivers/scsi/scsi_transport_spi.c:475: parse error before `;'
    drivers/scsi/scsi_transport_spi.c:494: parse error before `;'
    drivers/scsi/scsi_transport_spi.c: In function `spi_dv_device':
    drivers/scsi/scsi_transport_spi.c:539: parse error before `;'
    drivers/scsi/scsi_transport_spi.c:543: parse error before `;'
    make[2]: *** [drivers/scsi/scsi_transport_spi.o] Error 1

    <-- snip -->

    I found the patch below in -mm that fixes this problem.

    Please apply
    Adrian

    <-- snip -->

    Work around the gcc-2.95 token pasting bug.

    ---
     25-akpm/drivers/scsi/scsi_transport_spi.c |    2 +-
     1 files changed, 1 insertion(+), 1 deletion(-)
    diff -puN drivers/scsi/scsi_transport_spi.c~scsi_transport_spi-build-fix drivers/scsi/scsi_transport_spi.c
    --- 25/drivers/scsi/scsi_transport_spi.c~scsi_transport_spi-build-fix	2004-03-14 02:45:22.999909632 -0800
    +++ 25-akpm/drivers/scsi/scsi_transport_spi.c	2004-03-14 02:45:29.938854752 -0800
    @@ -33,7 +33,7 @@
     #include <scsi/scsi_transport.h>
     #include <scsi/scsi_transport_spi.h>
     
    -#define SPI_PRINTK(x, l, f, a...)	printk(l "scsi(%d:%d:%d:%d): " f, (x)->host->host_no, (x)->channel, (x)->id, (x)->lun, ##a)
    +#define SPI_PRINTK(x, l, f, a...)	printk(l "scsi(%d:%d:%d:%d): " f, (x)->host->host_no, (x)->channel, (x)->id, (x)->lun , ##a)
     
     static void transport_class_release(struct class_device *class_dev);
     
    _
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Andrea Arcangeli: "Re: CONFIG_PREEMPT and server workloads"

    Relevant Pages

    • Re: [PATCH 12/39] NLKD/i386 - time adjustment
      ... The patch includes code that seems to imply that gcc can not do mpy of variables. ... I really do not see the relavence of the run time library patches given the above. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [CFT] updated gcc-3.4.0 fixes patch for 2.4.27-pre1
      ... I propose fixing problems that will appear with gcc 3.5, ... Here is a patch for the few places I got hit at. ... pci_set_drvdata(pci_dev, dev); ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Firewire/SBP2 and the -mm tree (was: Re: 2.6.13-rc1-mm1)
      ... > Hi, Andrew. ... > fixes for the SBP2 problems that I was seeing, ... > things are equal regarding it, I need this patch for using Firewire on my ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 1/2] new valid_signal function (fwd)
      ... A while back I attempted to fix a little, not at all critical, gcc -W ... Below is the first patch that adds the new function. ... pointless and generates warnings when building with gcc -W. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] kprobes: dont steal interrupts from vm86
      ... > The patch below fixes this problem. ... The patch works, thanks. ... the removal race without checking an opcode ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)