Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp207059pxk; Thu, 17 Sep 2020 00:20:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgqlNupWz6QRIw0p+T+40dsNQrhvQXVUy37cO18/llY1Io8otrQ7CObrxyxCv1H1I0kZNZ X-Received: by 2002:a17:907:408e:: with SMTP id nt22mr21941725ejb.169.1600327202596; Thu, 17 Sep 2020 00:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600327202; cv=none; d=google.com; s=arc-20160816; b=RvTyJIgfOMAUNNMHqLg+XYrl+saDNI6U76G4nOZlg8zWgTbWngalbx6K9GFWWuO68k /7qkGjH+BvuygBAzOizMqwBTrHPlqdojhuUS9HjlYNdjEFj66a8LUhq7NqpRMrG7Cs69 rNWdKdbfRSkXqnp+PH4/2CX1SaB47k/ZoorWr42DiZCmgYykWwou1TOm/LAEtbeqsTLn IeuWM5vyCVoQkAmJyGVMl98m2x9yw5ZRD4TlA1DeMMXQu4acGkbQUkILFAjNZdwnlHuP fiVKG478I0DQ/owHfjN5XqmKaOxv/Le+Cm2UZ/ZWmzk2GGr4TabCi9bL5kuJowKmvdIr IbTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Jji0jJ2GXD5Q9+74Bzh4Uj7d/w52YUiRIE9rVTdz910=; b=zXECAqF8IzW3MWLucnoc2pUrEzpbzhn/aZstdcsOKYbnypzzUJGYbg/Jamn5A2Ufd/ XuVuVYYwvAP++hAPVp7FZQ6wSaxQDDU+0wmVWL4YVZdj1lpnQGZrxisolHTmAOFzdIO9 t4w0FURkQlGeh5veONtdGhXFcJHQrfTEaVuVMU/lDEdQoGvqMrl+R1NhoKu2KoiYrpIB IVxc0xq3Oe6PHiG+JkOtFMszdmcLQ9NWMw3G3H4NXH+wNGRFLXl+5nVqxbEjLPabW7FF MT5tzvNZskKR3yAMNzblEa1Z8naD2LQeW+8nHWAEdpxkOlPJfjhJgyl+dJGaW1qTgAzg ZTJg== 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si14359468edp.276.2020.09.17.00.19.39; Thu, 17 Sep 2020 00:20:02 -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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726241AbgIQHQM (ORCPT + 99 others); Thu, 17 Sep 2020 03:16:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:59314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbgIQHQK (ORCPT ); Thu, 17 Sep 2020 03:16:10 -0400 Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E05C82072E; Thu, 17 Sep 2020 07:16:08 +0000 (UTC) Date: Thu, 17 Sep 2020 10:16:05 +0300 From: Leon Romanovsky To: Herrington Cc: Richard Cochran , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ptp: mark symbols static where possible Message-ID: <20200917071605.GQ486552@unreal> References: <20200917022508.9732-1-hankinsea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200917022508.9732-1-hankinsea@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 10:25:08AM +0800, Herrington wrote: > We get 1 warning when building kernel with W=1: > drivers/ptp/ptp_pch.c:182:5: warning: no previous prototype for ‘pch_ch_control_read’ [-Wmissing-prototypes] > u32 pch_ch_control_read(struct pci_dev *pdev) > drivers/ptp/ptp_pch.c:193:6: warning: no previous prototype for ‘pch_ch_control_write’ [-Wmissing-prototypes] > void pch_ch_control_write(struct pci_dev *pdev, u32 val) > drivers/ptp/ptp_pch.c:201:5: warning: no previous prototype for ‘pch_ch_event_read’ [-Wmissing-prototypes] > u32 pch_ch_event_read(struct pci_dev *pdev) > drivers/ptp/ptp_pch.c:212:6: warning: no previous prototype for ‘pch_ch_event_write’ [-Wmissing-prototypes] > void pch_ch_event_write(struct pci_dev *pdev, u32 val) > drivers/ptp/ptp_pch.c:220:5: warning: no previous prototype for ‘pch_src_uuid_lo_read’ [-Wmissing-prototypes] > u32 pch_src_uuid_lo_read(struct pci_dev *pdev) > drivers/ptp/ptp_pch.c:231:5: warning: no previous prototype for ‘pch_src_uuid_hi_read’ [-Wmissing-prototypes] > u32 pch_src_uuid_hi_read(struct pci_dev *pdev) > drivers/ptp/ptp_pch.c:242:5: warning: no previous prototype for ‘pch_rx_snap_read’ [-Wmissing-prototypes] > u64 pch_rx_snap_read(struct pci_dev *pdev) > drivers/ptp/ptp_pch.c:259:5: warning: no previous prototype for ‘pch_tx_snap_read’ [-Wmissing-prototypes] > u64 pch_tx_snap_read(struct pci_dev *pdev) > drivers/ptp/ptp_pch.c:300:5: warning: no previous prototype for ‘pch_set_station_address’ [-Wmissing-prototypes] > int pch_set_station_address(u8 *addr, struct pci_dev *pdev) > > Signed-off-by: Herrington > --- > drivers/ptp/ptp_pch.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) This file is total mess. > > diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c > index ce10ecd41ba0..8db2d1893577 100644 > --- a/drivers/ptp/ptp_pch.c > +++ b/drivers/ptp/ptp_pch.c > @@ -179,7 +179,7 @@ static inline void pch_block_reset(struct pch_dev *chip) > iowrite32(val, (&chip->regs->control)); > } > > -u32 pch_ch_control_read(struct pci_dev *pdev) > +static u32 pch_ch_control_read(struct pci_dev *pdev) > { > struct pch_dev *chip = pci_get_drvdata(pdev); > u32 val; > @@ -190,7 +190,7 @@ u32 pch_ch_control_read(struct pci_dev *pdev) > } > EXPORT_SYMBOL(pch_ch_control_read); This function is not used and can be deleted. > > -void pch_ch_control_write(struct pci_dev *pdev, u32 val) > +static void pch_ch_control_write(struct pci_dev *pdev, u32 val) > { > struct pch_dev *chip = pci_get_drvdata(pdev); > > @@ -198,7 +198,7 @@ void pch_ch_control_write(struct pci_dev *pdev, u32 val) > } > EXPORT_SYMBOL(pch_ch_control_write); This function in use (incorrectly) by drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Your patch will break it. I didn't check other functions, but assume they are broken too. Thanks