From patchwork Tue Jan 13 16:19:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 5621701 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AB350C058D for ; Tue, 13 Jan 2015 16:19:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2BC7203AB for ; Tue, 13 Jan 2015 16:19:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 11102203AC for ; Tue, 13 Jan 2015 16:19:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752748AbbAMQTY (ORCPT ); Tue, 13 Jan 2015 11:19:24 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:62631 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752624AbbAMQTX (ORCPT ); Tue, 13 Jan 2015 11:19:23 -0500 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0Lo5sn-1XZYVy42FF-00gHLv; Tue, 13 Jan 2015 17:19:20 +0100 From: Arnd Bergmann To: Michal Marek Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH] headers_check: don't warn about kexec.h Date: Tue, 13 Jan 2015 17:19:19 +0100 Message-ID: <12825174.7oxZXDxNhV@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:InKWYu6W2U7oXeD/QtDbOwaj7psDprTriHNtKKQpEpVaGv/LudX vZlkQbw/B1OSPr6LHFrYjKv+MLUQW563lgR0YWimJbUM3I8ASlgXPd9nCzs4btBdZo5aTv6 D2aHzRyj2FjoncTaXwDH38Bwm2LEjylMDq7EbshScCy1HOItUs28UQiVsNurUNa4iDcKNuc gFhgqFTnszC60sp5zhUFQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We've been getting this warning for ages: ./usr/include/linux/kexec.h:61: userspace cannot reference function or variable defined in the kernel There is no proper fix for this file, as the declaration is meant for user space, not for the kernel, so we should work around it the same way that we treat the seqbuf_dump() definition. Signed-off-by: Arnd Bergmann --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 62320f93e903..fb051848667c 100755 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl @@ -69,6 +69,10 @@ sub check_declarations if ($line =~ m/^void seqbuf_dump\(void\);/) { return; } + # user-only declaration from kexec.h + if ($line =~ m/^extern int kexec_load/) { + return; + } if ($line =~ m/^(\s*extern|unsigned|char|short|int|long|void)\b/) { printf STDERR "$filename:$lineno: " . "userspace cannot reference function or " .