From patchwork Thu Jun 10 17:15:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Ramasubramanian X-Patchwork-Id: 12313613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-26.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9ECBBC48BD1 for ; Thu, 10 Jun 2021 17:16:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B669613DD for ; Thu, 10 Jun 2021 17:16:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbhFJRSq (ORCPT ); Thu, 10 Jun 2021 13:18:46 -0400 Received: from linux.microsoft.com ([13.77.154.182]:59066 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbhFJRSp (ORCPT ); Thu, 10 Jun 2021 13:18:45 -0400 Received: from localhost.localdomain (c-73-42-176-67.hsd1.wa.comcast.net [73.42.176.67]) by linux.microsoft.com (Postfix) with ESMTPSA id DF1B420B83C2; Thu, 10 Jun 2021 10:16:48 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DF1B420B83C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1623345409; bh=xrcK9iOXmTh55gmK1vfkC1viqRPFZ9noMB/T92243/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qfxZdiGHKs17jAlXW8SXaZ3Mn4R1ebNptsfQoVqLF+ZVOhg6ZMsy4t3Si4Yj37DHE J1SDquKgH0c1RyAujXjmAgcBtQ4sRzjuRyCshgzxSpJO+Zs6/htmHnj4j7sv3Zag4a yc/74D4dmBdG14dp7ZxJnoiNR1mWzYRfxzngzZZA= From: Lakshmi Ramasubramanian To: zohar@linux.ibm.com, robh@kernel.org, bauerman@linux.ibm.com Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, tusharsu@linux.microsoft.com Subject: [PATCH 2/2] ima: Fix warning: no previous prototype for function 'ima_post_key_create_or_update' Date: Thu, 10 Jun 2021 10:15:53 -0700 Message-Id: <20210610171553.3806-2-nramas@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210610171553.3806-1-nramas@linux.microsoft.com> References: <20210610171553.3806-1-nramas@linux.microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org The function prototype for ima_post_key_create_or_update() is present in 'linux/ima.h'. But this header file is not included in ima_asymmetric_keys.c where the function is implemented. This results in the following compiler warning when "-Wmissing-prototypes" flag is turned on: security/integrity/ima/ima_asymmetric_keys.c:29:6: warning: no previous prototype for 'ima_post_key_create_or_update' [-Wmissing-prototypes] Include the header file 'linux/ima.h' in ima_asymmetric_keys.c to fix the compiler warning. Fixes: 88e70da170e8 (IMA: Define an IMA hook to measure keys) Cc: stable@vger.kernel.org Signed-off-by: Lakshmi Ramasubramanian Acked-by: Rob Herring --- security/integrity/ima/ima_asymmetric_keys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/security/integrity/ima/ima_asymmetric_keys.c b/security/integrity/ima/ima_asymmetric_keys.c index 1fb0b0e09559..c985418698a4 100644 --- a/security/integrity/ima/ima_asymmetric_keys.c +++ b/security/integrity/ima/ima_asymmetric_keys.c @@ -11,6 +11,7 @@ #include #include +#include #include "ima.h" /**