Amit Cohen 12e091389b mlxsw: spectrum_ptp: Fix compilation warnings
In case that 'CONFIG_PTP_1588_CLOCK' is not enabled in the config file,
there are implementations for the functions
mlxsw_{sp,sp2}_ptp_txhdr_construct() as part of 'spectrum_ptp.h'. In this
case, they should be defined as 'static' as they are not supposed to be
used out of this file. Make the functions 'static', otherwise the following
warnings are returned:

"warning: no previous prototype for 'mlxsw_sp_ptp_txhdr_construct'"
"warning: no previous prototype for 'mlxsw_sp2_ptp_txhdr_construct'"

In addition, make the functions 'inline' for case that 'spectrum_ptp.h'
will be included anywhere else and the functions would probably not be
used, so compilation warnings about unused static will be returned.

Fixes: 24157bc69f45 ("mlxsw: Send PTP packets as data packets to overcome a limitation")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-08-15 11:49:58 +01:00
..
2022-08-11 13:26:09 -07:00
2022-08-06 16:38:17 -07:00
2022-08-04 12:12:54 -07:00
2022-08-04 12:12:54 -07:00
2022-08-06 17:05:21 -07:00
2022-08-04 19:30:35 -07:00
2022-08-04 19:30:35 -07:00
2022-08-03 19:52:08 -07:00
2022-08-06 16:38:17 -07:00
2022-08-04 18:34:05 -07:00
2022-08-04 18:19:14 -07:00
2022-08-05 10:07:23 -07:00
2022-08-06 16:38:17 -07:00
2022-08-06 10:56:45 -07:00
2022-08-07 17:52:35 -07:00
2022-08-04 19:41:09 -07:00
2022-08-06 10:25:16 -07:00
2022-08-04 19:41:09 -07:00
2022-08-05 14:13:45 -07:00
2022-08-10 11:07:26 -07:00
2022-08-06 10:56:45 -07:00
2022-08-04 12:12:54 -07:00
2022-08-03 17:49:38 +02:00
2022-08-10 11:07:26 -07:00
2022-08-04 19:30:35 -07:00
2022-08-04 18:19:14 -07:00
2022-08-04 18:19:14 -07:00
2022-08-04 12:12:54 -07:00
2022-08-04 12:12:54 -07:00
2022-08-05 10:02:33 -07:00
2022-08-06 16:38:17 -07:00
2022-08-06 10:19:51 -07:00
2022-08-06 16:38:17 -07:00
2022-08-04 19:47:37 -07:00
2022-08-04 19:47:37 -07:00
2022-08-06 08:59:35 -07:00
2022-08-08 15:04:04 -07:00
2022-08-04 12:01:42 -07:00