From patchwork Fri Mar 24 12:27:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 74520 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp598264vqo; Fri, 24 Mar 2023 05:50:57 -0700 (PDT) X-Google-Smtp-Source: AKy350ZeF4jKYofdMtWPcYww+ZHRPkTr/ljN7vOblJDOdLoqilGID7movQD/gi4bdRKR3LAln1tF X-Received: by 2002:a62:1948:0:b0:627:f740:51f9 with SMTP id 69-20020a621948000000b00627f74051f9mr2351167pfz.3.1679662257646; Fri, 24 Mar 2023 05:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679662257; cv=none; d=google.com; s=arc-20160816; b=uS5exavLCEcoq5z3Ke4nikI8oXvuUplYiohismjl3OhkV/bDfi/5VRaVfbL3uFFkjK ZPl9YyTSMwLZl44G7Qnx/F4t46MrbfMFQB1W70ZgPrrSWj07MysgZVEwwgGYLW2aXjSN 1p3gZ6ZZsJhkiHtdquCQH+K8fmy959xNAlXNIK249vxoMRv3q23rrSBY4q0pkQtHp/KH pSw4H4t+4bJQodu2l6Ya0+NU79KQhue2d6w++FMb1lR/oSG3ukNQyS93RPguTZB52O98 ypeEoEvTWMkwkr9DZ3ca1WYw0PiIeoB1rUdnuqip50+pFQ+nYjNCi0Q2gl5UCb5nWdYn wjwA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ADCk/pHdn0hLRl+OdrNu75/WXRVL7Rc+Tiy8k36q+1M=; b=D3pLssC65K2m21LtYxsb0HG65xGHxC8gcNR2Ru9IcF2n5/ufHwcE1lnyjDft2wR+99 AVIpX+F71c+ny0ibajGa42nB0lu6AydMEDY4hTapxZiUmAFWvZoB+z7opHa0n9skgB8t bFMgeVEPzLuzEH9ZFqGBBukN8Ymy+X9kf309BWGfMKsnFuwn/ZhtnAWcEDKPo6toaMgF gYBZJnAKdNmpwG6HY4qDcEnWq6IOXlVAWtJQiFb0S34ToASXM6T2fu0VFHacRhjXFG// Pjv7yeszcvCrUjbd3hfVentHTN0JAjL1mHIXW7hX501EWRZYNm72E9ZmhTdSfumKsfPr ko6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DxHxDgbU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fa16-20020a056a002d1000b0062505afda08si22130719pfb.113.2023.03.24.05.50.45; Fri, 24 Mar 2023 05:50:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DxHxDgbU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231926AbjCXM1d (ORCPT + 99 others); Fri, 24 Mar 2023 08:27:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231906AbjCXM12 (ORCPT ); Fri, 24 Mar 2023 08:27:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21FDF244BC for ; Fri, 24 Mar 2023 05:27:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A667662A94 for ; Fri, 24 Mar 2023 12:27:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 976B1C4339C; Fri, 24 Mar 2023 12:27:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1679660844; bh=Ba5v5E23etqC18T6sxALRRUecTgwNf99pEvvSfDejN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DxHxDgbUTnXK2UsSrL5v5ziLBeFO0fQvlOImIoxM/lL1rmwRtIMfNVuG4UFcP5Yyq SLznbASoBJES0GRdri9etmUIFpl6kLKTkboEH4VFztxPhbhm1Od9ccSMCxdnBRIxxs Xjd9ygbRqM5GJ19WxZs4qsMjslysyzVvuGRnndEk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH 3/6] driver core: driver.h: remove extern from function prototypes Date: Fri, 24 Mar 2023 13:27:08 +0100 Message-Id: <20230324122711.2664537-3-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230324122711.2664537-1-gregkh@linuxfoundation.org> References: <20230324122711.2664537-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2573; i=gregkh@linuxfoundation.org; h=from:subject; bh=Ba5v5E23etqC18T6sxALRRUecTgwNf99pEvvSfDejN8=; b=owGbwMvMwCRo6H6F97bub03G02pJDCmy0+X+t9Y/m6vgzF9mE7/+8aapwct27rQ+e1DrWu6/+ XteRlhZdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEXNIZZrPznfEQyFPd1G4b lNLwJpifTfTEM4b5LjXmruzGa3Vi/8tECjdyt/L92TMLAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761253531351488654?= X-GMAIL-MSGID: =?utf-8?q?1761253531351488654?= The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from include/linux/device/driver.h as they are not needed. Cc: "Rafael J. Wysocki" Signed-off-by: Greg Kroah-Hartman --- include/linux/device/driver.h | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h index 0f22a6f46f8c..c244267a6744 100644 --- a/include/linux/device/driver.h +++ b/include/linux/device/driver.h @@ -122,13 +122,12 @@ struct device_driver { }; -extern int __must_check driver_register(struct device_driver *drv); -extern void driver_unregister(struct device_driver *drv); +int __must_check driver_register(struct device_driver *drv); +void driver_unregister(struct device_driver *drv); -extern struct device_driver *driver_find(const char *name, - const struct bus_type *bus); -extern int driver_probe_done(void); -extern void wait_for_device_probe(void); +struct device_driver *driver_find(const char *name, const struct bus_type *bus); +int driver_probe_done(void); +void wait_for_device_probe(void); void __init wait_for_init_devices_probe(void); /* sysfs interface for exporting driver attributes */ @@ -147,18 +146,15 @@ struct driver_attribute { #define DRIVER_ATTR_WO(_name) \ struct driver_attribute driver_attr_##_name = __ATTR_WO(_name) -extern int __must_check driver_create_file(struct device_driver *driver, - const struct driver_attribute *attr); -extern void driver_remove_file(struct device_driver *driver, - const struct driver_attribute *attr); +int __must_check driver_create_file(struct device_driver *driver, + const struct driver_attribute *attr); +void driver_remove_file(struct device_driver *driver, + const struct driver_attribute *attr); int driver_set_override(struct device *dev, const char **override, const char *s, size_t len); -extern int __must_check driver_for_each_device(struct device_driver *drv, - struct device *start, - void *data, - int (*fn)(struct device *dev, - void *)); +int __must_check driver_for_each_device(struct device_driver *drv, struct device *start, + void *data, int (*fn)(struct device *dev, void *)); struct device *driver_find_device(struct device_driver *drv, struct device *start, const void *data, int (*match)(struct device *dev, const void *data));