Rid W=1 warnings from PTP
Subsystems (3)
cover Rid W=1 warnings from PTP
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.
Lee Jones (4):
ptp_pch: Remove unused function 'pch_ch_control_read()'
ptp_pch: Move 'pch_*()' prototypes to shared header
ptp: ptp_clockmatrix: Demote non-kernel-doc header to standard comment
ptp: ptp_p: Demote non-conformant kernel-doc headers and supply a
param description
.../net/ethernet/oki-semi/pch_gbe/pch_gbe.h | 9 -------- .../ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 1 + drivers/ptp/ptp_clockmatrix.c | 4 ++-- drivers/ptp/ptp_pch.c | 21 ++++++------------ include/linux/ptp_pch.h | 22 +++++++++++++++++++ 5 files changed, 32 insertions(+), 25 deletions(-) create mode 100644 include/linux/ptp_pch.h
Signature · 1 line
2.27.0
PATCH 1/4 ptp_pch: Remove unused function 'pch_ch_control_read()'
Fixes the following W=1 kernel build warning(s):
drivers/ptp/ptp_pch.c:182:5: warning: no previous prototype for ‘pch_ch_control_read’ [-Wmissing-prototypes]
--- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h | 1 - drivers/ptp/ptp_pch.c | 11 ----------- 2 files changed, 12 deletions(-)
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h +0 -1
@@ -612,7 +612,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);
drivers/ptp/ptp_pch.c +0 -11
@@ -179,17 +179,6 @@ static inline void pch_block_reset(struct pch_dev *chip)iowrite32 (val, (&chip->regs->control)); } -u32 pch_ch_control_read (struct pci_dev *pdev) -{ -struct pch_dev *chip =pci_get_drvdata (pdev); -u32 val; - - val =ioread32 (&chip->regs->ch_control); - -return val; -} -EXPORT_SYMBOL (pch_ch_control_read); -void pch_ch_control_write (struct pci_dev *pdev,u32 val) {struct pch_dev *chip =pci_get_drvdata (pdev);
Signature · 1 line
2.27.0
PATCH 2/4 ptp_pch: Move 'pch_*()' prototypes to shared header
In reply to Lee JonesFixes 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]
--- .../net/ethernet/oki-semi/pch_gbe/pch_gbe.h | 8 ------- .../ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 1 + drivers/ptp/ptp_pch.c | 1 + include/linux/ptp_pch.h | 22 +++++++++++++++++++ 4 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 include/linux/ptp_pch.h
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h +0 -8
@@ -612,14 +612,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); -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);
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +1 -0
@@ -11,6 +11,7 @@#include <linux/module.h> #include <linux/net_tstamp.h> #include <linux/ptp_classify.h> +#include <linux/ptp_pch.h> #include <linux/gpio.h> #define DRV_VERSION "1.01"
drivers/ptp/ptp_pch.c +1 -0
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/pci.h> #include <linux/ptp_clock_kernel.h> +#include <linux/ptp_pch.h> #include <linux/slab.h> #define STATION_ADDR_LEN 20
include/linux/ptp_pch.h new file +22 -0
@@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* PTP PCH +* +* Copyright 2019 Linaro Ltd. +* +* Author Lee Jones <[email protected]> +*/ + +#ifndef _PTP_PCH_H_ +#define _PTP_PCH_H_ + +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); + +#endif /* _PTP_PCH_H_ */
Signature · 1 line
2.27.0
PATCH 3/4 ptp: ptp_clockmatrix: Demote non-kernel-doc header to standard comment
In reply to Lee JonesFixes the following W=1 kernel build warning(s):
drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds
--- drivers/ptp/ptp_clockmatrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ptp/ptp_clockmatrix.c +2 -2
@@ -1404,8 +1404,8 @@ static int idtcm_set_pll_mode(struct idtcm_channel *channel,/* PTP Hardware Clock interface */ -/** -* @brief Maximum absolute value for write phase offset in picoseconds +/* +* Maximum absolute value for write phase offset in picoseconds * * Destination signed register is 32-bit register in resolution of 50ps *
Signature · 1 line
2.27.0
PATCH 4/4 ptp: ptp_p: Demote non-conformant kernel-doc headers and supply a param description
In reply to Lee JonesFixes the following W=1 kernel build warning(s):
drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'control' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'event' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'addend' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'accum' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'test' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ts_compare' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'rsystime_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'rsystime_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'systime_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'systime_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'trgt_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'trgt_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'asms_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'asms_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'amms_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'amms_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ch_control' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ch_event' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'tx_snap_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'tx_snap_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'rx_snap_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'rx_snap_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'src_uuid_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'src_uuid_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'can_status' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'can_snap_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'can_snap_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ts_sel' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ts_st' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'reserve1' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'stl_max_set_en' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'stl_max_set' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'reserve2' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'srst' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'regs' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'ptp_clock' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'caps' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'exts0_enabled' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'exts1_enabled' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'mem_base' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'mem_size' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'irq' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'pdev' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'register_lock' not described in 'pch_dev' drivers/ptp/ptp_pch.c:128: warning: Function parameter or member 'station' not described in 'pch_params' drivers/ptp/ptp_pch.c:291: warning: Function parameter or member 'pdev' not described in 'pch_set_station_address'
--- drivers/ptp/ptp_pch.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/ptp/ptp_pch.c +6 -3
@@ -37,7 +37,8 @@ enum pch_status {PCH_FAILED , PCH_UNSUPPORTED, }; -/** + +/* * struct pch_ts_regs - IEEE 1588 registers */ struct pch_ts_regs {
@@ -103,7 +104,8 @@ struct pch_ts_regs {#define PCH_IEEE1588_ETH (1 << 0)#define PCH_IEEE1588_CAN (1 << 1) -/** + +/* * struct pch_dev - Driver private data */ struct pch_dev {
@@ -120,7 +122,7 @@ struct pch_dev {spinlock_t register_lock; }; -/** +/* * struct pch_params - 1588 module parameter */ struct pch_params {
@@ -286,6 +288,7 @@ static void pch_reset(struct pch_dev *chip)* IEEE 1588 hardware when looking at PTP * traffic on the ethernet interface * @addr: dress which contain the column separated address to be used. +* @pdev: PCI device. */ int pch_set_station_address (u8 *addr,struct pci_dev *pdev) {
Signature · 1 line
2.27.0
Quoted 10 lines · Lee Jones
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings.
Lee Jones (4):
ptp_pch: Remove unused function 'pch_ch_control_read()'
ptp_pch: Move 'pch_*()' prototypes to shared header
ptp:ptp_clockmatrix: Demote non-kernel-doc header to standard comment
ptp:ptp_p: Demote non-conformant kernel-doc headers and supply a
param description
For the series: