Re: [Y2038] [Outreachy kernel] [PATCH v2] staging: gdm72xx: gdm_sdio: Replace timeval with ktime_t

2016-02-09 Thread Amitoj Kaur Chawla
On Wed, Feb 10, 2016 at 11:59 AM, Sudip Mukherjee wrote: > > This will not apply as almost similar change has already been done by: > 2bc29a1abc5c ("staging: gdm72xx: Replace timeval with ktime_t") > > which tree are you using? > > regards > sudip Sorry about this, I didn't rebase my tree. Done n

[Y2038] [PATCH v2] staging: gdm72xx: gdm_sdio: Replace timeval with ktime_t

2016-02-09 Thread Amitoj Kaur Chawla
'struct timeval'. This patch also uses ktime_us_delta() to get the elapsed time. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Removed the build error ktime_us_delta() was giving. drivers/staging/gdm72xx/gdm_sdio.c | 10 +- drivers/staging/gdm72xx/gdm_sdio.h

[Y2038] [PATCH] net: hamradio: baycom_ser_fdx: Replace timeval with timespec64

2016-02-09 Thread Amitoj Kaur Chawla
. We only need to find elapsed microseconds rather than absolute time, so it's better to use monotonic time, so using ktime_get_ts64() makes the code more efficient and more robust against concurrent settimeofday() calls. Signed-off-by: Amitoj Kaur Chawla Reviewed-by: Arnd Bergmann --- dr

[Y2038] [PATCH v4] misc: ibmasm: Replace timeval with timespec64

2016-02-09 Thread Amitoj Kaur Chawla
7; This patch also alters the format strings in sprintf() for now.tv_sec and now.tv_nsec to incorporate 'long long' on 32 bit architectures and leading zeroes respectively. Signed-off-by: Amitoj Kaur Chawla Reviewed-by: Arnd Bergmann --- Changes in v2: -change format string

[Y2038] [PATCH v2] net: hamradio: baycom_ser_fdx: Replace timeval with timespec64

2016-01-24 Thread Amitoj Kaur Chawla
. We only need to find elapsed microseconds rather than absolute time, so it's better to use monotonic time, so using ktime_get_ts64() makes the code more efficient and more robust against concurrent settimeofday() calls. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Changed

[Y2038] [PATCH 6/6] scsi: bfa: bfa_cs: Remove struct timeval

2016-01-09 Thread Amitoj Kaur Chawla
o but this would lead to expensive division for a frequently used function. Alternatively a bit shift has been done which performs a division of 1024 instead of 1000 which slightly alters the value returned by this function. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_cs.h | 8 +-

[Y2038] [PATCH 5/6] scsi: bfa: bfa_port: Remove 'struct timeval'

2016-01-09 Thread Amitoj Kaur Chawla
s the code more efficient and more robust against a concurrent settimeofday(). stats_reset_time variable has been changed to 'time64_t' type to store the monotonic time returned by ktime_get_seconds(). Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_port.c | 16 -

[Y2038] [PATCH 4/6] scsi: bfa: Remove use of time_t

2016-01-09 Thread Amitoj Kaur Chawla
same. Signed-off-by: Amitoj Kaur Chawla --- Only apply this patch if it's seen as acceptable that the io_profile_start_time remains truncated to 32 bits in IOCMD_ITNIM_GET_IOPROFILE. If this is something that needs to be fixed by adding a replacement vendor command, leave the cast in place as a

[Y2038] [PATCH 3/6] scsi: bfa: Use 'ktime_get_real_seconds()'

2016-01-09 Thread Amitoj Kaur Chawla
. We can't change the layout of the structure retrieving profile data as it is being used in a vendor specific command that can get sent from user space. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_fcpim.c | 6 +++--- drivers/scsi/bfa/bfa_fcpim.h | 4 ++-- drivers/scs

[Y2038] [PATCH 2/6] scsi: bfa: bfa_svc: Remove 'struct timeval'

