From: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rakesh Iyer <riyer-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Subject: Re: [PATCH v2 1/2] Input: tegra-kbc - add device tree bindings
Date: Thu, 29 Dec 2011 01:23:08 -0800 [thread overview]
Message-ID: <20111229092308.GA3397@core.coreip.homeip.net> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF17755DC8CE-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
On Wed, Dec 28, 2011 at 10:00:06PM -0800, Stephen Warren wrote:
> Dmitry Torokhov wrote at Tuesday, December 27, 2011 11:49 PM:
> > On Tue, Dec 27, 2011 at 10:19:29PM -0800, Olof Johansson wrote:
> > > This adds a simple device tree binding to the tegra keyboard controller.
> ...
> > > + pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
> >
> > Error handling is missing. I also dislike devm_* facilities as it causes
> > inconsistencies in the way we handle releasing of resources: some of
> > them will be released automatically while others need t be released
> > manually. I prefer having consistent model.
>
> I have to say that I also disagree here. Weren't the devm_* function
> specifically added to allow people not to write all the error-handling
> code themselves.
I guess they were. Unfortunately they also introduce inconsistency in
the way resources are tracked and freed since some of them support
devm_* facilities while others don't. I might be OK with drivers that
use one model for all resources but this patch was mixing the two.
devm_* facilities are also not free; you are saving on error handling
code but pay with memory footprint required to implement tracking.
> Forcing everyone not to use them doesn't seem right.
> There have been a ton of patches throughout the kernel converting drivers
> to use devm_* and at the same time removing and simplifying error
> handling.
>
Thanks.
--
Dmitry
next prev parent reply other threads:[~2011-12-29 9:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-28 6:19 [PATCH v2 0/2] Input: tegra-kbc - configure through device tree Olof Johansson
[not found] ` <1325053170-6984-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-12-28 6:19 ` [PATCH v2 1/2] Input: tegra-kbc - add device tree bindings Olof Johansson
[not found] ` <1325053170-6984-2-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-12-28 6:48 ` Dmitry Torokhov
[not found] ` <20111228064832.GA29273-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2011-12-28 7:10 ` Olof Johansson
2011-12-29 6:00 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF17755DC8CE-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-29 9:23 ` Dmitry Torokhov [this message]
[not found] ` <20111229092308.GA3397-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2012-01-02 8:16 ` Grant Likely
2012-01-02 8:18 ` Grant Likely
[not found] ` <20120102081828.GB18381-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2012-01-03 20:58 ` Olof Johansson
2011-12-28 6:19 ` [PATCH v2 2/2] Input: tegra-kbc - add default chromeos map Olof Johansson
[not found] ` <1325053170-6984-3-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-12-28 6:50 ` Dmitry Torokhov
[not found] ` <20111228065013.GB29273-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2011-12-28 7:33 ` Olof Johansson
[not found] ` <CAOesGMheQqYjpDRaf6TTce2YEcD4hkTzS2JTdoCe3ue6+dBhDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-29 6:06 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF17755DC8D0-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-29 6:41 ` Olof Johansson
[not found] ` <CAOesGMi6CpVVjUS4EoXbtxdw=Wj8G2_+SFzvqp1DP_mpjCoNVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-29 6:58 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF17755DC8D9-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-29 7:13 ` Olof Johansson
[not found] ` <CAOesGMh=MESRSs0YeFJpf__E7FNmPY4zdNjz7hBqMuiWbUJsow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-29 9:41 ` Dmitry Torokhov
[not found] ` <20111229094106.GB3397-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2011-12-29 9:47 ` Olof Johansson
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=20111229092308.GA3397@core.coreip.homeip.net \
--to=dmitry.torokhov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=riyer-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@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).