2003-02-06 19:10:30

by Mark Haverkamp

[permalink] [raw]
Subject: [PATCH 2.5] fix megaraid driver compile error

This moves access of the host element to device since host has been
removed from struct scsi_cmnd.


===== drivers/scsi/megaraid.c 1.32 vs edited =====
--- 1.32/drivers/scsi/megaraid.c Fri Jan 3 10:58:49 2003
+++ edited/drivers/scsi/megaraid.c Thu Feb 6 10:18:43 2003
@@ -4515,7 +4515,7 @@
if(scsicmd == NULL) return -ENOMEM;

memset(scsicmd, 0, sizeof(Scsi_Cmnd));
- scsicmd->host = shpnt;
+ scsicmd->device->host = shpnt;

if( outlen || inlen ) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
@@ -4652,7 +4652,7 @@
if(scsicmd == NULL) return -ENOMEM;

memset(scsicmd, 0, sizeof(Scsi_Cmnd));
- scsicmd->host = shpnt;
+ scsicmd->device->host = shpnt;

if (outlen || inlen) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
--
Mark Haverkamp <[email protected]>


2003-02-06 19:15:10

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

On Thu, Feb 06, 2003 at 11:20:47AM -0800, Mark Haverkamp wrote:
> This moves access of the host element to device since host has been
> removed from struct scsi_cmnd.

Any reason we can't jump straight to the v2 driver instead of fixing
the now obsolete driver?

2003-02-06 19:49:45

by Matt Domsch

[permalink] [raw]
Subject: RE: [PATCH 2.5] fix megaraid driver compile error

> Any reason we can't jump straight to the v2 driver instead of fixing
> the now obsolete driver?

Atul told linux-megaraid-devel last week that there's at least one important
change to the ISR interaction with firmware that needs to be made, as well
as a broken SCSI RESERVATION_STATUS command. He is addressing these and
will submit a 2.00.3 driver soon (I hope).

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions http://www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

2003-02-06 19:58:24

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error


On 6 Feb 2003, Mark Haverkamp wrote:
>
> This moves access of the host element to device since host has been
> removed from struct scsi_cmnd.

This is whitespace-damaged.

Please fix broken mailers. I generally don't bother to fix up whitespace
damage from people who can't bother to have a good mailer. It's just not
worth it - if I try to fix it up (even if it is often trivial), it just
means that people will continue to send crap patches to me.

Linus

2003-02-06 20:29:42

by Mark Haverkamp

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

On Thu, 2003-02-06 at 12:04, Linus Torvalds wrote:
> On 6 Feb 2003, Mark Haverkamp wrote:
> >
> > This moves access of the host element to device since host has been
> > removed from struct scsi_cmnd.
>
> This is whitespace-damaged.
>
> Please fix broken mailers. I generally don't bother to fix up whitespace
> damage from people who can't bother to have a good mailer. It's just not
> worth it - if I try to fix it up (even if it is often trivial), it just
> means that people will continue to send crap patches to me.
>
> Linus

Sorry about the bad patch. Is an attached text file OK?


--
Mark Haverkamp <[email protected]>


Attachments:
megaraid.patch (654.00 B)

2003-02-06 20:53:29

by Steven Cole

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

On Thu, 2003-02-06 at 13:04, Linus Torvalds wrote:
>
> On 6 Feb 2003, Mark Haverkamp wrote:
> >
> > This moves access of the host element to device since host has been
> > removed from struct scsi_cmnd.
>
> This is whitespace-damaged.
>
> Please fix broken mailers. I generally don't bother to fix up whitespace
> damage from people who can't bother to have a good mailer. It's just not
> worth it - if I try to fix it up (even if it is often trivial), it just
> means that people will continue to send crap patches to me.
>
> Linus

In this case the issue is not a broken mailer, but rather the improper
use of a good one. Mark is using Evolution and so am I. It appears
that he did a cut and paste from an xterm (or something similar) which
converted the tabs to spaces.

For other Evolution users out there, a better way to send patches with
undamaged whitespace and not line-wrapped is to choose Insert and then
Inline Text File. This will send a Linus-compatible inlined (not
attached) patch.

Here is Mark's patch again, sent from Evolution, and not
whitespace-damaged:

Steven

