|
@@ -495,12 +495,13 @@ struct ata_show_ering_arg {
|
|
static int ata_show_ering(struct ata_ering_entry *ent, void *void_arg)
|
|
static int ata_show_ering(struct ata_ering_entry *ent, void *void_arg)
|
|
{
|
|
{
|
|
struct ata_show_ering_arg* arg = void_arg;
|
|
struct ata_show_ering_arg* arg = void_arg;
|
|
- struct timespec time;
|
|
|
|
|
|
+ u64 seconds;
|
|
|
|
+ u32 rem;
|
|
|
|
|
|
- jiffies_to_timespec(ent->timestamp,&time);
|
|
|
|
|
|
+ seconds = div_u64_rem(ent->timestamp, HZ, &rem);
|
|
arg->written += sprintf(arg->buf + arg->written,
|
|
arg->written += sprintf(arg->buf + arg->written,
|
|
- "[%5lu.%06lu]",
|
|
|
|
- time.tv_sec, time.tv_nsec);
|
|
|
|
|
|
+ "[%5llu.%09lu]", seconds,
|
|
|
|
+ rem * NSEC_PER_SEC / HZ);
|
|
arg->written += get_ata_err_names(ent->err_mask,
|
|
arg->written += get_ata_err_names(ent->err_mask,
|
|
arg->buf + arg->written);
|
|
arg->buf + arg->written);
|
|
return 0;
|
|
return 0;
|