From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752083Ab3LOUpA (ORCPT ); Sun, 15 Dec 2013 15:45:00 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:60722 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821Ab3LOUo6 (ORCPT ); Sun, 15 Dec 2013 15:44:58 -0500 From: Rashika Kheria 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 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> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 ‘pch_ch_control_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:205:6: warning: no previous prototype for ‘pch_ch_control_write’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:213:5: warning: no previous prototype for ‘pch_ch_event_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:224:6: warning: no previous prototype for ‘pch_ch_event_write’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:232:5: warning: no previous prototype for ‘pch_src_uuid_lo_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:243:5: warning: no previous prototype for ‘pch_src_uuid_hi_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:254:5: warning: no previous prototype for ‘pch_rx_snap_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:271:5: warning: no previous prototype for ‘pch_tx_snap_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:312:5: warning: no previous prototype for ‘pch_set_station_address’ [-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_adapter *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); /* 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/drivers/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 #define DRV_VERSION "1.01" const char pch_driver_version[] = 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-1307, USA. */ +#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); -- 1.7.9.5