From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756300AbbHYXau (ORCPT ); Tue, 25 Aug 2015 19:30:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48388 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752632AbbHYXat (ORCPT ); Tue, 25 Aug 2015 19:30:49 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20150825133925.654019415dbe3d2083e5f8c7@linux-foundation.org> References: <20150825133925.654019415dbe3d2083e5f8c7@linux-foundation.org> <1440521631.2670.100.camel@perches.com> To: Andrew Morton Cc: dhowells@redhat.com, Joe Perches , James Morris , LKML Subject: Re: [PATCH] cred: Remove unnecessary kdebug atomic reads MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22330.1440545444.1@warthog.procyon.org.uk> Date: Wed, 26 Aug 2015 00:30:44 +0100 Message-ID: <22331.1440545444@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton wrote: > Did you consider doing this within no_printk()? That would break code > which is relying on side-effects in the evaluation of a printk arg but > that's pretty weird and I bet there isn't (and won't be) such code. The reasons that no_printk() is like it is are (1) so that the side-effects stay intact and (2) you still get format warnings. If someone prints a device register, for example, it *must* work the same whether or not you use printk() or no_printk(). Of course, printing a device register like this is probably not a good idea... David