From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 07/15] i40e: PTP - avoid aggregate return warnings
Date: Sun, 1 May 2016 17:06:13 -0700 [thread overview]
Message-ID: <1462147581-135254-8-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1462147581-135254-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
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>
---
drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index 565ca7c..a1b878a 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);
--
2.5.5
next prev parent reply other threads:[~2016-05-02 0:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 0:06 [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2016-05-01 Jeff Kirsher
2016-05-02 0:06 ` [net-next 01/15] i40e: Change the default for VFs to be not privileged Jeff Kirsher
2016-05-02 0:06 ` [net-next 02/15] i40e: Limit the number of MAC and VLAN addresses that can be added for VFs Jeff Kirsher
2016-05-02 0:06 ` [net-next 03/15] i40e: Prevent falling to promiscuous if the VF is not trusted Jeff Kirsher
2016-05-02 0:06 ` [net-next 04/15] i40e: Remove HMC AQ API implementation Jeff Kirsher
2016-05-02 0:06 ` [net-next 05/15] i40evf: RSS Hash Option parameters Jeff Kirsher
2016-05-02 0:06 ` [net-next 06/15] i40e: Fix uninitialized variable Jeff Kirsher
2016-05-02 0:06 ` Jeff Kirsher [this message]
2016-05-02 0:06 ` [net-next 08/15] i40e: Use consistent type for vf_id Jeff Kirsher
2016-05-02 0:06 ` [net-next 09/15] i40e: Drop extra copy of function Jeff Kirsher
2016-05-02 0:06 ` [net-next 10/15] i40e: Update device ids for X722 Jeff Kirsher
2016-05-02 0:06 ` [net-next 11/15] i40e/i40evf : Bump driver version from 1.5.5 to 1.5.10 Jeff Kirsher
2016-05-02 0:06 ` [net-next 12/15] i40e/i40evf: fix I40E_MASK signed shift overflow warnings Jeff Kirsher
2016-05-02 0:06 ` [net-next 13/15] i40e: make use of BIT() macro to prevent left shift of signed values Jeff Kirsher
2016-05-02 0:06 ` [net-next 14/15] i40evf: make use of BIT() macro to avoid signed left shift Jeff Kirsher
2016-05-02 0:06 ` [net-next 15/15] i40e/i40evf: Add support for GSO partial with UDP_TUNNEL_CSUM and GRE_CSUM Jeff Kirsher
2016-05-02 3:39 ` [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2016-05-01 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462147581-135254-8-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=jesse.brandeburg@intel.com \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).