From: Thierry Reding <thierry.reding@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pwm: devm: alloc correct pointer size
Date: Mon, 10 Jun 2013 12:51:14 +0200 [thread overview]
Message-ID: <20130610105114.GA2572@manwe> (raw)
In-Reply-To: <CAHp75Vfb7Evhf6yMNd4nzcL9TM5Svu6Z1_MPPAWkmBjhgeDJ8A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
On Mon, Jun 10, 2013 at 09:41:52AM +0300, Andy Shevchenko wrote:
> On Mon, Jun 10, 2013 at 3:04 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> > On Thu, Jun 06, 2013 at 10:43:41PM +0300, Andy Shevchenko wrote:
> >> On Mon, Jun 3, 2013 at 11:27 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> >> > The allocated object should be the size of what the pointer is pointing
> >> > to and not the size of the pointer itself.
> >>
> >> All devm_* functions in this module use **ptr as a parameter (except
> >> allocation).
> >> May be we first should understand why it so?
> >
> > Huh? **ptr is already created on the stack, but assigned the alloced
> > memory. Later, the mem it points to is set to 'pwm' which is then added
> > to devres. So, the alloced memory must be able to contain '*ptr' (or
> > *pwm which would be more readable IMO, but other subsystems also stick
> > to *ptr), no?
>
> Yes, you right.
> Take my Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Applied, thanks.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-06-10 10:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 20:27 [PATCH] pwm: devm: alloc correct pointer size Wolfram Sang
2013-06-06 19:43 ` Andy Shevchenko
2013-06-10 0:04 ` Wolfram Sang
2013-06-10 6:41 ` Andy Shevchenko
2013-06-10 10:51 ` Thierry Reding [this message]
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=20130610105114.GA2572@manwe \
--to=thierry.reding@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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