Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2266977pxj; Sun, 30 May 2021 20:12:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyskOpOaVjCVdr0o+UHCYqQPYByoD7VeFt5DPunmaGat/glO7uWgihpe3lyXYTVlIwPHPXB X-Received: by 2002:a17:906:4747:: with SMTP id j7mr11754764ejs.419.1622430724947; Sun, 30 May 2021 20:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622430724; cv=none; d=google.com; s=arc-20160816; b=a4saRo7xHgMzJFve+QedUIkaYlC2JiQyY2g9pN3DlUhd3PB/GsL3r6ChsCZ3jfeOcE DxxLfX/BHRbVnkcMMzlLLLlm/64ntaxqQjTzuN/WVLFcwhkJIChVMLdVimMna0QwUnAz j8w1ohmJ+d7wO0FAS08CZfqqaKpsvyDy971ealII/EQiHHfWW+UvdLERCRlXCx3qgkdk io/I0OAmD2cZ0lwUVlhOOG7U4d4DmD1Rufo0gyPUp+FEVOK0dWMUml3XBRcd+/KSAyUc XSX9oKau2koMi9dPL1vcXAJzm77CYfB7StVDZ9PJ00r1SLfaQ3U2YinisPT8cbAkWeWZ fcbg== 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=T5u8HptWWJhPgqs/C+/hmK5BR9ahRT5c4p29OnJxRak=; b=JQFmhwgz3yzfqoiy6w3Vx1Rb8tGz1n95sECDo8cwmO6S5KJSwuYBhENAB6trK5nt27 Ax4C+J2b0fe4DmUmaajpBVDVXxYGxKmXZzU2fHDE1YiiuskzUXkKWbfgQrrSIQZtvM7k ktDCePXOfMGAVAzNw8spchfFgvfFGqJ7/401pUozNj0XarS+1/4fh4DWtYcbmz/tDU78 XRRdJ3oYmdvFgKOmcLyrWvGQPB6tlzen4mGNz5/vasZ0FbzO6pjw+VaDqOnz/DjES91a jf9HG59D1Hw/e3je7V3krJ6sOHAdpGjvVs+1ZIDbqhuBlmJw1NzC1h6E2cjm9ct6SrL/ Apwg== 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 u23si5684869edi.175.2021.05.30.20.11.42; Sun, 30 May 2021 20:12:04 -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 S230006AbhEaDMQ (ORCPT + 99 others); Sun, 30 May 2021 23:12:16 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:2795 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbhEaDMN (ORCPT ); Sun, 30 May 2021 23:12:13 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FtgCh5Sb1zWqmk; Mon, 31 May 2021 11:05:52 +0800 (CST) Received: from dggpemm500012.china.huawei.com (7.185.36.89) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 31 May 2021 11:10:31 +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; Mon, 31 May 2021 11:10:31 +0800 From: Qiheng Lin To: , , , , CC: , Qiheng Lin Subject: [PATCH -next] x86/kprobes: functions should not be declared extern Date: Mon, 31 May 2021 11:10:09 +0800 Message-ID: <20210531031009.21737-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: dggems701-chm.china.huawei.com (10.3.19.178) 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, thus its definition should not have the keyword. This quiets the following sparse warning: function 'arch_unoptimize_kprobes' with external linkage has definition Signed-off-by: Qiheng Lin --- 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