[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150331214815.GA9233@localhost.localdomain>
Date: Tue, 31 Mar 2015 23:48:15 +0200
From: Richard Cochran <richardcochran@...il.com>
To: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Amir Vadai <amirv@...lanox.com>,
Ariel Elior <ariel.elior@...gic.com>,
Arnd Bergmann <arnd@...aro.org>,
Baolin Wang <baolin.wang@...aro.org>,
Ben Hutchings <ben@...adent.org.uk>,
Bruce Allan <bruce.w.allan@...el.com>,
Carolyn Wyborny <carolyn.wyborny@...el.com>,
Chris Metcalf <cmetcalf@...hip.com>,
David Miller <davem@...emloft.net>,
Frank Li <Frank.Li@...escale.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Jacob Keller <jacob.e.keller@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
John Stultz <john.stultz@...aro.org>,
Luwei Zhou <b45643@...escale.com>,
Matthew Vick <matthew.vick@...el.com>,
Michael Chan <mchan@...adcom.com>,
Prashant Sreedharan <prashant@...adcom.com>,
Rayagond K <rayagond@...avyalabs.com>,
Shradha Shah <sshah@...arflare.com>,
Solarflare linux maintainers <linux-net-drivers@...arflare.com>,
Sonic Zhang <sonic.zhang@...log.com>,
Stefan Sørensen
<stefan.sorensen@...ctralink.com>,
Thomas Gleixner <tglx@...utronix.de>,
Tom Lendacky <thomas.lendacky@....com>
Subject: Re: [PATCH net-next V3 10/23] ptp: e1000e: convert to the 64 bit
get/set time methods.
On Sun, Mar 29, 2015 at 11:12:00PM +0200, Richard Cochran wrote:
> @@ -171,11 +171,11 @@ static void e1000e_systim_overflow_work(struct work_struct *work)
> struct e1000_adapter *adapter = container_of(work, struct e1000_adapter,
> systim_overflow_work.work);
> struct e1000_hw *hw = &adapter->hw;
> - struct timespec ts;
> + struct timespec64 ts;
>
> - adapter->ptp_clock_info.gettime(&adapter->ptp_clock_info, &ts);
> + adapter->ptp_clock_info.gettime64(&adapter->ptp_clock_info, &ts);
>
> - e_dbg("SYSTIM overflow check at %ld.%09lu\n", ts.tv_sec, ts.tv_nsec);
> + e_dbg("SYSTIM overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec);
On a 64 bit build, this triggers a new warning.
drivers/net/ethernet/intel/e1000e/ptp.c: In function ‘e1000e_systim_overflow_work’:
drivers/net/ethernet/intel/e1000e/ptp.c:176:2: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘__kernel_time_t’ [-Wformat]
On 32 bit, timespec64.tv_sec is of type 'time64_t' or '__s64'.
On 64 bit, timespec64.tv_sec is of type '__kernel_time_t' or
'__kernel_long_t' or 'long'.
How are we supposed to print that field? With a cast?
Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists