lkml.org 
[lkml]   [2018]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] sysfs: constify sysfs create/remove files harder
On Fri, Oct 5, 2018 at 9:36 AM Jani Nikula <jani.nikula@intel.com> wrote:
>
> On Fri, 05 Oct 2018, "Rafael J. Wysocki" <rafael@kernel.org> wrote:
> > On Thu, Oct 4, 2018 at 4:38 PM Jani Nikula <jani.nikula@intel.com> wrote:
> >>
> >> Let the passed in array be const (and thus placed in rodata) instead of
> >> a mutable array of const pointers.
> >
> > I'm not sure if the changes guarantee what you want. If I'm not
> > mistaken, they just mean that the function itself cannot modify either
> > the pointer passed to it, or the contents of the array pointed to by
> > that pointer. They don't imply the location of the array itself,
> > though.
>
> I mean, this change allows the caller to add the appropriate const
> qualifiers to the array definition, allowing the placement in
> rodata. Can't do that withouth the extra const in the function.

I figured that out, but the changelog is a bit unclear. If you said
"Allow ..." instead of "Let ...", it would be somewhat clearer IMO.
:-)

\
 
 \ /
  Last update: 2018-10-05 09:43    [W:0.121 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site