From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757289AbYDJOLl (ORCPT ); Thu, 10 Apr 2008 10:11:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756104AbYDJOLe (ORCPT ); Thu, 10 Apr 2008 10:11:34 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:49696 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756083AbYDJOLd (ORCPT ); Thu, 10 Apr 2008 10:11:33 -0400 Date: Thu, 10 Apr 2008 10:11:30 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Andy Whitcroft cc: Andi Kleen , "H. Peter Anvin" , LKML , Ingo Molnar , Peter Zijlstra , Linus Torvalds , akpm@osdl.org, Rusty Russell , Glauber de Oliveira Costa , Jan Beulich , Thomas Gleixner , pinskia@gcc.gnu.org Subject: Re: [PATCH] pop previous section in alternative.c In-Reply-To: <20080410094637.GW17915@shadowen.org> Message-ID: References: <47FD5D42.5000603@zytor.com> <87wsn6m6zt.fsf@basil.nowhere.org> <20080410094637.GW17915@shadowen.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Apr 2008, Andy Whitcroft wrote: > > > > BTW it looks like the problem was added with 121d7bf5a246d282ba91234d03a4edf9ccc9c940, > > signed off by me, sorry for not catching it in review. > > > > Perhaps that is something that would make sense adding to checkpatch.pl? > > Complain for .section in inline assembler without .previous or popsection > > (cc Andy). I think such a check would make sense. > > Do you have an example of such a bad thing? My only concern is this > sounds like a check which could potentially need to see more lines than are > available in the patch context and so the test might be rather unreliable. > >>From commit 121d7bf5a246d282ba91234d03a4edf9ccc9c940: get them easily into strings. */ -asm("\t.data\nintelnops: " +asm("\t.section .rodata, \"a\"\nintelnops: " GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC GENERIC_NOP7 GENERIC_NOP8); -extern unsigned char intelnops[]; I would say anytime there's a "^+.*\.section" there had better be a "^-.*\.section" or a "+.*.previous" matching it. Off hand I can't think of any exceptions to this rule although I may be wrong. -- Steve