Hi Shimoda-san, On Wed, Aug 28, 2019 at 6:05 AM Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> wrote: > > From: Geert Uytterhoeven, Sent: Tuesday, August 27, 2019 9:36 PM > > On Tue, Aug 27, 2019 at 12:05 PM Yoshihiro Shimoda > > <yoshihiro.shimoda.uh@xxxxxxxxxxx> wrote: > > > To simplify adding xhci->quirks instead of the .init_quirk() > > > function, this patch adds a new parameter "quirks" into > > > the struct xhci_plat_priv. > > > > > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> > > > > Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > > Thank you for your review! > > > > --- a/drivers/usb/host/xhci-plat.h > > > +++ b/drivers/usb/host/xhci-plat.h > > > @@ -12,10 +12,12 @@ > > > > > > struct xhci_plat_priv { > > > const char *firmware_name; > > > + unsigned long long quirks; > > > void (*plat_start)(struct usb_hcd *); > > > int (*init_quirk)(struct usb_hcd *); > > > int (*resume_quirk)(struct usb_hcd *); > > > }; > > > > > > #define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv) > > > +#define xhci_to_priv(x) ((struct xhci_plat_priv *)(x)->priv) > > > > Just wondering: is x->priv guaranteed to be of type struct xhci_plat_priv *, > > also in the future? > > > > struct xhci_hcd { > > ... > > unsigned long priv[0] __aligned(sizeof(s64)); > > It seems so. But, I'm not sure that we can change type of the priv[0] to > struct xhci_plat_priv *, because this implementation is related to all usb_hcd drivers: > > < Details if you are interested in :) > Thank you! Not being familiar with the usb and xhci subsystem, I couldn't find where it was used/allocated, hence my question. This confirms it's always of type struct xhci_plat_priv * iff when dealing with the xhci-plat driver. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds