diff mbox series

[net-next] net: ice: ptp: fix compilation warning if PTP_1588_CLOCK is disabled

Message ID a4d2c3cd609708de38ca59b75e4eb7468750af47.1623766418.git.lorenzo@kernel.org (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ice: ptp: fix compilation warning if PTP_1588_CLOCK is disabled | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers fail 1 blamed authors not CCed: anthony.l.nguyen@intel.com; 5 maintainers not CCed: anthony.l.nguyen@intel.com intel-wired-lan@lists.osuosl.org jesse.brandeburg@intel.com davem@davemloft.net kuba@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Lorenzo Bianconi June 15, 2021, 2:14 p.m. UTC
Fix the following compilation warning if PTP_1588_CLOCK is not enabled

drivers/net/ethernet/intel/ice/ice_ptp.h:149:1:
   error: return type defaults to ‘int’ [-Werror=return-type]
   ice_ptp_request_ts(struct ice_ptp_tx *tx, struct sk_buff *skb)

Fixes: ea9b847cda647 ("ice: enable transmit timestamps for E810 devices")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/ethernet/intel/ice/ice_ptp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jacob Keller June 15, 2021, 7:10 p.m. UTC | #1
> -----Original Message-----
> From: Lorenzo Bianconi <lorenzo@kernel.org>
> Sent: Tuesday, June 15, 2021 7:14 AM
> To: netdev@vger.kernel.org
> Cc: lorenzo.bianconi@redhat.com; Keller, Jacob E <jacob.e.keller@intel.com>
> Subject: [PATCH net-next] net: ice: ptp: fix compilation warning if
> PTP_1588_CLOCK is disabled
> 
> Fix the following compilation warning if PTP_1588_CLOCK is not enabled
> 
> drivers/net/ethernet/intel/ice/ice_ptp.h:149:1:
>    error: return type defaults to ‘int’ [-Werror=return-type]
>    ice_ptp_request_ts(struct ice_ptp_tx *tx, struct sk_buff *skb)
> 
> Fixes: ea9b847cda647 ("ice: enable transmit timestamps for E810 devices")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>


Hah. Thanks. This is obviously correct.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

> ---
>  drivers/net/ethernet/intel/ice/ice_ptp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.h
> b/drivers/net/ethernet/intel/ice/ice_ptp.h
> index 41e14f98f0e6..d01507eba036 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp.h
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.h
> @@ -145,7 +145,7 @@ static inline int ice_get_ptp_clock_index(struct ice_pf *pf)
>  	return -1;
>  }
> 
> -static inline
> +static inline s8
>  ice_ptp_request_ts(struct ice_ptp_tx *tx, struct sk_buff *skb)
>  {
>  	return -1;
> --
> 2.31.1
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.h b/drivers/net/ethernet/intel/ice/ice_ptp.h
index 41e14f98f0e6..d01507eba036 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.h
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.h
@@ -145,7 +145,7 @@  static inline int ice_get_ptp_clock_index(struct ice_pf *pf)
 	return -1;
 }
 
-static inline
+static inline s8
 ice_ptp_request_ts(struct ice_ptp_tx *tx, struct sk_buff *skb)
 {
 	return -1;