linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bin Liu <b-liu-l0cyMroinI0@public.gmane.org>
To: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Cc: Boris Brezillon
	<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	Andreas Kemnade <andreas-cLv4Z9ELZ06ZuzBka8ofvg@public.gmane.org>,
	Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>,
	Ivaylo Dimitrov
	<ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Johan Hovold <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Ladislav Michl <ladis-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
	Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	Sergei Shtylyov
	<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/6] usb: musb: Fix broken use of static variable for multiple instances
Date: Fri, 11 Nov 2016 14:12:31 -0600	[thread overview]
Message-ID: <20161111201231.GC17372@uda0271908> (raw)
In-Reply-To: <20161111200519.GG7138-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>

On Fri, Nov 11, 2016 at 12:05:19PM -0800, Tony Lindgren wrote:
> * Bin Liu <b-liu-l0cyMroinI0@public.gmane.org> [161111 11:15]:
> > On Fri, Nov 11, 2016 at 10:42:57AM -0800, Tony Lindgren wrote:
> > > --- a/drivers/usb/musb/musb_core.h
> > > +++ b/drivers/usb/musb/musb_core.h
> > > @@ -385,6 +385,8 @@ struct musb {
> > >  	int			a_wait_bcon;	/* VBUS timeout in msecs */
> > >  	unsigned long		idle_timeout;	/* Next timeout in jiffies */
> > >  
> > > +	unsigned		is_initialized:1;
> > > +
> > 
> > The musb strcut is getting bigger and bigger. Is it possible to not add
> > a new variable but use one initialized in musb_init_controller() for
> > this flag purpose? Readability shouldn't be an issue, since it is only
> > used once in musb_runtime_resume().
> 
> Well I was initially checking for delayed work being initialized,
> but Johan did not like the idea of using it. Looking at
> musb_init_controller(), we only initialize musb->nIrq after
> pm_runtime_get_sync(), but that's no better either.. Do you have
> any better ideas for something to use?

I only spent a few seconds on musb_init_controller(), and musb->nIrq is
what I found.

> 
> I agree in the long run we should split struct musb into smaller
> structs though.
> 
> Meanwhile the new flags added in this series are bitfields, so it's
> probably better to use that and overloading something that's not
> strictly related.

Ok, just leave it as is. We will clean up musb struct later. *cough* not
sure when it will ever happen...

> 
> Regards,
> 
> Tony

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

  parent reply	other threads:[~2016-11-11 20:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-11 18:42 [PATCHv2 0/6] musb fixes for v4.9-rc cycle Tony Lindgren
     [not found] ` <20161111184302.2438-1-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-11 18:42   ` [PATCH 1/6] usb: musb: Fix broken use of static variable for multiple instances Tony Lindgren
     [not found]     ` <20161111184302.2438-2-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-11 19:14       ` Bin Liu
2016-11-11 20:05         ` Tony Lindgren
     [not found]           ` <20161111200519.GG7138-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-11 20:12             ` Bin Liu [this message]
2016-11-11 18:42   ` [PATCH 2/6] usb: musb: Fix sleeping function called from invalid context for hdrc glue Tony Lindgren
2016-11-11 18:42   ` [PATCH 3/6] usb: musb: Fix PM for hub disconnect Tony Lindgren
2016-11-11 18:43   ` [PATCH 4/6] phy: twl4030-usb: Fix for musb session bit based PM Tony Lindgren
2016-11-11 18:43   ` [PATCH 5/6] usb: musb: Add missing pm_runtime_disable and drop 2430 PM timeout Tony Lindgren
     [not found]     ` <20161111184302.2438-6-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-14 15:57       ` Johan Hovold
2016-11-11 18:43   ` [PATCH 6/6] usb: musb: Drop pointless PM runtime code for dsps glue Tony Lindgren
     [not found]     ` <20161111184302.2438-7-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-14 15:59       ` Johan Hovold
2016-11-14 21:26         ` Tony Lindgren
2016-11-11 23:28   ` [PATCHv2 0/6] musb fixes for v4.9-rc cycle Laurent Pinchart
  -- strict thread matches above, loose matches on Subject: below --
2016-11-15 21:37 [PATCHv3 " Tony Lindgren
     [not found] ` <20161115213755.12316-1-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-15 21:37   ` [PATCH 1/6] usb: musb: Fix broken use of static variable for multiple instances Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161111201231.GC17372@uda0271908 \
    --to=b-liu-l0cymroini0@public.gmane.org \
    --cc=andreas-cLv4Z9ELZ06ZuzBka8ofvg@public.gmane.org \
    --cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=kishon-l0cyMroinI0@public.gmane.org \
    --cc=ladis-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).