Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp49253ybk; Fri, 8 May 2020 18:12:37 -0700 (PDT) X-Google-Smtp-Source: APiQypJ9g31Z37q6Z8/nJoBXjyPRlo33A8sCu7npwo0ROHSYGT1CTdaOei8nYrHZP6TIYan9ZR07 X-Received: by 2002:a17:906:cb98:: with SMTP id mf24mr4395408ejb.146.1588986757167; Fri, 08 May 2020 18:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588986757; cv=none; d=google.com; s=arc-20160816; b=TQ0kvJblPZGjTn2GneQLoPCF0J3mQqU78YHYO4PSy/IxDU/71CQm6hPE6JhA4NxDwF YZOwp8vpkrJC9JIii5I3JT2zS99c164kEi+vD2hj4I2KPd69bKRFGUrSW8JrkDVUHwNp ro8YQoTBQ/+U14lD8Q3WucwL4scDyRLdY/+fGoS7hRRx0ciTeZKFz5AmPoBJ7U3TwfUZ tu0OD859+qjJVLEiSaz7EwP6EUPuxBg4jvhkRoNa6kOeztarrw8Fj/iTniLp1lDTBoyw KTwI7PO5ZxoV5hhGdxDMLJKgu7sGH8o49m33IlfvcRnVmqSIS15uiD/4iVfKEOWTT0xm 7lng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=KTldrb/s8ZOMsUxHJzHfh2FN29ZgGZkIrdIx/U3z3I4=; b=vy/EZ93y1DKyiY5KQJ9jmgUAU/5yQOfmurASQB7HBMreTwblb9EaD4WKdj94ISBy5W 1iunRLtlN+H0AAuAPYHDVXhjh6W5ddd4u5qcTUjQ98yqaqbfiQ6oqc8qQ1W/lRrNmd93 JLlIddvDFdIETxMY6dgRiOPU1VYb6pF/eOjxBmYI1PU8ZuJqTUpJSDY2gjIfADZI6Vih fsCedpUOsxgrTNJtWTX3hz/xJfEbl4MNdzxMdOdBCOj7ptnwfFhJ81x7jCflUAauPQRt pB4lIrWneV8nNu55b4Ill9VUeZ06pYilyOEmLIV8B8kfHVQQAAOjBaq+AnQNo+206LF9 VJfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o24si1842687edr.456.2020.05.08.18.12.11; Fri, 08 May 2020 18:12:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728426AbgEIBKq (ORCPT + 99 others); Fri, 8 May 2020 21:10:46 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:48620 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727828AbgEIBKq (ORCPT ); Fri, 8 May 2020 21:10:46 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 05541825B28897CE8A93; Sat, 9 May 2020 09:10:44 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Sat, 9 May 2020 09:10:35 +0800 From: Samuel Zou To: , , , , CC: , , "Samuel Zou" Subject: [PATCH -next v2] livepatch: Make klp_apply_object_relocs static Date: Sat, 9 May 2020 09:16:41 +0800 Message-ID: <1588987001-27863-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following sparse warning: kernel/livepatch/core.c:748:5: warning: symbol 'klp_apply_object_relocs' was not declared. The klp_apply_object_relocs() has only one call site within core.c It should be static Fixes: 7c8e2bdd5f0d ("livepatch: Apply vmlinux-specific KLP relocations early") Reported-by: Hulk Robot Signed-off-by: Samuel Zou --- kernel/livepatch/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 96d2da1..f76fdb9 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -745,7 +745,8 @@ static int klp_init_func(struct klp_object *obj, struct klp_func *func) func->old_sympos ? func->old_sympos : 1); } -int klp_apply_object_relocs(struct klp_patch *patch, struct klp_object *obj) +static int klp_apply_object_relocs(struct klp_patch *patch, + struct klp_object *obj) { int i, ret; struct klp_modinfo *info = patch->mod->klp_info; -- 2.6.2