All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <balbi@ti.com>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Keshava Munegowda <keshava_mgowda@ti.com>,
	linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, gadiyar@ti.com,
	sameo@linux.intel.com, parthab@india.ti.com, tony@atomide.com,
	khilman@ti.com, b-cousson@ti.com, paul@pwsan.com
Subject: Re: [PATCH 4/4] mfd: global Suspend and resume support of ehci and ohci
Date: Mon, 6 Jun 2011 10:45:25 +0100	[thread overview]
Message-ID: <20110606094524.GA23682@sirena.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1106051519560.5916-100000@netrider.rowland.org>

On Sun, Jun 05, 2011 at 03:30:55PM -0400, Alan Stern wrote:
> On Sun, 5 Jun 2011, Felipe Balbi wrote:

> > that would mean changes to all linker scripts, though and a utility call
> > that only does anything ifndef CONFIG_PM to free the .pm.ops section.

> In my opinion this would make programming harder, not easier.  It's
> very easy to understand "#ifdef" followed by "#endif"; people see them
> all the time.  The new tags you propose would force people to go
> searching through tons of source files to see what they mean, and then
> readers would still have to figure out when these tags should be used
> or what advantage they might bring.

The big advantage is that they make it much harder to introduce random
build breakage and they're an awful lot less fiddly to do - it used to
be not so bad when it was just the function pointers that needed to be
defined to NULL but now we need to faff around with both the functions
and the dev_pm_ops.

The annotation approach is already familiar from the init stuff so it
wouldn't be so hard for people to understand.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
	"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
	Keshava Munegowda <keshava_mgowda-l0cyMroinI0@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	gadiyar-l0cyMroinI0@public.gmane.org,
	sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	parthab-PpE0FKYn9XJWk0Htik3J/w@public.gmane.org,
	tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
	khilman-l0cyMroinI0@public.gmane.org,
	b-cousson-l0cyMroinI0@public.gmane.org,
	paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 4/4] mfd: global Suspend and resume support of ehci and ohci
Date: Mon, 6 Jun 2011 10:45:25 +0100	[thread overview]
Message-ID: <20110606094524.GA23682@sirena.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1106051519560.5916-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>

On Sun, Jun 05, 2011 at 03:30:55PM -0400, Alan Stern wrote:
> On Sun, 5 Jun 2011, Felipe Balbi wrote:

> > that would mean changes to all linker scripts, though and a utility call
> > that only does anything ifndef CONFIG_PM to free the .pm.ops section.

> In my opinion this would make programming harder, not easier.  It's
> very easy to understand "#ifdef" followed by "#endif"; people see them
> all the time.  The new tags you propose would force people to go
> searching through tons of source files to see what they mean, and then
> readers would still have to figure out when these tags should be used
> or what advantage they might bring.

The big advantage is that they make it much harder to introduce random
build breakage and they're an awful lot less fiddly to do - it used to
be not so bad when it was just the function pointers that needed to be
defined to NULL but now we need to faff around with both the functions
and the dev_pm_ops.

The annotation approach is already familiar from the init stuff so it
wouldn't be so hard for people to understand.
--
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:[~2011-06-06  9:45 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 13:27 [PATCH 0/4] arm: omap: usb: Hwmod and Runtime PM support for EHCI & OHCI Keshava Munegowda
2011-06-01 13:27 ` Keshava Munegowda
2011-06-01 13:27 ` [PATCH 1/4] arm: omap: usb: ehci and ohci hwmod structures for omap3 and omap4 Keshava Munegowda
2011-06-01 13:27   ` Keshava Munegowda
2011-06-01 13:27   ` [PATCH 2/4] arm: omap: usb: register hwmods of usbhs Keshava Munegowda
2011-06-01 13:27     ` Keshava Munegowda
2011-06-01 13:27     ` [PATCH 3/4] arm: omap: usb: device name change for the clk names " Keshava Munegowda
2011-06-01 13:27       ` Keshava Munegowda
2011-06-01 13:27       ` [PATCH 4/4] mfd: global Suspend and resume support of ehci and ohci Keshava Munegowda
2011-06-01 13:27         ` Keshava Munegowda
2011-06-01 13:31         ` Felipe Balbi
2011-06-01 13:38           ` Munegowda, Keshava
2011-06-01 13:54         ` Rafael J. Wysocki
2011-06-01 14:32           ` Felipe Balbi
2011-06-05 17:19             ` Rafael J. Wysocki
2011-06-05 18:50               ` Felipe Balbi
2011-06-05 19:30                 ` Alan Stern
2011-06-05 19:30                   ` Alan Stern
2011-06-05 19:54                   ` Felipe Balbi
2011-06-05 19:54                     ` Felipe Balbi
2011-06-06 16:06                     ` Alan Stern
2011-06-06 16:06                       ` Alan Stern
2011-06-06 17:25                       ` Felipe Balbi
2011-06-06 18:03                         ` Alan Stern
2011-06-06 18:03                           ` Alan Stern
2011-06-06  9:45                   ` Mark Brown [this message]
2011-06-06  9:45                     ` Mark Brown
2011-06-02  0:06         ` Kevin Hilman
2011-06-02  0:06           ` Kevin Hilman
2011-06-29 15:22           ` Munegowda, Keshava
2011-06-29 16:37             ` Munegowda, Keshava
2011-06-29 16:37               ` Munegowda, Keshava
2011-06-29 17:33               ` Alan Stern
2011-06-29 17:33                 ` Alan Stern
2011-06-29 18:17                 ` Partha Basak
2011-06-29 18:47                   ` Alan Stern
2011-06-29 18:47                     ` Alan Stern
2011-06-29 19:20               ` Kevin Hilman
2011-06-29 19:20                 ` Kevin Hilman
2011-06-30 12:40                 ` Munegowda, Keshava
2011-06-30 12:40                   ` Munegowda, Keshava
2011-06-01 20:05       ` [PATCH 3/4] arm: omap: usb: device name change for the clk names of usbhs Kevin Hilman
2011-06-01 20:05         ` Kevin Hilman
2011-06-01 20:01     ` [PATCH 2/4] arm: omap: usb: register hwmods " Kevin Hilman
2011-06-01 20:01       ` Kevin Hilman
2011-06-01 20:04     ` Kevin Hilman
2011-06-01 20:04       ` Kevin Hilman
2011-06-01 19:56   ` [PATCH 1/4] arm: omap: usb: ehci and ohci hwmod structures for omap3 and omap4 Kevin Hilman
2011-06-01 19:56     ` Kevin Hilman
2011-06-02  6:55     ` Munegowda, Keshava

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=20110606094524.GA23682@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=gadiyar@ti.com \
    --cc=keshava_mgowda@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=parthab@india.ti.com \
    --cc=paul@pwsan.com \
    --cc=rjw@sisk.pl \
    --cc=sameo@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.