All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Felipe Balbi <balbi@ti.com>
Cc: linux-watchdog@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>,
	Lokesh Vutla <lokeshvutla@ti.com>,
	kernel@pengutronix.de,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 2/3] watchdog: omap: put struct watchdog_device into driver data
Date: Fri, 24 Apr 2015 21:10:59 +0200	[thread overview]
Message-ID: <20150424191059.GW19431@pengutronix.de> (raw)
In-Reply-To: <20150424144448.GC5692@saruman.tx.rr.com>

Hello Felipe,

On Fri, Apr 24, 2015 at 09:44:48AM -0500, Felipe Balbi wrote:
> On Fri, Apr 24, 2015 at 11:48:32AM +0200, Uwe Kleine-König wrote:
> > This way only a single allocation is needed (per device). Also this
> > stops making use of watchdog_{set,get}_drvdata.
> 
> And this is better because ... ?
a single allocation is better because AFAIK it takes less memory to
allocate a + b bytes in a single piece than in two.

watchdog_{set,get}_drvdata seems ugly to me. Judging from the other
frameworks I know better than wdog I'd say there is no need for these
functions. I didn't know if I should be more explicit about my view in
the commitlog and if so how.

Also I didn't check other wdog drivers, but using this style of
embedding the "framework struct" into driver data is a common idiom for
uart and gpio drivers for example.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

WARNING: multiple messages have this Message-ID (diff)
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Felipe Balbi <balbi@ti.com>
Cc: linux-watchdog@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>,
	Lokesh Vutla <lokeshvutla@ti.com>,
	kernel@pengutronix.de,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 2/3] watchdog: omap: put struct watchdog_device into driver data
Date: Fri, 24 Apr 2015 21:10:59 +0200	[thread overview]
Message-ID: <20150424191059.GW19431@pengutronix.de> (raw)
In-Reply-To: <20150424144448.GC5692@saruman.tx.rr.com>

Hello Felipe,

On Fri, Apr 24, 2015 at 09:44:48AM -0500, Felipe Balbi wrote:
> On Fri, Apr 24, 2015 at 11:48:32AM +0200, Uwe Kleine-König wrote:
> > This way only a single allocation is needed (per device). Also this
> > stops making use of watchdog_{set,get}_drvdata.
> 
> And this is better because ... ?
a single allocation is better because AFAIK it takes less memory to
allocate a + b bytes in a single piece than in two.

watchdog_{set,get}_drvdata seems ugly to me. Judging from the other
frameworks I know better than wdog I'd say there is no need for these
functions. I didn't know if I should be more explicit about my view in
the commitlog and if so how.

Also I didn't check other wdog drivers, but using this style of
embedding the "framework struct" into driver data is a common idiom for
uart and gpio drivers for example.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-04-24 19:11 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24  9:48 [PATCH 0/3] watchdog: omap: several cleanups Uwe Kleine-König
2015-04-24  9:48 ` [PATCH 1/3] watchdog: omap: use watchdog_init_timeout Uwe Kleine-König
2015-04-24 14:42   ` Felipe Balbi
2015-04-24 14:42     ` Felipe Balbi
2015-04-24 19:02     ` Uwe Kleine-König
2015-04-24 19:02       ` Uwe Kleine-König
2015-04-24 20:20       ` [PATCH 1a/3] watchdog: omap: clearify device tree documentation Uwe Kleine-König
2015-04-24 20:20         ` Uwe Kleine-König
2015-04-25  2:10         ` Felipe Balbi
2015-04-25  2:10           ` Felipe Balbi
2015-04-26 15:29           ` Guenter Roeck
2015-04-26 15:29             ` Guenter Roeck
2015-04-26 19:12             ` Uwe Kleine-König
2015-04-26 19:12               ` Uwe Kleine-König
2015-04-26 19:46               ` Guenter Roeck
2015-04-26 19:46                 ` Guenter Roeck
2015-04-24  9:48 ` [PATCH 2/3] watchdog: omap: put struct watchdog_device into driver data Uwe Kleine-König
2015-04-24 14:44   ` Felipe Balbi
2015-04-24 14:44     ` Felipe Balbi
2015-04-24 19:10     ` Uwe Kleine-König [this message]
2015-04-24 19:10       ` Uwe Kleine-König
2015-04-24  9:48 ` [PATCH 3/3] watchdog: omap: simplify assignment of bootstatus Uwe Kleine-König
2015-04-24 14:45   ` Felipe Balbi
2015-04-24 14:45     ` Felipe Balbi
2015-04-24 19:03   ` Uwe Kleine-König
2015-04-26 15:28     ` Guenter Roeck
2015-04-26 19:14       ` Uwe Kleine-König

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=20150424191059.GW19431@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=balbi@ti.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=wim@iguana.be \
    /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.