Zitat von Greg KH <gre...@linuxfoundation.org>:

On Tue, Jul 24, 2018 at 11:05:29AM +0200, Guido Kiener wrote:
+struct usbtmc_ctrlrequest {
+       struct usbtmc_request req;
+       __u64 data; /* pointer to user space */
+} __attribute__ ((packed));

Hint, this structure could just be:
        struct usbtmc_ctrlreqest {
                struct usbtmc_request req;
                __u8 data[0];
        } __attribute__((__aligned__(8)));

No more pointer mess anymore, right?

Yes. But we prefer copy by reference and not by value.
Especially for the next USBTMC_IOCTL_WRITE/READ function,
we want to copy many bytes (MB and GB) by reference.
I had a lengthy discussion with many developers,
and we prefer pointer mess before we loose any microsecond.

Regards,

Guido



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to