2016-01-09 Thread Amitoj Kaur Chawla
c is wrong here and the code is actually ok. Introducing a temporary status_ok variable to store the condition avoids the warning. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_svc.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/

[Y2038] [PATCH 1/6] scsi: bfa: bfa_svc: Use ktime_get_real_seconds()

2016-01-09 Thread Amitoj Kaur Chawla
bit value. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_svc.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index 625225f..b3668e9 100644 --- a/drivers/scsi/bfa/bfa_svc.c +++ b/driver

[Y2038] [PATCH 0/6] scsi: bfa: Use y2038 safe timestamps

2016-01-09 Thread Amitoj Kaur Chawla
32 bit systems using 'struct timeval' will break in the year 2038, so these files have been modified appropriately to make them y2038 safe. Amitoj Kaur Chawla (6): scsi: bfa: bfa_svc: Use ktime_get_real_seconds() scsi: bfa: bfa_svc: Remove 'struct timeval&#x

[Y2038] [PATCH 3/3] scsi: bfa: bfa_cs: Remove struct timeval

2015-11-23 Thread Amitoj Kaur Chawla
o but this would lead to expensive division for a frequently used function. Alternatively a bit shift has been done which performs a division of 1024 instead of 1000 which slightly alters the value returned by this function. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_cs.h | 8 +-

[Y2038] [PATCH 2/3] scsi: bfa: bfa_svc: Remove 'struct timeval'

2015-11-23 Thread Amitoj Kaur Chawla
32 bit systems using 'struct timeval' will break in the year 2038, so we modify the code appropriately. This patch replaces the use of struct timeval and do_gettimeofday() with ktime_get_real_seconds() which returns a 64 bit value which is safer than struct timeval. Signed-off-by: A

[Y2038] [PATCH 1/3] scsi: bfa: Remove unnecessary use of struct timeval

2015-11-23 Thread Amitoj Kaur Chawla
Since aen_tv variable is not used anywhere we can remove the variable and the do_gettimeofday() function referencing it. This problem was found while removing 'struct timeval' from this driver to solve the y2038 problem for 32 bit systems. Signed-off-by: Amitoj Kaur Chawla --- dr

[Y2038] [PATCH v2 2/2] scsi: bfa: Remove use of time_t

2015-11-18 Thread Amitoj Kaur Chawla
same. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Added comments about overflow Only apply this patch if it's seen as acceptable that the io_profile_start_time remains truncated to 32 bits in IOCMD_ITNIM_GET_IOPROFILE. If this is something that needs to be fixed by adding a r

[Y2038] [PATCH v2 1/2] scsi: bfa: Use 'ktime_get_real_seconds()'

2015-11-18 Thread Amitoj Kaur Chawla
. We can't change the layout of the structure retrieving profile data as it is being used in a vendor specific command that can get sent from user space. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Modified commit message drivers/scsi/bfa/bfa_fcpim.c | 6 +++--- drivers/scs

Re: [Y2038] [PATCH 2/2] scsi: bfa: Remove use of 'time_t'

2015-11-18 Thread Amitoj Kaur Chawla
On Tue, Nov 17, 2015 at 2:28 AM, Arnd Bergmann wrote: > I think in this case, while the change is not necessarily wrong > (it has no effect on the generated binary), we really want a code > comment at the point where the overflow happens. > > Aside from that, the description seems misleading: the

Re: [Y2038] [PATCH 1/2] scsi: bfa: Use ktime_get_real_seconds()

2015-11-18 Thread Amitoj Kaur Chawla
On Tue, Nov 17, 2015 at 2:20 AM, Arnd Bergmann wrote: > > On Thursday 12 November 2015 18:54:51 Amitoj Kaur Chawla wrote: > > 32 bit systems using 'struct timeval' will break in the year 2038, so > > we modify the code appropriately. > > > > This patc

[Y2038] [PATCH v2] scsi: bfa: bfa_port: Remove 'struct timeval'

