From: Leon Romanovsky <leonro@nvidia.com>
To: Herrington <hankinsea@gmail.com>
Cc: Richard Cochran <richardcochran@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ptp: mark symbols static where possible
Date: Thu, 17 Sep 2020 10:16:05 +0300 [thread overview]
Message-ID: <20200917071605.GQ486552@unreal> (raw)
In-Reply-To: <20200917022508.9732-1-hankinsea@gmail.com>
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 <hankinsea@gmail.com>
> ---
> 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
next prev parent reply other threads:[~2020-09-17 7:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 2:25 [PATCH] ptp: mark symbols static where possible Herrington
2020-09-17 7:16 ` Leon Romanovsky [this message]
2020-09-17 19:38 ` Jacob Keller
2020-09-17 9:24 ` kernel test robot
2020-09-17 9:24 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200917071605.GQ486552@unreal \
--to=leonro@nvidia.com \
--cc=hankinsea@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.