From patchwork Fri Feb 22 00:20:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 2174031 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 34CAC3FD4E for ; Fri, 22 Feb 2013 00:20:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759299Ab3BVAUN (ORCPT ); Thu, 21 Feb 2013 19:20:13 -0500 Received: from casper.infradead.org ([85.118.1.10]:48669 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758729Ab3BVAUM (ORCPT ); Thu, 21 Feb 2013 19:20:12 -0500 Received: from static-50-53-38-135.bvtn.or.frontiernet.net ([50.53.38.135] helo=dragon.site) by casper.infradead.org with esmtpsa (Exim 4.76 #1 (Red Hat Linux)) id 1U8gN0-0003Kc-1V; Fri, 22 Feb 2013 00:20:10 +0000 Message-ID: <5126B9E1.1070007@infradead.org> Date: Thu, 21 Feb 2013 16:20:49 -0800 From: Randy Dunlap User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 MIME-Version: 1.0 To: Christopher Li CC: linux-sparse@vger.kernel.org Subject: sparse patch v2: add noclone as an ignored attribute References: <51184E28.40909@infradead.org> In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org From: Randy Dunlap Add attribute "noclone" or "__noclone" or "__noclone__" as an ignored attribute. Fixes this sparse warning: arch/x86/kvm/vmx.c:6268:13: error: attribute '__noclone__': unknown attribute Also add test case for 'noclone': validation/attr-noclone.c. 'make check' says for this test case: TEST attribute noclone (attr-noclone.c) Signed-off-by: Randy Dunlap --- parse.c | 3 +++ validation/attr-noclone.c | 9 +++++++++ 2 files changed, 12 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- sparse-2013-0210.orig/parse.c +++ sparse-2013-0210/parse.c @@ -541,6 +541,9 @@ const char *ignored_attributes[] = { "__naked__", "no_instrument_function", "__no_instrument_function__", + "noclone", + "__noclone", + "__noclone__", "noinline", "__noinline__", "nonnull", --- /dev/null +++ sparse-2013-0210/validation/attr-noclone.c @@ -0,0 +1,9 @@ +#define noclone __attribute__((__noclone__)) + +static void noclone bar(void) +{ +} + +/* + * check-name: attribute noclone + */