Re: [PATCH] scatterlist fallout: drivers/scsi/arm/

Jens Axboe
2007-10-29T09:38:56Z

On Mon, Oct 29 2007, Al Viro wrote:
> On Mon, Oct 29, 2007 at 10:12:06AM +0100, Jens Axboe wrote:
> > > > Russell, will you be merging this yourself or do you want me to include
> > > > it in the sg fixup branch?
> > >
> > > It's already merged into the ARM git tree as of Friday. Waiting for
> > > ack's from various people for other merged patches before sending the
> > > set to Linus.
> >
> > Great, thanks.
>
> Speaking of sg fixups... What should be done about zfcp_address_to_sg()?
> You've added the third argument to all calls, but not to definition...
>
> static inline void
> zfcp_address_to_sg(void *address, struct scatterlist *list, size_t size)
> {
> sg_set_buf(list, address, size);
> }
> seems to be a plausible guess at what you meant to do, but that's a guess
> without anything to back it - I really have not looked into the area at all.

Should already be fixed up in the 'sg' branch, like this:

diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 0754542..e268f79 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -70,11 +70,12 @@ zfcp_sg_to_address(struct scatterlist *list)
* zfcp_address_to_sg - set up struct scatterlist from kernel address
* @address: kernel address
* @list: struct scatterlist
+ * @size: buffer size
*/
static inline void
-zfcp_address_to_sg(void *address, struct scatterlist *list)
+zfcp_address_to_sg(void *address, struct scatterlist *list, unsigned int size)
{
- sg_set_buf(list, address, 0);
+ sg_set_buf(list, address, size);
}

#define REQUEST_LIST_SIZE 128

--
Jens Axboe