--- linux-2.5.59/drivers/scsi/megaraid.c.orig Thu Feb 6 13:31:24 2003
+++ linux-2.5.59/drivers/scsi/megaraid.c Thu Feb 6 13:33:06 2003
@@ -4515,7 +4515,7 @@
if(scsicmd == NULL) return -ENOMEM;

memset(scsicmd, 0, sizeof(Scsi_Cmnd));
- scsicmd->host = shpnt;
+ scsicmd->device->host = shpnt;

if( outlen || inlen ) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
@@ -4652,7 +4652,7 @@
if(scsicmd == NULL) return -ENOMEM;

memset(scsicmd, 0, sizeof(Scsi_Cmnd));
- scsicmd->host = shpnt;
+ scsicmd->device->host = shpnt;

if (outlen || inlen) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)


2003-02-06 20:57:07

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error


On 6 Feb 2003, Steven Cole wrote:
>
> In this case the issue is not a broken mailer, but rather the improper
> use of a good one. Mark is using Evolution and so am I. It appears
> that he did a cut and paste from an xterm (or something similar) which
> converted the tabs to spaces.

Ahh, yes. That would also do it.

[ I'm also happy to hear that Evolution does it right these days, I have
this memory of it pruning whitespace at ends of lines by default like
some broken versions of pine also did. But maybe it was some other
graphical mail client. ]

Anyway, applied.

Linus

2003-02-06 21:06:37

by Mark Haverkamp

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

On Thu, 2003-02-06 at 13:00, Steven Cole wrote:
> On Thu, 2003-02-06 at 13:04, Linus Torvalds wrote:
> >
> > On 6 Feb 2003, Mark Haverkamp wrote:
> > >
> > > This moves access of the host element to device since host has been
> > > removed from struct scsi_cmnd.
> >
> > This is whitespace-damaged.
> >
> > Please fix broken mailers. I generally don't bother to fix up whitespace
> > damage from people who can't bother to have a good mailer. It's just not
> > worth it - if I try to fix it up (even if it is often trivial), it just
> > means that people will continue to send crap patches to me.
> >
> > Linus
>
> In this case the issue is not a broken mailer, but rather the improper
> use of a good one. Mark is using Evolution and so am I. It appears
> that he did a cut and paste from an xterm (or something similar) which
> converted the tabs to spaces.

You are correct. I wasn't thinking and did a cut/paste.

--
Mark Haverkamp <[email protected]>

2003-02-06 22:05:39

by Steven Cole

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

On Thu, 2003-02-06 at 14:02, Linus Torvalds wrote:
>
> On 6 Feb 2003, Steven Cole wrote:
> >
> > In this case the issue is not a broken mailer, but rather the improper
> > use of a good one. Mark is using Evolution and so am I. It appears
> > that he did a cut and paste from an xterm (or something similar) which
> > converted the tabs to spaces.
>
> Ahh, yes. That would also do it.
>
> [ I'm also happy to hear that Evolution does it right these days, I have
> this memory of it pruning whitespace at ends of lines by default like
> some broken versions of pine also did. But maybe it was some other
> graphical mail client. ]
>
> Anyway, applied.
>
> Linus

BTW, to save bandwidth and whitespace mishaps we could send patches as
scripts, just like Al Viro did once-upon-a-time.
http://marc.theaimsgroup.com/?l=linux-kernel&m=102669188302509&w=2

So, since this uses ex instead of vi ;), here is something to fix
the spelling of definite and separate throughout the tree.

Applied to plain 2.5.59, diffstat reports this for the 871-line diff:
63 files changed, 77 insertions(+), 77 deletions(-)

Steven

#!/bin/sh
find . -name "*" | xargs grep -l definat | awk '{print "ex - ",$1," -c \"%s/definat/definit/g|x\""}' | sh
find . -name "*" | xargs grep -l seperat | awk '{print "ex - ",$1," -c \"%s/seperat/separat/g|x\""}' | sh





2003-02-06 22:21:40

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error


On 6 Feb 2003, Steven Cole wrote:
>
> So, since this uses ex instead of vi ;), here is something to fix
> the spelling of definite and separate throughout the tree.

You've not tried this with a tree that has source control (either CVS, BK
or RCS) have you? It looks like it corrupts the SCM too.

I don't really mind getting scripts occasionally to do things, but they
had better be "obviously fool-proof" for it to really be worth-while.
Mostly it's easier to just get a diff, even if in this case the (broken)
script is just 3 lines, and the diff would likely be 700+ lines.

