Re: [PATCH v2] scsi: stex: Remove use of struct timeval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux