lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZuOkxKy5he6vVpDd@hu-bjorande-lv.qualcomm.com>
Date: Thu, 12 Sep 2024 19:34:44 -0700
From: Bjorn Andersson <quic_bjorande@...cinc.com>
To: Masahiro Yamada <masahiroy@...nel.org>
CC: Bjorn Andersson <andersson@...nel.org>,
        Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>,
        Rob Herring <robh@...nel.org>,
        "Krzysztof
 Kozlowski" <krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>, "Felipe
 Balbi" <balbi@...nel.org>,
        Wesley Cheng <quic_wcheng@...cinc.com>,
        "Saravana
 Kannan" <saravanak@...gle.com>,
        Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Konrad Dybcio
	<konrad.dybcio@...aro.org>, <linux-usb@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH v2 4/7] usb: dwc3: core: Expose core driver as library

On Fri, Sep 13, 2024 at 07:21:35AM +0900, Masahiro Yamada wrote:
> On Mon, Aug 12, 2024 at 12:07 PM Bjorn Andersson <andersson@...nel.org> wrote:
[..]
> > diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> > index 1e561fd8b86e..4a0ee9ef72e2 100644
> > --- a/drivers/usb/dwc3/core.h
> > +++ b/drivers/usb/dwc3/core.h
> > @@ -1160,6 +1160,7 @@ struct dwc3_scratchpad_array {
> >   * @gsbuscfg0_reqinfo: store GSBUSCFG0.DATRDREQINFO, DESRDREQINFO,
> >   *                    DATWRREQINFO, and DESWRREQINFO value passed from
> >   *                    glue driver.
> > + * @glue: private reference to any glue context
> >   */
> >  struct dwc3 {
> >         struct work_struct      drd_work;
> > @@ -1388,6 +1389,8 @@ struct dwc3 {
> >         int                     num_ep_resized;
> >         struct dentry           *debug_root;
> >         u32                     gsbuscfg0_reqinfo;
> > +
> > +       void                    *glue;
> 
> 
> This is ugly.
> 
> 
> 'struct dwc3_qcom' can wrap 'struct dwc3'
> instead of having two separate structures
> pointing at each other.
> 
> 
> You can use container_of() to
> convert (struct dwc3 *) to (struct dwc3_qcom *).
> 
> 
> I attached a diff to delete the reverse ->glue pointer.
> 
> I did not compile-test it (I cannot due to missing glue.h
> anyway), but you will understand my suggestion.
> 

Thanks for your suggestion, Yamada-san.
I agree, that will look better.

Regards,
Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