From patchwork Wed Sep 28 18:41:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Richardson X-Patchwork-Id: 9354741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD4476077A for ; Wed, 28 Sep 2016 18:41:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFA8829687 for ; Wed, 28 Sep 2016 18:41:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A42D82968D; Wed, 28 Sep 2016 18:41:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 502B429687 for ; Wed, 28 Sep 2016 18:41:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754167AbcI1Sl3 (ORCPT ); Wed, 28 Sep 2016 14:41:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51432 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754017AbcI1SlH (ORCPT ); Wed, 28 Sep 2016 14:41:07 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E5C458E684 for ; Wed, 28 Sep 2016 18:41:06 +0000 (UTC) Received: from thinkcentre.nc.rr.com (vpn-53-113.rdu2.redhat.com [10.10.53.113]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8SIf6lv029245 for ; Wed, 28 Sep 2016 14:41:06 -0400 From: Lance Richardson To: linux-sparse@vger.kernel.org Subject: [PATCH v2] sparse: ignore __assume_aligned__ attribute Date: Wed, 28 Sep 2016 14:41:05 -0400 Message-Id: <1475088065-31142-1-git-send-email-lrichard@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 28 Sep 2016 18:41:06 +0000 (UTC) Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The __assume_aligned__ attribute can be safely ignored, add it to the list of ignored attributes and add a test to verify that this attribute is ignored. Signed-off-by: Lance Richardson --- v2: Added test case. parse.c | 2 ++ validation/attr_aligned.c | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 validation/attr_aligned.c diff --git a/parse.c b/parse.c index 4e38f3f..634f109 100644 --- a/parse.c +++ b/parse.c @@ -510,6 +510,8 @@ const char *ignored_attributes[] = { "__always_inline__", "artificial", "__artificial__", + "assume_aligned", + "__assume_aligned__", "bounded", "__bounded__", "cdecl", diff --git a/validation/attr_aligned.c b/validation/attr_aligned.c new file mode 100644 index 0000000..af2c363 --- /dev/null +++ b/validation/attr_aligned.c @@ -0,0 +1,5 @@ +void *foo(void) __attribute__((__assume_aligned__(4096))); +/* + * check-name: attribute assume_aligned + */ +