All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: y2038@lists.linaro.org
Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>,
	outreachy-kernel@googlegroups.com
Subject: Re: [Y2038] [PATCH 2/2] scsi: bfa: Replace struct timeval with ktime_t
Date: Wed, 04 Nov 2015 00:56:14 +0100	[thread overview]
Message-ID: <3991598.sWF2Cv7hDN@wuerfel> (raw)
In-Reply-To: <5acb9a010438369d26ce6be07b8ae90974ed24f0.1446003130.git.amitoj1606@gmail.com>

On Wednesday 28 October 2015 09:13:51 Amitoj Kaur Chawla wrote:
> 
> diff --git a/drivers/scsi/bfa/bfa_defs_svc.h b/drivers/scsi/bfa/bfa_defs_svc.h
> index 638f441f..e7acf41 100644
> --- a/drivers/scsi/bfa/bfa_defs_svc.h
> +++ b/drivers/scsi/bfa/bfa_defs_svc.h
> @@ -1454,7 +1454,7 @@ struct bfa_aen_entry_s {
>         enum bfa_aen_category   aen_category;
>         u32                     aen_type;
>         union bfa_aen_data_u    aen_data;
> -       struct timeval          aen_tv;
> +       ktime_t                 aen_time;
>         u32                     seq_num;
>         u32                     bfad_num;
>  };
> diff --git a/drivers/scsi/bfa/bfad_im.h b/drivers/scsi/bfa/bfad_im.h
> index f6c1023..b37fcba 100644
> --- a/drivers/scsi/bfa/bfad_im.h
> +++ b/drivers/scsi/bfa/bfad_im.h
> @@ -131,7 +131,7 @@ struct bfad_im_s {
>  
>  /* post fc_host vendor event */
>  #define bfad_im_post_vendor_event(_entry, _drv, _cnt, _cat, _evt) do {       \
> -       do_gettimeofday(&(_entry)->aen_tv);                                   \
> +       (_entry)->aen_time = ktime_get();                                     \
>         (_entry)->bfad_num = (_drv)->inst_no;                                 \
>         (_entry)->seq_num = (_cnt);                                           \
>         (_entry)->aen_category = (_cat);                                      \
> -- 
> 

This can't be right: you are only writing to the variable. If there is anyone
reading from it elsewhere, that code needs to be changed as well in the
same patch. If not, the variable can just be removed.

	Arnd


      reply	other threads:[~2015-11-03 23:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28  3:36 [PATCH 0/2] scsi: Remove 'struct timeval' Amitoj Kaur Chawla
2015-10-28  3:40 ` [PATCH 1/2] scsi: 3w-9xxx: Remove use of struct timeval Amitoj Kaur Chawla
2015-11-04 22:26   ` [Y2038] " Arnd Bergmann
2015-10-28  3:43 ` [PATCH 2/2] scsi: bfa: Replace struct timeval with ktime_t Amitoj Kaur Chawla
2015-11-03 23:56   ` Arnd Bergmann [this message]

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=3991598.sWF2Cv7hDN@wuerfel \
    --to=arnd@arndb.de \
    --cc=amitoj1606@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=y2038@lists.linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.