[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZSmgmw+//ymBHtfN@smile.fi.intel.com>
Date: Fri, 13 Oct 2023 22:55:07 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Hongren Zheng <i@...ithal.me>
Cc: Shuah Khan <shuah@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Valentina Manea <valentina.manea.m@...il.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
sfr@...b.auug.org.au
Subject: Re: [PATCH -next] usb/usbip: fix wrong data added to platform device
On Fri, Oct 13, 2023 at 06:52:09PM +0800, Hongren Zheng wrote:
> .data of platform_device_info will be copied into .platform_data of
> struct device via platform_device_add_data.
>
> However, vhcis[i] contains a spinlock, is dynamically allocated and
> used by other code, so it is not meant to be copied. The workaround
> was to use void *vhci as an agent, but it was removed in the commit
> suggested below.
>
> This patch adds back the workaround and changes the way of using
> platform_data accordingly.
Thanks for fixing this.
...
> - struct vhci *vhci = dev_get_platdata(hcd->self.controller);
> -
The blank line here is on purpose.
> + struct vhci *vhci = *((void **)dev_get_platdata(hcd->self.controller));
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists