From: Arnd Bergmann <arnd@arndb.de>
To: Tina Ruchandani <ruchandani.tina@gmail.com>
Cc: linux-scsi@vger.kernel.org,
"James E.J. Bottomley" <JBottomley@parallels.com>
Subject: Re: [PATCH v2] scsi: stex: Remove use of struct timeval
Date: Wed, 25 Feb 2015 11:44:12 +0100 [thread overview]
Message-ID: <8604869.gMDOcjFu4A@wuerfel> (raw)
In-Reply-To: <20150225021136.GA2728@tinar>
On Wednesday 25 February 2015 07:41:36 Tina Ruchandani wrote:
> @@ -364,10 +365,7 @@ MODULE_VERSION(ST_DRIVER_VERSION);
>
> static void stex_gettime(__le64 *time)
> {
> - struct timeval tv;
> -
> - do_gettimeofday(&tv);
> - *time = cpu_to_le64(tv.tv_sec);
> + *time = cpu_to_le64(ktime_get_real_seconds());
> }
>
> static struct status_msg *stex_get_status(struct st_hba *hba)
>
The patch looks correct to me, but upon second reading, I think it
would be nicer to eliminate the function entirely and open-code
the cpu_to_le64(ktime_get_real_seconds()) in the two callers.
Arnd
prev parent reply other threads:[~2015-02-25 10:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 2:11 [PATCH v2] scsi: stex: Remove use of struct timeval Tina Ruchandani
2015-02-25 10:44 ` 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=8604869.gMDOcjFu4A@wuerfel \
--to=arnd@arndb.de \
--cc=JBottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ruchandani.tina@gmail.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