From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751668AbdBNCtT (ORCPT ); Mon, 13 Feb 2017 21:49:19 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33370 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbdBNCtR (ORCPT ); Mon, 13 Feb 2017 21:49:17 -0500 X-ME-Sender: X-Sasl-enc: eynsP3/yVrPOctTOyuKR6THF8QQl75zQnnZxuQV8WrVm 1487040555 From: "Tobin C. Harding" To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, "Tobin C. Harding" Subject: [PATCH v3 1/2] x86/purgatory: Fix sparse warning, symbol not declared Date: Tue, 14 Feb 2017 13:48:54 +1100 Message-Id: <1487040535-4939-2-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487040535-4939-1-git-send-email-me@tobin.cc> References: <1487040535-4939-1-git-send-email-me@tobin.cc> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse emits several 'symbol not declared' warnings for various functions and variables. Add static keyword to functions and variables which have file scope only. Remove definition to zero for each variable declared static in accord with kernel standard. Signed-off-by: Tobin C. Harding --- arch/x86/purgatory/purgatory.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/purgatory/purgatory.c b/arch/x86/purgatory/purgatory.c index 25e068b..2a5f437 100644 --- a/arch/x86/purgatory/purgatory.c +++ b/arch/x86/purgatory/purgatory.c @@ -18,11 +18,11 @@ struct sha_region { unsigned long len; }; -unsigned long backup_dest = 0; -unsigned long backup_src = 0; -unsigned long backup_sz = 0; +static unsigned long backup_dest; +static unsigned long backup_src; +static unsigned long backup_sz; -u8 sha256_digest[SHA256_DIGEST_SIZE] = { 0 }; +static u8 sha256_digest[SHA256_DIGEST_SIZE] = { 0 }; struct sha_region sha_regions[16] = {}; @@ -39,7 +39,7 @@ static int copy_backup_region(void) return 0; } -int verify_sha256_digest(void) +static int verify_sha256_digest(void) { struct sha_region *ptr, *end; u8 digest[SHA256_DIGEST_SIZE]; -- 2.7.4