Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1252353imm; Sun, 15 Jul 2018 03:11:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpemXBVNjOF3zFWchv/Gkjfq4YLGvXo0qHvgjcIkUU1UVcDP4GAzRfmG+++oqdbnKNnxIo7M X-Received: by 2002:a63:2ac4:: with SMTP id q187-v6mr5676761pgq.333.1531649480518; Sun, 15 Jul 2018 03:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531649480; cv=none; d=google.com; s=arc-20160816; b=MAg2bpPP+P908PepucnJYCxSdvHeTvWFubWLxCBxrRGSmyG4CeIqJb//aydLPpxMAw 2gel4bjlqN0X4+GKYmjQJsgJGCMx7LXXk5ngrd53t5NR/I9dIkwh6Bdqn0Fji3/olT6E +MAzWuRMX+RchYStP2oBQfo/px8OVRkzG11eiW5FT0exa/EPMXMYB6I6U7hgAtYz61PI 3/ROHAocz0vHRubOuP+0Y39zllj4B5Aby5Ds0eLlICh1piF+8GlBFeSotMGmiBl5mBcA PrYQNO960+ZolgAMvoliVqt9ODiQruKPyjs9leNX6zX3bWWHECdL2L96BnN6LZGFlUhS NYwg== 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:arc-authentication-results; bh=Pt1hL6QiFYJJL9ShqWmH1jBTAUcDQWnjxML9nyEQX9g=; b=kboG4Hnv0YgM3J80gSefwjIMDnkJQMByl1/NUIxN580z2j2TuPz5erSQkbT5T4puMA qy/9FUbZJEmj3uDK1+fWSchHuK2cXYBiaORS/5RZ3EE2+RgIghS6rSt5TyGUiwvMZd0+ d2d/h+Xj7FAqm269u6xKglTu3OnbY0m3lAuDp+lWdh2ISo2Th+MioECkXNfZialZe48x 0/HN6S5qYV6sVlY7TVg4oENyqmfNdDk9KYgYEJKpqP5rR2qHhcwaeKSXaMFfmeXyVILX nM3A+cYiDsiD1X1Nvg1hJBGeieH67r1ujRoxJbdSinn3K0yzmTNwcfq3ki/dZi7Pz+fE 52HA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f40-v6si28510480plb.504.2018.07.15.03.11.05; Sun, 15 Jul 2018 03:11:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbeGOKc6 (ORCPT + 99 others); Sun, 15 Jul 2018 06:32:58 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:9239 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726024AbeGOKc6 (ORCPT ); Sun, 15 Jul 2018 06:32:58 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 4DB87150B85D4; Sun, 15 Jul 2018 18:10:18 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.382.0; Sun, 15 Jul 2018 18:10:09 +0800 From: Shaokun Zhang To: CC: Shaokun Zhang , Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH] driver core: remove unnecessary function extern declare Date: Sun, 15 Jul 2018 18:08:56 +0800 Message-ID: <1531649336-20135-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org device_private_init is called only in core.c, extern declare is unnecessary and make it static. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Shaokun Zhang --- drivers/base/base.h | 2 -- drivers/base/core.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/base/base.h b/drivers/base/base.h index a75c302..7a419a7 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -84,8 +84,6 @@ struct device_private { #define to_device_private_bus(obj) \ container_of(obj, struct device_private, knode_bus) -extern int device_private_init(struct device *dev); - /* initialisation functions */ extern int devices_init(void); extern int buses_init(void); diff --git a/drivers/base/core.c b/drivers/base/core.c index df3e1a4..2ba30ce 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1736,7 +1736,7 @@ static void device_remove_sys_dev_entry(struct device *dev) } } -int device_private_init(struct device *dev) +static int device_private_init(struct device *dev) { dev->p = kzalloc(sizeof(*dev->p), GFP_KERNEL); if (!dev->p) -- 2.7.4