]> git.hungrycats.org Git - linux/commit
[PATCH] sg.c to warn about ambiguous data direction
authorJeremy Higdon <jeremy@sgi.com>
Fri, 10 Sep 2004 09:11:05 +0000 (05:11 -0400)
committerDave Jones <davej@delerium.codemonkey.org.uk>
Fri, 10 Sep 2004 09:11:05 +0000 (05:11 -0400)
commitdda8c33a051d3a53449ac7c2d467858e9b144655
treea3a730397d0341f8953f14a768ff8fc054e0048b
parentf4eeee8e3416cfaf64c7c74e79d0c21ba2917d02
[PATCH] sg.c to warn about ambiguous data direction

On Sat, Aug 28, 2004 at 02:39:45AM -0700, Jeremy Higdon wrote:
> > Jeremy,
> > You could use a (block scope) static and only print out
> > the warning the first time it is detected.
> >
> > Doug Gilbert
>
> Yes, that's a good idea -- I'll add a rate limiter and also print
> out the process name like James does in his recent deprecated
> ioctl warning patch.  I'll send a new patch out later this weekend.
> Sorry for the churn.
>
> thanks
>
> jeremy

Okay, I'm pretty happy with this.  I get this kind of output:

sg_write: data in/out 512/512 bytes for SCSI command 0x8--guessing data in;
   program java not setting count and/or reply_len properly
printk: 11 messages suppressed.
sg_write: data in/out 512/512 bytes for SCSI command 0x8--guessing data in;
   program java not setting count and/or reply_len properly
printk: 4 messages suppressed.

signed-off-by: jeremy@sgi.com
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/sg.c