2015-11-16 Thread Amitoj Kaur Chawla
s the code more efficient and more robust against a concurrent settimeofday(). stats_reset_time variable has been changed to 'time64_t' type to store the monotonic time returned by ktime_get_seconds(). Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Used ktime

[Y2038] [PATCH 2/2] scsi: bfa: Remove use of 'time_t'

2015-11-12 Thread Amitoj Kaur Chawla
This change impacts the layout of the structure retrieving profile data as it is being used in a vendor specific command that can get sent from user space and thus requires change in the ioctl interface. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_fcpim.c | 2 +- 1 file change

[Y2038] [PATCH 1/2] scsi: bfa: Use ktime_get_real_seconds()

2015-11-12 Thread Amitoj Kaur Chawla
has been added to the assignment statement. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_fcpim.c | 6 +++--- drivers/scsi/bfa/bfa_fcpim.h | 4 ++-- drivers/scsi/bfa/bfad_bsg.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/bfa/bfa_fcpim.c

Re: [Y2038] [PATCH v3] scsi: bfa: Use ktime_get_real_seconds()

2015-11-12 Thread Amitoj Kaur Chawla
On Thu, Nov 12, 2015 at 6:37 PM, Arnd Bergmann wrote: > On Thursday 12 November 2015 17:52:51 Amitoj Kaur Chawla wrote: >> On Thu, Nov 12, 2015 at 2:55 PM, Arnd Bergmann wrote: >> > On Thursday 12 November 2015 14:12:52 Amitoj Kaur Chawla wrote: >> >> I don't

Re: [Y2038] [PATCH v3] scsi: bfa: Use ktime_get_real_seconds()

2015-11-12 Thread Amitoj Kaur Chawla
On Thu, Nov 12, 2015 at 2:55 PM, Arnd Bergmann wrote: > On Thursday 12 November 2015 14:12:52 Amitoj Kaur Chawla wrote: >> I don't get a build error when I remove the time_t cast. Where am I going >> wrong? > > I meant the reverse: if we remove the definition of time

Re: [Y2038] [PATCH v3] scsi: bfa: Use ktime_get_real_seconds()

2015-11-12 Thread Amitoj Kaur Chawla
On Wed, Nov 11, 2015 at 1:22 AM, Arnd Bergmann wrote: > On Tuesday 10 November 2015 22:21:50 Amitoj Kaur Chawla wrote: >> On Tue, Nov 10, 2015 at 10:01 PM, Arnd Bergmann wrote: >> > On Tuesday 10 November 2015 19:27:49 Amitoj Kaur Chawla wrote: >> >> After lookin

Re: [Y2038] [PATCH v3] scsi: bfa: Use ktime_get_real_seconds()

2015-11-10 Thread Amitoj Kaur Chawla
On Tue, Nov 10, 2015 at 10:01 PM, Arnd Bergmann wrote: > On Tuesday 10 November 2015 19:27:49 Amitoj Kaur Chawla wrote: >> After looking into this further the struct bfa_itnim_ioprofile_s >> *ioprofile data is being used in several structures in this way: >

Re: [Y2038] [PATCH v3] scsi: bfa: Use ktime_get_real_seconds()

2015-11-10 Thread Amitoj Kaur Chawla
On Sun, Nov 8, 2015 at 3:23 AM, Arnd Bergmann wrote: > On Saturday 07 November 2015 19:47:49 Amitoj Kaur Chawla wrote: >> On Sat, Nov 7, 2015 at 4:26 AM, Arnd Bergmann wrote: >> > >> > For all I can tell, the ioprofile variable is not unused, and its >> > layo

Re: [Y2038] [PATCH v3] scsi: bfa: Use ktime_get_real_seconds()

2015-11-07 Thread Amitoj Kaur Chawla
On Sat, Nov 7, 2015 at 4:26 AM, Arnd Bergmann wrote: > On Saturday 07 November 2015 04:08:16 Amitoj Kaur Chawla wrote: >> On Sat, Nov 7, 2015 at 3:01 AM, Arnd Bergmann wrote: >> > On Saturday 07 November 2015 02:36:35 Amitoj Kaur Chawla wrote: >> > >> The only pl

