Re: [PATCH] scsi: debug: fix type mismatch warning for sg_pcopy_from_buffer

Arnd Bergmann
2015-05-20T20:32:01Z

On Wednesday 20 May 2015 12:53:29 Andrew Morton wrote:
> On Tue, 19 May 2015 23:22:39 +0200 Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > I can't decide if this is actually a good idea, or if we should rather drop
> > the sg_pcopy_from_buffer() patch. Maybe someone else sees a better solution.
>
> Could make do_device_access() call sg_copy_buffer() directly.
>
> But yes, dropping the sg_pcopy_from/to_buffer changes is reasonable.
> sg_copy_buffer() is bidirectional and that won't be changing, so
> putting constified wrapeprs around it is kinda fake.

Ok. The part I only saw now is that do_device_access() is the only user
of sg_pcopy_from_buffer(), so if that passes a non-const argument,
there is dropping the patch will be teh best solution.

Arnd