Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754163AbdLDOAM (ORCPT ); Mon, 4 Dec 2017 09:00:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43684 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbdLDOAF (ORCPT ); Mon, 4 Dec 2017 09:00:05 -0500 Date: Mon, 4 Dec 2017 15:00:12 +0100 From: Greg Kroah-Hartman To: David Laight Cc: "'Ard Biesheuvel'" , Dave Young , Matt Fleming , Linus Torvalds , "Tobin C. Harding" , LKML , "linux-efi@vger.kernel.org" Subject: Re: [GIT PULL] hash addresses printed with %p Message-ID: <20171204140012.GA8744@kroah.com> References: <20171202222244.GA3799@codeblueprint.co.uk> <20171204020216.GA2436@dhcp-128-65.nay.redhat.com> <20171204073642.GC19596@kroah.com> <20171204092928.GA4421@dhcp-128-65.nay.redhat.com> <20171204093430.GA6463@kroah.com> <20171204095936.GA10547@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 787 Lines: 25 On Mon, Dec 04, 2017 at 12:51:13PM +0000, David Laight wrote: > From: Ard Biesheuvel > > Sent: 04 December 2017 10:03 > ... > > and uses __ATTR_RO() to emit initializers for it. __ATTR() initializes > > the .store member as well, which does not exists, and so it cannot be > > used directly. > > > > So we should either add a .store member that is always NULL, or we > > should add our own > > > > #define __ATTR_0400(_name) { \ > > .attr = { .name = __stringify(_name), .mode = 0400 }, \ > > .show = _name##_show, \ > > } > > What about an __ATTR_RO_MODE(name, mode) that doesn't set the .store member. > Even if the mode allowed write, writes wouldn't happen. Ah, that might work, could you convert the other users of __ATTR() in the efi code to use it as well? thanks, greg k-h