Re: [Y2038] [PATCH v3] scsi: bfa: Use ktime_get_real_seconds()

2015-11-06 Thread Amitoj Kaur Chawla
On Sat, Nov 7, 2015 at 3:01 AM, Arnd Bergmann wrote: > On Saturday 07 November 2015 02:36:35 Amitoj Kaur Chawla wrote: > >> diff --git a/drivers/scsi/bfa/bfa_defs_svc.h >> b/drivers/scsi/bfa/bfa_defs_svc.h >> index e7acf41..0a31561 100644 >> --- a/drivers/scsi/bfa/b

[Y2038] [PATCH v3] scsi: bfa: Use ktime_get_real_seconds()

2015-11-06 Thread Amitoj Kaur Chawla
places u32 time storing variables with u64 variables to store the 64 bit seconds value returned by ktime_get_real_seconds() Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Converted u32 type to u64 type Changes in v3: -Converted u32 type to u64 type drivers/scsi/bfa/bfa_defs

Re: [Y2038] [PATCH v2] scsi: bfa: Use ktime_get_real_seconds()

2015-11-06 Thread Amitoj Kaur Chawla
On Fri, Nov 6, 2015 at 8:53 PM, Arnd Bergmann wrote: > This version is better, but I think you missed the used of the variable: > > #define bfa_io_profile_start_time(_bfa) \ > ((_bfa)->modules.fcp_mod.fcpim.io_profile_start_time) > > bfa_itnim_get_ioprofile(struct bfa_itnim_s *itnim, >

Re: [Y2038] [PATCH v3 2/2] scsi: bfa: bfa_svc: Remove 'struct timeval'

2015-11-06 Thread Amitoj Kaur Chawla
On Fri, Nov 6, 2015 at 5:59 PM, Arnd Bergmann wrote: > On Thursday 05 November 2015 23:10:54 Amitoj Kaur Chawla wrote: >> 32 bit systems using 'struct timeval' will break in the year 2038, so >> we modify the code appropriately. > > Looks good, this is re

[Y2038] [PATCH v3 2/2] scsi: bfa: bfa_svc: Remove 'struct timeval'

2015-11-05 Thread Amitoj Kaur Chawla
#x27;. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Removed unnecessary if condition -Removed u32 to u64 conversion since monotonic time doesn't require the change. Changes in v3: -Introduced boolean variable to remove warning -Changed

[Y2038] [PATCH v3 1/2] scsi: bfa: bfa_svc: Use ktime_get_real_seconds()

2015-11-05 Thread Amitoj Kaur Chawla
bit value. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -None Changes in v3: -None drivers/scsi/bfa/bfa_svc.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index 625225

Re: [Y2038] [PATCH 2/2] scsi: bfa: bfa_svc: Remove use of struct timeval

2015-11-05 Thread Amitoj Kaur Chawla
On Thu, Nov 5, 2015 at 8:52 PM, Arnd Bergmann wrote: > On Thursday 05 November 2015 20:43:02 Amitoj Kaur Chawla wrote: >> On Thu, Nov 5, 2015 at 8:31 PM, Arnd Bergmann wrote: >> > On Thursday 05 November 2015 19:00:36 Amitoj Kaur Chawla wrote: >> >> On Thu, Nov 5,

Re: [Y2038] [PATCH 2/2] scsi: bfa: bfa_svc: Remove use of struct timeval

2015-11-05 Thread Amitoj Kaur Chawla
On Thu, Nov 5, 2015 at 8:52 PM, Arnd Bergmann wrote: > On Thursday 05 November 2015 20:43:02 Amitoj Kaur Chawla wrote: >> On Thu, Nov 5, 2015 at 8:31 PM, Arnd Bergmann wrote: >> > On Thursday 05 November 2015 19:00:36 Amitoj Kaur Chawla wrote: >> >> On Thu, Nov 5,

