lkml.org 
[lkml]   [2017]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/3] libnvdimm, pfn, dax: show supported dax/pfn region alignments in sysfs
On Mon, Aug 14, 2017 at 11:46 PM, Oliver <oohall@gmail.com> wrote:
> On Tue, Aug 15, 2017 at 4:02 PM, kbuild test robot <lkp@intel.com> wrote:
[..]
>> 114 static const unsigned long *nd_pfn_supported_alignments(void)
>> 115 {
>> 116 /*
>> 117 * This needs to be a local variable because the *_SIZE macros
>> 118 * aren't always constants.
>> 119 */
>
> I probably should have been clearer, "local" here really means
> "non-static". Otherwise the array could have been made a global.
>

Whoops, my fault. How about this:

@@ -127,8 +127,11 @@ static const unsigned long
*nd_pfn_supported_alignments(void)
#endif
0,
};
+ static unsigned long data[ARRAY_SIZE(supported_alignments)];

- return supported_alignments;
+ memcpy(data, supported_alignments, sizeof(data));
+
+ return data;
}

\
 
 \ /
  Last update: 2017-08-15 17:47    [W:0.070 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site