From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756297AbcGHVld (ORCPT ); Fri, 8 Jul 2016 17:41:33 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43695 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754606AbcGHVl0 (ORCPT ); Fri, 8 Jul 2016 17:41:26 -0400 Date: Fri, 8 Jul 2016 14:41:24 -0700 From: Andrew Morton To: Jason Baron Cc: joe@perches.com, peterz@infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 7/7] dynamic_debug: add jump label support Message-Id: <20160708144124.fa0b4d55aaf7e1d61a943d40@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Jul 2016 17:42:36 -0400 Jason Baron wrote: > Although dynamic debug is often only used for debug builds, sometimes its > enabled for production builds as well. Minimize its impact by using jump > labels. This reduces the text section by 7000+ bytes in the kernel image > below. It does increase data, but this should only be referenced when > changing the direction of the branches, and hence usually not in cache. > > ... > > +#ifdef HAVE_JUMP_LABEL > + > +#define dd_key_init(key, init) key = (init) > > ... > > +#else > + > +#define dd_key_init(key, init) > + umm, lazy. One is an lval and returns a value and the other does neither. Lack of parenthesization in the first version doubtless exposes various horrors. Care to do something more robust and conventional here? Presumably use symmetrical do{}while(0) things, neither of which is an lval, both of which don't return anything.