Re: [Y2038] [PATCH 2/2] scsi: bfa: bfa_svc: Remove use of struct timeval

2015-11-05 Thread Amitoj Kaur Chawla
On Thu, Nov 5, 2015 at 8:31 PM, Arnd Bergmann wrote: > On Thursday 05 November 2015 19:00:36 Amitoj Kaur Chawla wrote: >> On Thu, Nov 5, 2015 at 2:44 PM, Arnd Bergmann wrote: >> > That works, but why not keep the code as it is here? ktime_get_seconds() >> > still a

Re: [Y2038] [PATCH 2/2] scsi: bfa: bfa_svc: Remove use of struct timeval

2015-11-05 Thread Amitoj Kaur Chawla
On Thu, Nov 5, 2015 at 2:44 PM, Arnd Bergmann wrote: > On Thursday 05 November 2015 11:13:30 Amitoj Kaur Chawla wrote: >> On Thu, Nov 5, 2015 at 5:19 AM, Arnd Bergmann wrote: >> > On Wednesday 04 November 2015 23:51:07 Amitoj Kaur Chawla wrote: >> >> 32 bit syste

[Y2038] [PATCH v2 2/2] scsi: bfa: bfa_svc: Remove use of 'struct timeval'

2015-11-05 Thread Amitoj Kaur Chawla
32 bit systems using 'struct timeval' will break in the year 2038, so we modify the code appropriately. This patch replaces the use of struct timeval and do_gettimeofday() with 64 bit ktime_get_seconds() since we only need to find elapsed seconds. Signed-off-by: Amitoj Kaur Chawla -

[Y2038] [PATCH v2 1/2] scsi: bfa: bfa_svc: Use ktime_get_real_seconds()

2015-11-05 Thread Amitoj Kaur Chawla
bit value. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -None drivers/scsi/bfa/bfa_svc.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index 625225f..b3668e9 100644 --- a/driver

[Y2038] [PATCH v2 0/2] scsi: bfa: bfa_svc: Remove use of 'struct timeval'

2015-11-05 Thread Amitoj Kaur Chawla
mitoj Kaur Chawla (2): scsi: bfa: bfa_svc: Use ktime_get_real_seconds() scsi: bfa: bfa_svc: Remove use of 'struct timeval' drivers/scsi/bfa/bfa_svc.c | 31 --- 1 file changed, 8 insertions(+), 23 deletion

Re: [Y2038] [PATCH 2/2] scsi: bfa: bfa_svc: Remove use of struct timeval

2015-11-04 Thread Amitoj Kaur Chawla
On Thu, Nov 5, 2015 at 5:19 AM, Arnd Bergmann wrote: > On Wednesday 04 November 2015 23:51:07 Amitoj Kaur Chawla wrote: >> 32 bit systems using 'struct timeval' will break in the year 2038, so >> we modify the code appropriately. >> >> This patch r

Re: [Y2038] [PATCH 1/2] scsi: bfa: bfa_svc: Use ktime_get_real_seconds()

2015-11-04 Thread Amitoj Kaur Chawla
On Thu, Nov 5, 2015 at 5:11 AM, Arnd Bergmann wrote: > On Wednesday 04 November 2015 23:47:03 Amitoj Kaur Chawla wrote: >> 32 bit systems using 'struct timeval' will break in the year 2038, so >> we modify the code appropriately. >> >> This patch removes the

[Y2038] [PATCH 2/2] scsi: bfa: bfa_svc: Remove use of struct timeval

2015-11-04 Thread Amitoj Kaur Chawla
converted from a u32 to u64 type to store the 64 bit value returned by ktime_get_seconds(). Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_svc.c | 9 +++-- drivers/scsi/bfa/bfa_svc.h | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/bfa/bfa_svc.c

[Y2038] [PATCH 1/2] scsi: bfa: bfa_svc: Use ktime_get_real_seconds()

2015-11-04 Thread Amitoj Kaur Chawla
bit value. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_svc.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c index 625225f..b3668e9 100644 --- a/drivers/scsi/bfa/bfa_svc.c +++ b/driver

