From: Marek Vasut Date: Mon, 18 Jun 2018 03:14:58 +0200 Subject: [U-Boot] [PATCH] usb: sunxi: ohci: make ohci_t the first member in private data In-Reply-To: <20180617161342.19228-1-anarsoul@gmail.com> References: <20180617161342.19228-1-anarsoul@gmail.com> Message-ID: <082e3114-8207-4137-e59f-71956bf4d0d9@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/17/2018 06:13 PM, Vasily Khoruzhick wrote: > ohci-hcd casts priv_data pointer to (ohci_t *), thus it must be > the first member in private data struct. > > Fixes 831cc98b1 ("usb: sunxi: Simplify ccm reg base code") > > Signed-off-by: Vasily Khoruzhick Sigh, I really wonder how (or if at all!) the original series was tested. And then I get flak for scrutinizing patches, right ... Thanks for the fix, applied. > --- > drivers/usb/host/ohci-sunxi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ohci-sunxi.c b/drivers/usb/host/ohci-sunxi.c > index e13f6ec9a4..db6f438275 100644 > --- a/drivers/usb/host/ohci-sunxi.c > +++ b/drivers/usb/host/ohci-sunxi.c > @@ -33,9 +33,9 @@ struct ohci_sunxi_cfg { > }; > > struct ohci_sunxi_priv { > + ohci_t ohci; > struct sunxi_ccm_reg *ccm; > u32 *reset0_cfg; > - ohci_t ohci; > int ahb_gate_mask; /* Mask of ahb_gate0 clk gate bits for this hcd */ > int usb_gate_mask; /* Mask of usb_clk_cfg clk gate bits for this hcd */ > struct phy phy; > -- Best regards, Marek Vasut