Linus

2003-02-06 23:02:33

by Steven Cole

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

On Thu, 2003-02-06 at 15:26, Linus Torvalds wrote:
>
> On 6 Feb 2003, Steven Cole wrote:
> >
> > So, since this uses ex instead of vi ;), here is something to fix
> > the spelling of definite and separate throughout the tree.
>
> You've not tried this with a tree that has source control (either CVS, BK
> or RCS) have you? It looks like it corrupts the SCM too.
>
> I don't really mind getting scripts occasionally to do things, but they
> had better be "obviously fool-proof" for it to really be worth-while.
> Mostly it's easier to just get a diff, even if in this case the (broken)
> script is just 3 lines, and the diff would likely be 700+ lines.
>
> Linus

I sent Linus an 880-line diff which fixed the spelling of definite and
separate in 2.5.59-bk2. Here is the diffstat output for that diff.

Steven

Documentation/SubmittingDrivers | 2 +-
Documentation/networking/bonding.txt | 4 ++--
Documentation/s390/s390dbf.txt | 2 +-
Documentation/scsi/ibmmca.txt | 4 ++--
Documentation/usb/hiddev.txt | 2 +-
arch/cris/lib/old_checksum.c | 2 +-
arch/m68k/atari/hades-pci.c | 2 +-
arch/m68k/math-emu/fp_decode.h | 4 ++--
arch/m68k/math-emu/fp_scan.S | 4 ++--
arch/parisc/kernel/irq.c | 2 +-
drivers/block/cpqarray.c | 2 +-
drivers/char/drm/i830_dma.c | 2 +-
drivers/char/ip2main.c | 2 +-
drivers/char/n_hdlc.c | 2 +-
drivers/char/rio/cmdpkt.h | 2 +-
drivers/char/synclink.c | 2 +-
drivers/ide/pci/pdc202xx_new.c | 2 +-
drivers/ide/pci/pdc202xx_old.c | 2 +-
drivers/isdn/hardware/eicon/io.h | 2 +-
drivers/media/video/zr36120.c | 2 +-
drivers/mtd/maps/elan-104nc.c | 2 +-
drivers/net/fealnx.c | 2 +-
drivers/net/hamachi.c | 2 +-
drivers/net/sis900.c | 2 +-
drivers/net/sk98lin/skgeinit.c | 2 +-
drivers/net/skfp/h/supern_2.h | 2 +-
drivers/net/skfp/smt.c | 2 +-
drivers/net/skfp/smtdef.c | 2 +-
drivers/net/tg3.c | 2 +-
drivers/net/tokenring/madgemc.c | 4 ++--
drivers/net/tokenring/smctr_firmware.h | 2 +-
drivers/net/tokenring/tmsisa.c | 2 +-
drivers/net/tokenring/tmspci.c | 2 +-
drivers/net/wan/lmc/lmc_ioctl.h | 2 +-
drivers/parisc/ccio-dma.c | 2 +-
drivers/parisc/ccio-rm-dma.c | 2 +-
drivers/parisc/sba_iommu.c | 2 +-
drivers/s390/char/sclp_tty.c | 6 +++---
drivers/s390/char/sclp_tty.h | 4 ++--
drivers/s390/char/tape_char.c | 2 +-
drivers/scsi/aacraid/aacraid.h | 4 ++--
drivers/scsi/aic7xxx_old.c | 2 +-
drivers/scsi/qla1280.c | 2 +-
drivers/scsi/qlogicfc.c | 2 +-
drivers/scsi/sim710.c | 4 ++--
drivers/usb/serial/usb-serial.c | 2 +-
drivers/video/riva/fbdev.c | 2 +-
drivers/video/skeletonfb.c | 4 ++--
fs/binfmt_elf.c | 2 +-
fs/binfmt_flat.c | 2 +-
fs/jfs/jfs_txnmgr.c | 2 +-
fs/nfs/nfs4proc.c | 4 ++--
fs/xfs/xfs_bmap.c | 2 +-
include/asm-ia64/sn/sv.h | 2 +-
include/asm-m68k/mac_psc.h | 2 +-
include/asm-mips/ng1hw.h | 2 +-
include/asm-sparc/ide.h | 2 +-
include/asm-sparc64/ide.h | 2 +-
net/8021q/vlan.h | 2 +-
sound/core/seq/seq_device.c | 2 +-
sound/oss/i810_audio.c | 6 +++---
sound/oss/trident.c | 2 +-
sound/pci/ali5451/ali5451.c | 4 ++--
63 files changed, 78 insertions(+), 78 deletions(-)

