summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2016-04-13 03:08:28 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-05-01 17:05:06 -0700
commitcdc3d93257e162dd12906a6e0207436c2d5c6873 (patch)
tree2bf6f56dfaa1a3cd9bdf00f983dc35e94080f760 /drivers
parent3ed439c56e0d82fd08275fff2c21278f92ed8ec5 (diff)
i40e: PTP - avoid aggregate return warnings
Aggregate return warnings are when struct types are returned and must be copied to the lvalue with a struct copy by the compiler. This fixes warnings of type aggregate-return from gcc with W=2. Change-Id: I896b1bf514544bf0faeb458869d79914b9f1b168 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ptp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index 565ca7c835bc..a1b878abd5b0 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
@@ -158,9 +158,10 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
{
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
- struct timespec64 now, then = ns_to_timespec64(delta);
+ struct timespec64 now, then;
unsigned long flags;
+ then = ns_to_timespec64(delta);
spin_lock_irqsave(&pf->tmreg_lock, flags);
i40e_ptp_read(pf, &now);