Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161047AbcKPIOD (ORCPT ); Wed, 16 Nov 2016 03:14:03 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34505 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932414AbcKPIN7 (ORCPT ); Wed, 16 Nov 2016 03:13:59 -0500 Date: Wed, 16 Nov 2016 09:13:55 +0100 From: Ingo Molnar To: Linus Torvalds Cc: Greg KH , Christoph Hellwig , Peter Zijlstra , Kees Cook , Will Deacon , elena.reshetova@intel.com, Arnd Bergmann , Thomas Gleixner , Peter Anvin , dave@progbits.org, Linux Kernel Mailing List Subject: Re: [PATCH] printk, locking/atomics, kref: Introduce new %pAr and %pAk format string options for atomic_t and 'struct kref' Message-ID: <20161116081354.GB1270@gmail.com> References: <20161114173946.501528675@infradead.org> <20161114174446.486581399@infradead.org> <20161114181655.GA21516@infradead.org> <20161115072855.GB28248@kroah.com> <20161115083736.GA15734@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1268 Lines: 40 * Linus Torvalds wrote: > On Tue, Nov 15, 2016 at 12:37 AM, Ingo Molnar wrote: > > +atomic variables such atomic_t or struct kref: > > + > > + %pAr atomic_t count > > + %pAk struct kref count > > Not a huge fan. That "r" makes sense to you ("raw" atomic), but it > makes no sense to a user. An atomic isn't "raw" to anybody else. It's > just an atomic. So in the latestest patch this has evolved to: %pAa - print the 'atomic_t' count in decimal %pAk - print the 'struct kref' count in decimal %pAr - print the 'refcount_t' count in decimal ... are you still hating it? > Also, we have 'atomic64_t", which this doesn't cover at all. We could use a somewhat logical letter for atomic64_t too: %pAA - print the 'atomic64_t' count in decimal ... as 'A' is the bigger version of 'a', just like atomic64_t is the bigger version of atomic_t! ;-) > I'd suggest just %pA, %pA64, %pAkref or something. Which leaves us the > choice to add more atomic versions later without having to make up > random one-letter things that make no sense. It's a bit more work, but we could do that too, if you still don't like the above single letter abbreviations. Thanks, Ingo