Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3207272pxj; Mon, 31 May 2021 23:31:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuDtihZBlP6DMHwH1il1Bm5ULv0ymEWoENbH4HRGjiLuHl1xdzfDUWwPONTnNok5FI7col X-Received: by 2002:a17:906:640c:: with SMTP id d12mr26652281ejm.70.1622529105147; Mon, 31 May 2021 23:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622529105; cv=none; d=google.com; s=arc-20160816; b=EGaqnxUfwj/OI17dWwb97ArmP8yjE2ostL1Ltp0oQfUz1nGfM5jMxUX7fXSI4QeY+n IPbsPRBsbzoWSrOoXP4U2vqROdUd5jwnVMeA8V4hJYgJm7yFg6EsWP9nN2seaPf12psA fzAgWnWQx/V3Mbdz7uRs2+Nw3e4tVLYMrGxY+aq8v1RcELXVYwgaoO/mMO9FGurVH/3V VTOzizP6DzFuxsjNBpBzaTJaMgP65LMUy86qu62cF0+qYw4tyU8XWXqfG9KEYv6BmdSR vpQzvUJXmYa19mf4Pg88HPx0Dzd0yBJU2zagXAAFw6+euHm2YGcE3RlNFLFQ8A4vJ0FP NBFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LPnZ6bTV6GjQvnBAOksT2isHFOeJJzSIRAoDGZUaOqA=; b=jK0y/sFM+RUlt25XMVerQ0pLvDKrAy6AgVPUqwB3L9JqQkijjA6Q6tmqsroJ8zf46n Bl4JIIVyBYRqlfmC374K9H2bUywwI05SS0huamN85bH1b7ixQR6Bj1q4Ke8MvZlMUXje vvUpW2wKJ8mDmHQ4bWcc9mosVYrhrF6oZI0TjOHSzXJzFPRoMLd2EfY2i+G75j5Jquq7 d3bs7kdElRzAG8wrKDtQr1Nrm3nyVphLm1hsJF1OQwY9GffFriHJpmhJpz64Gj9s3G1i jF/mNnX7MR4Q/koR3j52u+uIv8EWZReqhyGp2XTLJavQPc7AJbfb7ZmyBp3BSZsRA81N syvg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si15606342edz.330.2021.05.31.23.31.22; Mon, 31 May 2021 23:31:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231375AbhFAGcD (ORCPT + 99 others); Tue, 1 Jun 2021 02:32:03 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:6103 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229984AbhFAGcD (ORCPT ); Tue, 1 Jun 2021 02:32:03 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FvMf13Qc5zYpLF; Tue, 1 Jun 2021 14:27:37 +0800 (CST) Received: from dggpemm500012.china.huawei.com (7.185.36.89) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 14:30:20 +0800 Received: from DESKTOP-EFRLNPK.china.huawei.com (10.174.176.189) by dggpemm500012.china.huawei.com (7.185.36.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 14:30:20 +0800 From: Qiheng Lin To: , , , , CC: , Qiheng Lin Subject: [PATCH v2 -next] x86/kprobes: Remove the unneeded extern keyword Date: Tue, 1 Jun 2021 14:30:15 +0800 Message-ID: <20210601063015.27309-1-linqiheng@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Originating-IP: [10.174.176.189] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500012.china.huawei.com (7.185.36.89) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function declaration in kprobes.h is already marked extern, so remove it in the definition. This problem was caught by the sparse tool: function 'arch_unoptimize_kprobes' with external linkage has definition Signed-off-by: Qiheng Lin --- Changes in v2: - adjust the subject and commit message arch/x86/kernel/kprobes/opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c index 71425ebba98a..7d962c884505 100644 --- a/arch/x86/kernel/kprobes/opt.c +++ b/arch/x86/kernel/kprobes/opt.c @@ -539,8 +539,8 @@ void arch_unoptimize_kprobe(struct optimized_kprobe *op) * Recover original instructions and breakpoints from relative jumps. * Caller must call with locking kprobe_mutex. */ -extern void arch_unoptimize_kprobes(struct list_head *oplist, - struct list_head *done_list) +void arch_unoptimize_kprobes(struct list_head *oplist, + struct list_head *done_list) { struct optimized_kprobe *op, *tmp; -- 2.31.1