Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032769AbbKENfJ (ORCPT ); Thu, 5 Nov 2015 08:35:09 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:43272 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031373AbbKENfI (ORCPT ); Thu, 5 Nov 2015 08:35:08 -0500 X-Envelope-From: stefanr@s5r6.in-berlin.de Date: Thu, 5 Nov 2015 14:34:48 +0100 From: Stefan Richter To: Arnd Bergmann , Amitoj Kaur Chawla Cc: outreachy-kernel@googlegroups.com, linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, y2038@lists.linaro.org Subject: Re: [Outreachy kernel] [PATCH v2] firewire: Replace timeval with timespec64 Message-ID: <20151105143448.302d85e9@kant> In-Reply-To: <7551827.VsyUKdOpMQ@wuerfel> References: <20151021223500.GA26701@amitoj-Inspiron-3542> <7551827.VsyUKdOpMQ@wuerfel> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/qjINfcS.7OJkx3.n+B2qK2c"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3675 Lines: 102 --Sig_/qjINfcS.7OJkx3.n+B2qK2c Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Oct 22 Arnd Bergmann wrote: > On Thursday 22 October 2015 04:05:00 Amitoj Kaur Chawla wrote: > > 32 bit systems using 'struct timeval' will break in the year 2038, so > > we replace the code appropriately. However, this driver is not broken > > in 2038 since we are using only the microseconds portion of the > > current time. > >=20 > > This patch replaces timeval with timespec64. > >=20 > > Signed-off-by: Amitoj Kaur Chawla >=20 > Reviewed-by: Arnd Bergmann >=20 > (adding the y2038 mailing list as well) Committed to linux1394.git. Arnd, do you have special y2038 plans that make it desirable to have this merged before v4.4? Otherwise I would submit it for v4.5-rc1. > > Changes in v2: > > -Replaced timespec with timspec64 > > -Modified commit message > > -Used ktime_get_real_ts64() instead of getnstimeofday64() > >=20 > > drivers/firewire/nosy.c | 10 ++++++---- > > 1 file changed, 6 insertions(+), 4 deletions(-) > >=20 > > diff --git a/drivers/firewire/nosy.c b/drivers/firewire/nosy.c > > index 76b2d39..8a46077 100644 > > --- a/drivers/firewire/nosy.c > > +++ b/drivers/firewire/nosy.c > > @@ -33,6 +33,7 @@ > > #include /* required for linux/wait.h */ > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -413,17 +414,18 @@ static void > > packet_irq_handler(struct pcilynx *lynx) > > { > > struct client *client; > > - u32 tcode_mask, tcode; > > + u32 tcode_mask, tcode, timestamp; > > size_t length; > > - struct timeval tv; > > + struct timespec64 ts64; > > =20 > > /* FIXME: Also report rcv_speed. */ > > =20 > > length =3D __le32_to_cpu(lynx->rcv_pcl->pcl_status) & 0x00001fff; > > tcode =3D __le32_to_cpu(lynx->rcv_buffer[1]) >> 4 & 0xf; > > =20 > > - do_gettimeofday(&tv); > > - lynx->rcv_buffer[0] =3D (__force __le32)tv.tv_usec; > > + ktime_get_real_ts64(&ts64); > > + timestamp =3D ts64.tv_nsec / NSEC_PER_USEC; > > + lynx->rcv_buffer[0] =3D (__force __le32)timestamp; > > =20 > > if (length =3D=3D PHY_PACKET_SIZE) > > tcode_mask =3D 1 << TCODE_PHY_PACKET; > >=20 >=20 --=20 Stefan Richter -=3D=3D=3D=3D=3D-=3D=3D=3D=3D=3D =3D-=3D=3D --=3D-=3D http://arcgraph.de/sr/ --Sig_/qjINfcS.7OJkx3.n+B2qK2c Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWO1r+AAoJEHnzb7JUXXnQrtUQAJhkQVPvn31j96tsmqpZKKmX oPpAL6WMZrD+wpcXTuG+kijzc/HTn7zUNUv0WucKCmX1v4FgCAhf9Lkl6/wVYgQd PMzFUNAH6BTFYPn611rVrAJzrfRVLKSQQX2a0CaxWtZdbYTzoYDoV8EbOI3Xg3yz ne78H/e1EYHfsNFnOFUr6kcoxBOk1aB8KISf/cy8tyhFMIHi9As5XnIcR5iOMK7E wsjzHU7o4Xh4kOfvoFdx00jh3Dxb59zjUq+XC84SKEgVEuNJfpIgPMca/h6SJgDA WrKAqe45HR2T1tCboxZXB/cj7g9Z+QYs9EBwkW9lR6kz2lHB3ehXJabQ7ILcbEvx hPUMGsTipJoZEzKomRhquuPwFO2DDMY3f00dxRBv0UKgtzf34URZGccZN7TK0bhS QOmegrPgwk5B85Bquwi5fqWTqCTWdeU3AU6ugbpmrMnXrM3t2DhDBzcQeGudk3td Dsl5gnVmXl3aS3JwIcLM/mE96ToggdcmCf6GaNkcz9GJKsvP9hM0ZN8cJgs2E9b8 oap9urUKiRyttHw2x6IhgsHzR/1/KJFq3I3o5PDxPB2MhBWbVD6m9ivHK2dg1mCF mWKVze3DmosUeUJAvv0jxsmA+WgnohVTBzNkW1/K+aaQompkErsE8uUpbMa0GYeq +dV7nFRl/0KTbXJXEKrm =qC/l -----END PGP SIGNATURE----- --Sig_/qjINfcS.7OJkx3.n+B2qK2c-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/