From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Joe Perches <joe@perches.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>,
Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH v4 3/4] device property: constify property arrays values
Date: Thu, 2 Feb 2017 10:38:31 -0800 [thread overview]
Message-ID: <20170202183831.GA32759@dtor-ws> (raw)
In-Reply-To: <1486057978.2133.369.camel@linux.intel.com>
On Thu, Feb 02, 2017 at 07:52:58PM +0200, Andy Shevchenko wrote:
> On Thu, 2017-02-02 at 09:07 -0800, Dmitry Torokhov wrote:
> > On February 2, 2017 8:48:30 AM PST, Andy Shevchenko <andriy.shevchenko
> > @linux.intel.com> wrote:
> > > On Thu, 2017-02-02 at 08:39 -0800, Dmitry Torokhov wrote:
> > > > From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > >
> > > > Data that is fed into property arrays should not be modified, so
> > >
> > > let's
> > > > mark
> > > > relevant pointers as const. This will allow us making source
> > > > arrays
> > >
> > > as
> > > > const/__initconst.
> > > >
> > > > Also fix memory leaks on errors in property_entry_copy().
> > >
> > > While the code looks okay, I'm not sure what memory leaks you are
> > > referring to. The idea as far as I remember was to run *free()
> > > function
> > > if *copy() fails.
> >
> > That could have been OK for internal function, but will not work for
> > public API, as it goes against normal pattern.
> >
> > You will be old and grey and still correcting patches that would be
> > getting it wrong :)
>
> Yes, which sounds not exactly as "we have memory leaks and here we are
> fixing them". So, my comment regarding to phrasing of the commit
> message. Someone might mistakenly think that it needs to be ported as
> earlier as this had been introduced.
OK, I'll leave it up to Rafael to massage the commit message as he sees
fit.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2017-02-02 18:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 17:31 [PATCH v3 0/4] Export APIs to copy device properties & more Dmitry Torokhov
2017-02-01 17:31 ` [PATCH v3 1/4] device property: export code duplicating array of property entries Dmitry Torokhov
2017-02-01 17:31 ` [PATCH v3 2/4] device property: allow to constify properties Dmitry Torokhov
2017-02-01 17:31 ` [PATCH v3 3/4] driver property: constify property arrays values Dmitry Torokhov
2017-02-01 23:30 ` Joe Perches
2017-02-02 11:24 ` Rafael J. Wysocki
2017-02-02 16:39 ` [PATCH v4 3/4] device " Dmitry Torokhov
2017-02-02 16:48 ` Andy Shevchenko
2017-02-02 17:07 ` Dmitry Torokhov
2017-02-02 17:52 ` Andy Shevchenko
2017-02-02 18:38 ` Dmitry Torokhov [this message]
2017-02-02 23:16 ` Rafael J. Wysocki
2017-02-03 0:16 ` Dmitry Torokhov
2017-02-03 0:37 ` Rafael J. Wysocki
2017-02-03 1:06 ` Dmitry Torokhov
2017-02-02 10:08 ` [PATCH v3 3/4] driver " Mika Westerberg
2017-02-01 17:31 ` [PATCH v3 4/4] i2c: allow specify device properties in i2c_board_info Dmitry Torokhov
2017-02-02 10:08 ` Mika Westerberg
2017-02-01 22:56 ` [PATCH v3 0/4] Export APIs to copy device properties & more Dmitry Torokhov
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=20170202183831.GA32759@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=joe@perches.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--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;
as well as URLs for NNTP newsgroup(s).