Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753137AbbFCHEy (ORCPT ); Wed, 3 Jun 2015 03:04:54 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:36433 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752149AbbFCHEq (ORCPT ); Wed, 3 Jun 2015 03:04:46 -0400 Date: Wed, 3 Jun 2015 09:04:41 +0200 From: Ingo Molnar To: Steven Rostedt Cc: Denys Vlasenko , Linus Torvalds , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] x86/asm/entry/32: Open-code CLEAR_RREGS. No code changes. Message-ID: <20150603070441.GB26167@gmail.com> References: <1433271842-9139-1-git-send-email-dvlasenk@redhat.com> <20150602153447.330cb569@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150602153447.330cb569@gandalf.local.home> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1474 Lines: 44 * Steven Rostedt wrote: > On Tue, 2 Jun 2015 21:04:01 +0200 > Denys Vlasenko wrote: > > > This macro is small, has only four callsites, and one of them is slightly > > different using a conditional parameter. > > > > A few saved lines aren't worth the resulting obfuscation. > > I'm curious, why? Did someone recommend this change? I don't see it as > obfuscation at all. So here are a few easy questions, I'm wondering how many minutes it takes for you to answer them correctly: - What does the CLEAR_RREGS name stand for? - What is this macro's purpose? - In a single case CLEAR_RREGS takes a 'r9' argument: arch/x86/ia32/ia32entry.S: CLEAR_RREGS arch/x86/ia32/ia32entry.S: CLEAR_RREGS arch/x86/ia32/ia32entry.S: CLEAR_RREGS r9 arch/x86/ia32/ia32entry.S: CLEAR_RREGS arch/x86/ia32/ia32entry.S: CLEAR_RREGS What is the 'r9' argument's purpose and why is activated in the place where it's activated? The CLEAR_RREGS macro has zero comments. If it takes more than a quick glance to determine all these three first-order questions from the source code, then it's an obvious code cleanliness fail which needs to be improved. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/