[Y2038] [PATCH 0/2] scsi: bfa: bfa_svc: Remove use of 'struct timeval'

2015-11-04 Thread Amitoj Kaur Chawla
This patchset removes the use of struct timeval because struct timeval will break in 32 bit systems in the year 2038. Amitoj Kaur Chawla(2): scsi: bfa: bfa_svc: Use ktime_get_real_seconds() scsi: bfa: bfa_svc: Remove use of struct timeval drivers/scsi/bfa/bfa_svc.c | 30

[Y2038] [PATCH v2] scsi: bfa: Use ktime_get_real_seconds()

2015-11-04 Thread Amitoj Kaur Chawla
places u32 time storing variables with u64 variables to store the 64 bit seconds value returned by ktime_get_real_seconds() Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Converted u32 type to u64 type drivers/scsi/bfa/bfa_fcpim.c | 2 +- drivers/scsi/bfa/bfa_fcpim.h | 4 ++-- dr

[Y2038] [PATCH] scsi: bfa: bfa_cs: Remove struct timeval

2015-11-01 Thread Amitoj Kaur Chawla
et_real_ns() which returns a 64 bit value which is safer than struct timeval. ktime_get_real_ns() is also faster than the computations done in this macro previously to get the same value. Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_cs.h | 9 ++--- 1 file changed, 2 insert

[Y2038] [PATCH] scsi: bfa: Remove struct timeval

2015-11-01 Thread Amitoj Kaur Chawla
p with u64 timestamp in bfi_ioc_ctrl_req_s structure to store the 64 bit seconds value returned by ktime_get_real_seconds() Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_ioc.c | 5 ++--- drivers/scsi/bfa/bfi.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/driver

[Y2038] [PATCH] block: sx8: Remove 'struct timeval'

2015-11-01 Thread Amitoj Kaur Chawla
32 bit systems using 'struct timeval' will overflow in the year 2038, so we modify the code appropriately. This patch replaces the use of struct timeval and do_gettimeofday() with ktime_get_real_seconds() which returns a 64 bit seconds value. Signed-off-by: Amitoj Kaur Chawla --

[Y2038] [PATCH] char: mmtimer: Replace timespec with timespec64

2015-10-30 Thread Amitoj Kaur Chawla
return the current time in nanoseconds. Signed-off-by: Amitoj Kaur Chawla --- drivers/char/mmtimer.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index 3d6c067..42a64e5 100644 --- a/drivers

[Y2038] [PATCH] net: hamradio: baycom_ser_fdx: Replace timeval with timespec64

2015-10-28 Thread Amitoj Kaur Chawla
gettimeofday() which returns a 'struct timeval' Signed-off-by: Amitoj Kaur Chawla --- drivers/net/hamradio/baycom_ser_fdx.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c

[Y2038] [PATCH] staging: gdm72xx: gdm_stdio: Replace timeval with ktime_t

2015-10-27 Thread Amitoj Kaur Chawla
This patch also uses ktime_us_delta() to get the elapsed time. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/gdm72xx/gdm_sdio.c | 10 +- drivers/staging/gdm72xx/gdm_sdio.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/gdm72xx/gdm_sdio.c

[Y2038] [PATCH 2/2] scsi: bfa: Replace struct timeval with ktime_t

2015-10-27 Thread Amitoj Kaur Chawla
Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_defs_svc.h | 2 +- drivers/scsi/bfa/bfad_im.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bfa/bfa_defs_svc.h b/drivers/scsi/bfa/bfa_defs_svc.h index 638f441f..e7acf41 100644 --- a/driver

[Y2038] [PATCH 1/2] scsi: 3w-9xxx: Remove use of struct timeval

2015-10-27 Thread Amitoj Kaur Chawla
ned-off-by: Amitoj Kaur Chawla --- drivers/scsi/3w-9xxx.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index add419d..30961f7 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -90,7 +90,7 @@

[Y2038] [PATCH 0/2] scsi: Remove 'struct timeval'

