From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rashika Kheria Subject: =?UTF-8?q?=5BPATCH=5D=20drivers=3A=20ptp=3A=20Include=20new=20header=20file=20in=20ptp=5Fpch=2Ec?= Date: Mon, 16 Dec 2013 02:14:15 +0530 Message-ID: <1387140255-11797-1-git-send-email-rashika.kheria@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE To: linux-kernel@vger.kernel.org, Richard Cochran , Darren Hart , "David S. Miller" , Joe Perches , Andy Shevchenko , Veaceslav Falico , netdev@vger.kernel.org, josh@joshtriplett.org Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Create a new header file include/linux/ptp_pch.h which contains prototype declaration of functions pch_ch_control_read(), pch_ch_control_write(), pch_ch_event_read(), pch_ch_event_write(), pch_src_uuid_lo_read(), pch_src_uuid_hi_read(), pch_rx_snap_read(), pch_tx_snap_read() and pch_set_station_address(). Include the new header file in drivers/ptp/ptp_pch.c and drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c because they use these functions. Remove these functions prototypes from header file drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h. This eliminates the following warnings in ptp_pch.c: drivers/ptp/ptp_pch.c:194:5: warning: no previous prototype for =E2=80=98= pch_ch_control_read=E2=80=99 [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:205:6: warning: no previous prototype for =E2=80=98= pch_ch_control_write=E2=80=99 [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:213:5: warning: no previous prototype for =E2=80=98= pch_ch_event_read=E2=80=99 [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:224:6: warning: no previous prototype for =E2=80=98= pch_ch_event_write=E2=80=99 [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:232:5: warning: no previous prototype for =E2=80=98= pch_src_uuid_lo_read=E2=80=99 [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:243:5: warning: no previous prototype for =E2=80=98= pch_src_uuid_hi_read=E2=80=99 [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:254:5: warning: no previous prototype for =E2=80=98= pch_rx_snap_read=E2=80=99 [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:271:5: warning: no previous prototype for =E2=80=98= pch_tx_snap_read=E2=80=99 [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:312:5: warning: no previous prototype for =E2=80=98= pch_set_station_address=E2=80=99 [-Wmissing-prototypes] Signed-off-by: Rashika Kheria --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h | 9 --------- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 1 + drivers/ptp/ptp_pch.c | 1 + include/linux/ptp_pch.h | 16 ++++++++++++= ++++ 4 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 include/linux/ptp_pch.h diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h b/drivers/= net/ethernet/oki-semi/pch_gbe/pch_gbe.h index 2a900307..79533c8 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h @@ -666,15 +666,6 @@ void pch_gbe_free_tx_resources(struct pch_gbe_adap= ter *adapter, void pch_gbe_free_rx_resources(struct pch_gbe_adapter *adapter, struct pch_gbe_rx_ring *rx_ring); void pch_gbe_update_stats(struct pch_gbe_adapter *adapter); -u32 pch_ch_control_read(struct pci_dev *pdev); -void pch_ch_control_write(struct pci_dev *pdev, u32 val); -u32 pch_ch_event_read(struct pci_dev *pdev); -void pch_ch_event_write(struct pci_dev *pdev, u32 val); -u32 pch_src_uuid_lo_read(struct pci_dev *pdev); -u32 pch_src_uuid_hi_read(struct pci_dev *pdev); -u64 pch_rx_snap_read(struct pci_dev *pdev); -u64 pch_tx_snap_read(struct pci_dev *pdev); -int pch_set_station_address(u8 *addr, struct pci_dev *pdev); =20 /* pch_gbe_param.c */ void pch_gbe_check_options(struct pch_gbe_adapter *adapter); diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/dri= vers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 27ffe0e..03e2c14 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -24,6 +24,7 @@ #include #include #include +#include =20 #define DRV_VERSION "1.01" const char pch_driver_version[] =3D DRV_VERSION; diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c index 71a2559..ec5cf7d 100644 --- a/drivers/ptp/ptp_pch.c +++ b/drivers/ptp/ptp_pch.c @@ -20,6 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-130= 7, USA. */ =20 +#include #include #include #include diff --git a/include/linux/ptp_pch.h b/include/linux/ptp_pch.h new file mode 100644 index 0000000..bd23d53 --- /dev/null +++ b/include/linux/ptp_pch.h @@ -0,0 +1,16 @@ +#include +#include + +/* Function prototype declaration common between + * drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c and + * drivers/ptp/ptp_pch.c.*/ + +u32 pch_ch_control_read(struct pci_dev *pdev); +void pch_ch_control_write(struct pci_dev *pdev, u32 val); +u32 pch_ch_event_read(struct pci_dev *pdev); +void pch_ch_event_write(struct pci_dev *pdev, u32 val); +u32 pch_src_uuid_lo_read(struct pci_dev *pdev); +u32 pch_src_uuid_hi_read(struct pci_dev *pdev); +u64 pch_rx_snap_read(struct pci_dev *pdev); +u64 pch_tx_snap_read(struct pci_dev *pdev); +int pch_set_station_address(u8 *addr, struct pci_dev *pdev); --=20 1.7.9.5