From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752968AbdLDCkH (ORCPT ); Sun, 3 Dec 2017 21:40:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56166 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbdLDCkG (ORCPT ); Sun, 3 Dec 2017 21:40:06 -0500 Date: Mon, 4 Dec 2017 10:39:54 +0800 From: Dave Young To: Joe Perches Cc: Matt Fleming , Greg Kroah-Hartman , Ard Biesheuvel , Linus Torvalds , "Tobin C. Harding" , LKML , "linux-efi@vger.kernel.org" Subject: Re: [GIT PULL] hash addresses printed with %p Message-ID: <20171204023954.GA2909@dhcp-128-65.nay.redhat.com> References: <20171130163235.GA27849@kroah.com> <20171130171036.GB31817@kroah.com> <20171201094846.GE9353@kroah.com> <20171202222244.GA3799@codeblueprint.co.uk> <20171204020216.GA2436@dhcp-128-65.nay.redhat.com> <1512354837.6321.41.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1512354837.6321.41.camel@perches.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 04 Dec 2017 02:40:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/03/17 at 06:33pm, Joe Perches wrote: > 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) > I'm also fine with above, easier to get the meaning. Thanks for the suggestion. Dave