2015-10-27 Thread Amitoj Kaur Chawla
This patchset removes 'struct timeval' as 32 bit systems using timeval will break in the year 2038 so the code has been replaced appropriately. Amitoj Kaur Chawla (2): scsi: 3w-9xxx: Remove use of struct timeval scsi: bfa: Replace struct timeval with ktime_t drivers/scsi

[Y2038] [PATCH v2] scsi: bfa: bfad_bsg: Use ktime_get_real_seconds()

2015-10-27 Thread Amitoj Kaur Chawla
32 bit systems using 'struct timeval' will break in the year 2038, so we modify the code appropriately. This patch replaces the use of struct timeval and do_gettimeofday() with ktime_get_real_seconds(). Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Removed trailing

[Y2038] [PATCH v2] staging: media: lirc: lirc_sasem: Replace timeval with ktime_t

2015-10-27 Thread Amitoj Kaur Chawla
This patch also uses ktime_ms_delta() to get the elapsed time in milliseconds. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Removed trailing whitespace drivers/staging/media/lirc/lirc_sasem.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drive

[Y2038] [PATCH] scsi: bfa: bfa_svc: Remove 'struct timeval'

2015-10-26 Thread Amitoj Kaur Chawla
32 bit systems using 'struct timeval' will break in the year 2038, so we modify the code appropriately. This patch replaces the use of struct timeval and do_gettimeofday() with 64 bit ktime_get_real_seconds(). Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfa_

[Y2038] [PATCH] scsi: bfa: bfad_bsg: Use ktime_get_real_seconds()

2015-10-24 Thread Amitoj Kaur Chawla
32 bit systems using 'struct timeval' will break in the year 2038, so we modify the code appropriately. This patch replaces the use of struct timeval and do_gettimeofday() with ktime_get_real_seconds(). Signed-off-by: Amitoj Kaur Chawla --- drivers/scsi/bfa/bfad_bsg.c | 6 +++-

[Y2038] [PATCH] staging: media: lirc: lirc_sasem: Replace timeval with ktime_t

2015-10-24 Thread Amitoj Kaur Chawla
This patch also uses ktime_ms_delta() to get the elapsed time in milliseconds. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/media/lirc/lirc_sasem.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/sta

[Y2038] [PATCH v2] char: ipmi: ipmi_ssif: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
7; This patch also alters the format string in pr_info() for now.tv_sec to incorporate 'long long' on 32 bit architectures. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Removed unnecessary format string change in pr_info() drivers/char/ipmi/ipmi_ssif.c | 9 + 1 fi

Re: [Y2038] [Outreachy kernel] Re: [PATCH] char: ipmi: ipmi_ssif: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
On Sat, Oct 24, 2015 at 1:04 AM, Arnd Bergmann wrote: > On Saturday 24 October 2015 00:58:12 Amitoj Kaur Chawla wrote: >> On Sat, Oct 24, 2015 at 12:53 AM, Arnd Bergmann wrote: >> > On Saturday 24 October 2015 00:39:22 Amitoj Kaur Chawla wrote: >> >> This patch re

Re: [Y2038] [PATCH] char: ipmi: ipmi_ssif: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
On Sat, Oct 24, 2015 at 12:53 AM, Arnd Bergmann wrote: > On Saturday 24 October 2015 00:39:22 Amitoj Kaur Chawla wrote: >> This patch replaces timeval with timespec64 as 32 bit 'struct timeval' >> will not give current time beyond 2038. >> >> The patch change

[Y2038] [PATCH] char: ipmi: ipmi_ssif: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
7; This patch also alters the format strings in pr_info() for now.tv_sec and now.tv_nsec to incorporate 'long long' on 32 bit architectures and leading zeroes respectively. Signed-off-by: Amitoj Kaur Chawla --- drivers/char/ipmi/ipmi_ssif.c | 9 + 1 file changed, 5 insertions(+), 4

