Re: [Qemu-devel] [PATCH 09/15] scsi: move scsi request parsing into generic code.

2009-11-17 Thread Paul Brook
> > Why aren't you also using this function in scsi- disc.c? Surely that's the > > whole point of moving it into common code. > > Same as with the command move: next patch series will rework scsi-disk > to put the new fields and functions into use. Hmm, maybe you need to rethink your patch sequen

Re: [Qemu-devel] [PATCH 09/15] scsi: move scsi request parsing into generic code.

2009-11-17 Thread Gerd Hoffmann
On 11/17/09 13:27, Paul Brook wrote: On Tuesday 17 November 2009, Christoph Hellwig wrote: The subject is a bit confusing - it's not the full request parsing but just some helpers. This is a good example of a patch with an insufficient commit message. Given the way GIT treats the first line of

Re: [Qemu-devel] [PATCH 09/15] scsi: move scsi request parsing into generic code.

2009-11-17 Thread Paul Brook
On Tuesday 17 November 2009, Christoph Hellwig wrote: > The subject is a bit confusing - it's not the full request parsing but > just some helpers. This is a good example of a patch with an insufficient commit message. Given the way GIT treats the first line of the commit mesaage, my advice is to

Re: [Qemu-devel] [PATCH 09/15] scsi: move scsi request parsing into generic code.

2009-11-17 Thread Christoph Hellwig
The subject is a bit confusing - it's not the full request parsing but just some helpers. > +static int scsi_req_length(SCSIRequest *req, uint8_t *cmd) > +{ > +switch (cmd[0] >> 5) { I know qemu code tends to be very uncommented and the code this is lifted from too, but some comments on how t

[Qemu-devel] [PATCH 09/15] scsi: move scsi request parsing into generic code.

2009-11-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/scsi-bus.c | 164 + hw/scsi-generic.c | 156 -- hw/scsi.h |3 + 3 files changed, 191 insertions(+), 132 deletions(-) diff --git a/hw/scsi-bus