lkml.org 
[lkml]   [2017]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [GIT PULL] hash addresses printed with %p
From
Date
On Mon, 2017-12-04 at 10:02 +0800, Dave Young wrote:
> I think 0400 is good enough for this issue.
>
> Greg, would you like to agree add an extra macro like below?
[]
> -static struct map_attribute map_type_attr = __ATTR_RO(type);
> -static struct map_attribute map_phys_addr_attr = __ATTR_RO(phys_addr);
> -static struct map_attribute map_virt_addr_attr = __ATTR_RO(virt_addr);
> -static struct map_attribute map_num_pages_attr = __ATTR_RO(num_pages);
> -static struct map_attribute map_attribute_attr = __ATTR_RO(attribute);
> +static struct map_attribute map_type_attr = __ATTR_IRUSR(type);
> +static struct map_attribute map_phys_addr_attr = __ATTR_IRUSR(phys_addr);
> +static struct map_attribute map_virt_addr_attr = __ATTR_IRUSR(virt_addr);
> +static struct map_attribute map_num_pages_attr = __ATTR_IRUSR(num_pages);
> +static struct map_attribute map_attribute_attr = __ATTR_IRUSR(attribute);
>
> /*
> * These are default attributes that are added for every memmap entry.
> --- linux-x86.orig/include/linux/sysfs.h
> +++ linux-x86/include/linux/sysfs.h
> @@ -112,6 +112,11 @@ struct attribute_group {
> .store = _store, \
> }
>
> +#define __ATTR_IRUSR(_name) {

I'd much prefer __ATTR_0400(_name)

\
 
 \ /
  Last update: 2017-12-04 03:34    [W:0.109 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site