mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ebru Akagunduz <ebru.akagunduz@gmail.com>
To: arnd@arndb.de
Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, opw-kernel@googlegroups.com,
	Ebru Akagunduz <ebru.akagunduz@gmail.com>
Subject: [PATCH] scsi: ips.c: use 64-bit time types
Date: Wed,  8 Oct 2014 23:14:08 +0300	[thread overview]
Message-ID: <1412799248-17181-1-git-send-email-ebru.akagunduz@gmail.com> (raw)

This patch changes 32-bit time types to 64-bit in
ips.c

time_t can only represent signed 32-bit dates but
the driver should represent dates that are after
January 2038.

Use time64_t type instead of time_t.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
---
 drivers/scsi/ips.c | 6 ++++--
 drivers/scsi/ips.h | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 52a216f..8a2cf68 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -195,6 +195,8 @@
 
 #include <linux/smp.h>
 
+#include <linux/time64.h>
+
 #ifdef MODULE
 static char *ips = NULL;
 module_param(ips, charp, 0);
@@ -297,7 +299,7 @@ static void ips_freescb(ips_ha_t *, ips_scb_t *);
 static void ips_setup_funclist(ips_ha_t *);
 static void ips_statinit(ips_ha_t *);
 static void ips_statinit_memio(ips_ha_t *);
-static void ips_fix_ffdc_time(ips_ha_t *, ips_scb_t *, time_t);
+static void ips_fix_ffdc_time(ips_ha_t *, ips_scb_t *, time64_t);
 static void ips_ffdc_reset(ips_ha_t *, int);
 static void ips_ffdc_time(ips_ha_t *);
 static uint32_t ips_statupd_copperhead(ips_ha_t *);
@@ -6000,7 +6002,7 @@ ips_ffdc_time(ips_ha_t * ha)
 /*                                                                          */
 /****************************************************************************/
 static void
-ips_fix_ffdc_time(ips_ha_t * ha, ips_scb_t * scb, time_t current_time)
+ips_fix_ffdc_time(ips_ha_t * ha, ips_scb_t * scb, time64_t current_time)
 {
 	long days;
 	long rem;
diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h
index 45b9566..ff2a0b3 100644
--- a/drivers/scsi/ips.h
+++ b/drivers/scsi/ips.h
@@ -1054,7 +1054,7 @@ typedef struct ips_ha {
    uint8_t            active;
    int                ioctl_reset;        /* IOCTL Requested Reset Flag */
    uint16_t           reset_count;        /* number of resets           */
-   time_t             last_ffdc;          /* last time we sent ffdc info*/
+   time64_t             last_ffdc;          /* last time we sent ffdc info*/
    uint8_t            slot_num;           /* PCI Slot Number            */
    int                ioctl_len;          /* size of ioctl buffer       */
    dma_addr_t         ioctl_busaddr;      /* dma address of ioctl buffer*/
-- 
1.9.1


             reply	other threads:[~2014-10-08 20:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 20:14 Ebru Akagunduz [this message]
2014-10-08 20:41 ` Arnd Bergmann
2014-10-08 20:44 ` James Bottomley
2014-10-08 20:58   ` Arnd Bergmann
2014-10-09 13:40     ` James Bottomley
2014-10-09 14:29       ` Arnd Bergmann
2014-10-09 15:13         ` James Bottomley
2014-10-09 16:13           ` Arnd Bergmann

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=1412799248-17181-1-git-send-email-ebru.akagunduz@gmail.com \
    --to=ebru.akagunduz@gmail.com \
    --cc=JBottomley@parallels.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=opw-kernel@googlegroups.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

all inboxes | Powered by JetHome®