Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757258AbcLQRwI (ORCPT ); Sat, 17 Dec 2016 12:52:08 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:34503 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752060AbcLQRwH (ORCPT ); Sat, 17 Dec 2016 12:52:07 -0500 From: Larry Finger To: LKML , Vivek Goyal Subject: What is the function of arch/x86/purgatory/purgatory.c? Message-ID: <4c1d06ae-cb0f-3759-fc63-2a7de0f8f553@lwfinger.net> Date: Sat, 17 Dec 2016 11:52:05 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1314 Lines: 30 While checking the rtlwifi family of drivers using Sparse, I got the following warnings: CHECK arch/x86/purgatory/purgatory.c arch/x86/purgatory/purgatory.c:21:15: warning: symbol 'backup_dest' was not declared. Should it be static? arch/x86/purgatory/purgatory.c:22:15: warning: symbol 'backup_src' was not declared. Should it be static? arch/x86/purgatory/purgatory.c:23:15: warning: symbol 'backup_sz' was not declared. Should it be static? arch/x86/purgatory/purgatory.c:25:4: warning: symbol 'sha256_digest' was not declared. Should it be static? arch/x86/purgatory/purgatory.c:27:19: warning: symbol 'sha_regions' was not declared. Should it be static? arch/x86/purgatory/purgatory.c:42:5: warning: symbol 'verify_sha256_digest' was not declared. Should it be static? arch/x86/purgatory/purgatory.c:61:6: warning: symbol 'purgatory' was not declared. Should it be static? Upon examination of the routine, I can see that if purgatory() should be static, then none of the code here will ever be accessed by any part of the kernel. Is there some bit of magic that is above my understanding, or is this a useless bit of code that has been forgotten and should be removed? If the former, then I think there should be declarations so that the clueless like me are not confused. Thanks, Larry