[Y2038] [PATCH v3] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
7; This patch also alters the format strings in sprintf() for now.tv_sec and now.tv_nsec to incorporate 'long long' on 32 bit architectures and leading zeroes respectively. Signed-off-by: Amitoj Kaur Chawla Reviewed-by: Arnd Bergmann --- Changes in v2: -change format string of now

Re: [Y2038] [Outreachy kernel] Re: [PATCH] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
On Fri, Oct 23, 2015 at 5:55 PM, Julia Lawall wrote: > > > On Fri, 23 Oct 2015, Amitoj Kaur Chawla wrote: > >> >> Okay! Next patches will be the simple tasks. Also, I couldn't find the >> >> tutorial you mentioned for compiling, can you help me out s

Re: [Y2038] [Outreachy kernel] [PATCH v2] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
On Fri, Oct 23, 2015 at 7:17 PM, Arnd Bergmann wrote: > On Friday 23 October 2015 15:39:49 Arnd Bergmann wrote: >> On Friday 23 October 2015 17:52:06 Amitoj Kaur Chawla wrote: >> > This patch replaces timeval with timespec64 as 32 bit 'struct timeval' >> > w

Re: [Y2038] [Outreachy kernel] Re: [PATCH] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
>> Okay! Next patches will be the simple tasks. Also, I couldn't find the >> tutorial you mentioned for compiling, can you help me out some there? > > I think the tutorial mentioned is kernel newbies First patch tutorial and > under > section Make a driver change: > http://kernelnewbies.org/Outrea

[Y2038] [PATCH v2] misc: ibmasm: Replace timeval with timespec64

2015-10-23 Thread Amitoj Kaur Chawla
7; This patch also alters the format strings in sprintf() for now.tv_sec and now.tv_nsec to incorporate 'long long' on 32 bit architectures and leading zeroes respectively. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -change format string of now.tv_sec to '%llu

Re: [Y2038] [PATCH] misc: ibmasm: Replace timeval with timespec64

2015-10-22 Thread Amitoj Kaur Chawla
On Fri, Oct 23, 2015 at 7:18 AM, Amitoj Kaur Chawla wrote: > On Fri, Oct 23, 2015 at 12:45 AM, Arnd Bergmann wrote: >> On Thursday 22 October 2015 23:09:20 Amitoj Kaur Chawla wrote: >>> This patch replaces timeval with timespec64 as 32 bit 'struct timeval' >>&

Re: [Y2038] [PATCH] misc: ibmasm: Replace timeval with timespec64

2015-10-22 Thread Amitoj Kaur Chawla
On Fri, Oct 23, 2015 at 12:45 AM, Arnd Bergmann wrote: > On Thursday 22 October 2015 23:09:20 Amitoj Kaur Chawla wrote: >> This patch replaces timeval with timespec64 as 32 bit 'struct timeval' >> will not give current time beyond 2038. >> >> This also change

[Y2038] [PATCH] misc: ibmasm: Replace timeval with timespec64

2015-10-22 Thread Amitoj Kaur Chawla
This patch replaces timeval with timespec64 as 32 bit 'struct timeval' will not give current time beyond 2038. This also changes the code to use ktime_get_real_ts64() which returns a 'struct timespec64' instead of do_gettimeofday() which returns a 'struct timeval

[Y2038] [PATCH v2] ide: pdc202xx_new: Replace timeval with ktime_t

2015-10-22 Thread Amitoj Kaur Chawla
This patch also uses ktime_us_delta() to get the elapsed time. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Modified subject of commit message drivers/ide/pdc202xx_new.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/ide/pdc202xx_new.c b/d

Re: [Y2038] Questions on some functions

2015-10-22 Thread Amitoj Kaur Chawla
On Thu, Oct 22, 2015 at 1:31 PM, Arnd Bergmann wrote: > On Thursday 22 October 2015 12:08:14 Amitoj Kaur Chawla wrote: >> Hi Arnd, >> >> >> A couple of doubts I had while working on some patches. > > Hi Amitoj, > > I've put the y2038 and outreachy mail