Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ptp_pch: Move 'pch_*()' prototypes to shared header

Fixes the following W=1 kernel build warning(s):

drivers/ptp/ptp_pch.c:193:6: warning: no previous prototype for ‘pch_ch_control_write’ [-Wmissing-prototypes]
drivers/ptp/ptp_pch.c:201:5: warning: no previous prototype for ‘pch_ch_event_read’ [-Wmissing-prototypes]
drivers/ptp/ptp_pch.c:212:6: warning: no previous prototype for ‘pch_ch_event_write’ [-Wmissing-prototypes]
drivers/ptp/ptp_pch.c:220:5: warning: no previous prototype for ‘pch_src_uuid_lo_read’ [-Wmissing-prototypes]
drivers/ptp/ptp_pch.c:231:5: warning: no previous prototype for ‘pch_src_uuid_hi_read’ [-Wmissing-prototypes]
drivers/ptp/ptp_pch.c:242:5: warning: no previous prototype for ‘pch_rx_snap_read’ [-Wmissing-prototypes]
drivers/ptp/ptp_pch.c:259:5: warning: no previous prototype for ‘pch_tx_snap_read’ [-Wmissing-prototypes]
drivers/ptp/ptp_pch.c:300:5: warning: no previous prototype for ‘pch_set_station_address’ [-Wmissing-prototypes]

Cc: Richard Cochran <richardcochran@gmail.com> (maintainer:PTP HARDWARE CLOCK SUPPORT)
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Flavio Suligoi <f.suligoi@asem.it>
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Lee Jones and committed by
David S. Miller
f90fc37f 257382c5

+24 -8
-8
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h
··· 612 612 void pch_gbe_free_rx_resources(struct pch_gbe_adapter *adapter, 613 613 struct pch_gbe_rx_ring *rx_ring); 614 614 void pch_gbe_update_stats(struct pch_gbe_adapter *adapter); 615 - void pch_ch_control_write(struct pci_dev *pdev, u32 val); 616 - u32 pch_ch_event_read(struct pci_dev *pdev); 617 - void pch_ch_event_write(struct pci_dev *pdev, u32 val); 618 - u32 pch_src_uuid_lo_read(struct pci_dev *pdev); 619 - u32 pch_src_uuid_hi_read(struct pci_dev *pdev); 620 - u64 pch_rx_snap_read(struct pci_dev *pdev); 621 - u64 pch_tx_snap_read(struct pci_dev *pdev); 622 - int pch_set_station_address(u8 *addr, struct pci_dev *pdev); 623 615 624 616 /* pch_gbe_param.c */ 625 617 void pch_gbe_check_options(struct pch_gbe_adapter *adapter);
+1
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/net_tstamp.h> 13 13 #include <linux/ptp_classify.h> 14 + #include <linux/ptp_pch.h> 14 15 #include <linux/gpio.h> 15 16 16 17 #define DRV_VERSION "1.01"
+1
drivers/ptp/ptp_pch.c
··· 18 18 #include <linux/module.h> 19 19 #include <linux/pci.h> 20 20 #include <linux/ptp_clock_kernel.h> 21 + #include <linux/ptp_pch.h> 21 22 #include <linux/slab.h> 22 23 23 24 #define STATION_ADDR_LEN 20
+22
include/linux/ptp_pch.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 + /* 3 + * PTP PCH 4 + * 5 + * Copyright 2019 Linaro Ltd. 6 + * 7 + * Author Lee Jones <lee.jones@linaro.org> 8 + */ 9 + 10 + #ifndef _PTP_PCH_H_ 11 + #define _PTP_PCH_H_ 12 + 13 + void pch_ch_control_write(struct pci_dev *pdev, u32 val); 14 + u32 pch_ch_event_read(struct pci_dev *pdev); 15 + void pch_ch_event_write(struct pci_dev *pdev, u32 val); 16 + u32 pch_src_uuid_lo_read(struct pci_dev *pdev); 17 + u32 pch_src_uuid_hi_read(struct pci_dev *pdev); 18 + u64 pch_rx_snap_read(struct pci_dev *pdev); 19 + u64 pch_tx_snap_read(struct pci_dev *pdev); 20 + int pch_set_station_address(u8 *addr, struct pci_dev *pdev); 21 + 22 + #endif /* _PTP_PCH_H_ */