Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935691AbcKNSRJ (ORCPT ); Mon, 14 Nov 2016 13:17:09 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:54892 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934164AbcKNSRG (ORCPT ); Mon, 14 Nov 2016 13:17:06 -0500 Date: Mon, 14 Nov 2016 10:16:55 -0800 From: Christoph Hellwig To: Peter Zijlstra Cc: gregkh@linuxfoundation.org, keescook@chromium.org, will.deacon@arm.com, elena.reshetova@intel.com, arnd@arndb.de, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, dave@progbits.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 2/7] kref: Add kref_read() Message-ID: <20161114181655.GA21516@infradead.org> References: <20161114173946.501528675@infradead.org> <20161114174446.486581399@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161114174446.486581399@infradead.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 357 Lines: 8 On Mon, Nov 14, 2016 at 06:39:48PM +0100, Peter Zijlstra wrote: > Since we need to change the implementation, stop exposing internals. > > Provide kref_read() to read the current reference count; typically > used for debug messages. Can we just provide a printk specifier for a kref value instead as that is the only valid use case for reading the value?