2003-02-06 23:10:07

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

On Thu, 2003-02-06 at 21:16, Mark Haverkamp wrote:
> On Thu, 2003-02-06 at 13:00, Steven Cole wrote:
> > In this case the issue is not a broken mailer, but rather the improper
> > use of a good one. Mark is using Evolution and so am I. It appears
> > that he did a cut and paste from an xterm (or something similar) which
> > converted the tabs to spaces.
>
> You are correct. I wasn't thinking and did a cut/paste.

Cut and paste from xterm should work fine. Cut and paste from
gnome-terminal, OTOH, will often corrupt it for you.

Bugzilla is --> that way :)

--
dwmw2

2003-02-06 23:16:57

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error


On 6 Feb 2003, David Woodhouse wrote:
>
> Cut and paste from xterm should work fine. Cut and paste from
> gnome-terminal, OTOH, will often corrupt it for you.

I think xterm does the same thing. I certainly refuse to use inferior
clones (I don't understand why people even _bother_ with things like
gnome-terminal, since it can't even do proper vt100 sequences), and I
definitely get tab->space conversion between two xterms.

Linus

2003-02-06 23:31:24

by Philippe Gramoullé

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

Hi,

Sorry, i posted the fix on Feb 4th, but i forgot
1) to include [PATCH] in the subject and 2) to send it to the
right person instead of just posting to LKML, as it's my first post :o)

The fix was attached as well and shouldn't have whitespace<->tab issue

Thanks,

Philippe

--
Philippe Gramoull?
[email protected]
Lycos Europe - NOC France


On Thu, 6 Feb 2003 12:04:15 -0800 (PST)
Linus Torvalds <[email protected]> wrote:


|
| On 6 Feb 2003, Mark Haverkamp wrote:
| >
| > This moves access of the host element to device since host has been
| > removed from struct scsi_cmnd.
|
| This is whitespace-damaged.
|
| Please fix broken mailers. I generally don't bother to fix up whitespace
| damage from people who can't bother to have a good mailer. It's just not
| worth it - if I try to fix it up (even if it is often trivial), it just
| means that people will continue to send crap patches to me.
|
| Linus
|
| -
| To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
| the body of a message to [email protected]
| More majordomo info at http://vger.kernel.org/majordomo-info.html
| Please read the FAQ at http://www.tux.org/lkml/
|

2003-02-07 08:35:36

by John Bradford

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

> > Cut and paste from xterm should work fine. Cut and paste from
> > gnome-terminal, OTOH, will often corrupt it for you.
>
> I think xterm does the same thing. I certainly refuse to use inferior
> clones (I don't understand why people even _bother_ with things like
> gnome-terminal, since it can't even do proper vt100 sequences), and I
> definitely get tab->space conversion between two xterms.

I get tab->space conversion with both xterm and rxvt.

Cut and paste from xemacs preserves tabs.

John.

2003-02-07 13:32:12

by Alan

[permalink] [raw]
Subject: Re: [PATCH 2.5] fix megaraid driver compile error

On Thu, 2003-02-06 at 23:22, Linus Torvalds wrote:
> On 6 Feb 2003, David Woodhouse wrote:
> >
> > Cut and paste from xterm should work fine. Cut and paste from
> > gnome-terminal, OTOH, will often corrupt it for you.
>
> I think xterm does the same thing. I certainly refuse to use inferior
> clones (I don't understand why people even _bother_ with things like
> gnome-terminal, since it can't even do proper vt100 sequences), and I
> definitely get tab->space conversion between two xterms.

gnome-terminal should be an exact copy of the xterm codes without the
tek graphics extensions. Roughly speaking thats vt220. If you know of
any it gets wrong please file a bug report.

It should also be preserving tabs (WORKKSFORME 8)). People with
replicable cases where it doesn't should stick them in gnome bugzilla.
https://bugzilla.gnome.org. Konsole should also have the same properties
as xterm with regard to these features.

Alan