Commit 3869e431 authored by Petr Mladek's avatar Petr Mladek
Browse files

Merge branch 'for-6.19-vsprintf-timespec64' into for-linus

parents a9f349e3 ace38521
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -547,11 +547,13 @@ Time and date
	%pt[RT]s		YYYY-mm-dd HH:MM:SS
	%pt[RT]d		YYYY-mm-dd
	%pt[RT]t		HH:MM:SS
	%pt[RT][dt][r][s]
	%ptSp			<seconds>.<nanoseconds>
	%pt[RST][dt][r][s]

For printing date and time as represented by::

	R  struct rtc_time structure
	R  content of struct rtc_time
	S  content of struct timespec64
	T  time64_t type

in human readable format.
@@ -563,6 +565,11 @@ The %pt[RT]s (space) will override ISO 8601 separator by using ' ' (space)
instead of 'T' (Capital T) between date and time. It won't have any effect
when date or time is omitted.

The %ptSp is equivalent to %lld.%09ld for the content of the struct timespec64.
When the other specifiers are given, it becomes the respective equivalent of
%ptT[dt][r][s].%09ld. In other words, the seconds are being printed in
the human readable format followed by a dot and nanoseconds.

Passed by reference.

struct clk
+1 −2
Original line number Diff line number Diff line
@@ -275,8 +275,7 @@ void debug_timestamp(struct smi_info *smi_info, char *msg)
	struct timespec64 t;

	ktime_get_ts64(&t);
	dev_dbg(smi_info->io.dev, "**%s: %lld.%9.9ld\n",
		msg, t.tv_sec, t.tv_nsec);
	dev_dbg(smi_info->io.dev, "**%s: %ptSp\n", msg, &t);
}
#else
#define debug_timestamp(smi_info, x)
+2 −4
Original line number Diff line number Diff line
@@ -1083,10 +1083,8 @@ static int sender(void *send_info, struct ipmi_smi_msg *msg)
		struct timespec64 t;

		ktime_get_real_ts64(&t);
		dev_dbg(&ssif_info->client->dev,
			"**Enqueue %02x %02x: %lld.%6.6ld\n",
			msg->data[0], msg->data[1],
			(long long)t.tv_sec, (long)t.tv_nsec / NSEC_PER_USEC);
		dev_dbg(&ssif_info->client->dev, "**Enqueue %02x %02x: %ptSp\n",
			msg->data[0], msg->data[1], &t);
	}
	return IPMI_CC_NO_ERROR;
}
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ static void sync_print_fence(struct seq_file *s,
		struct timespec64 ts64 =
			ktime_to_timespec64(fence->timestamp);

		seq_printf(s, "@%lld.%09ld", (s64)ts64.tv_sec, ts64.tv_nsec);
		seq_printf(s, "@%ptSp", &ts64);
	}

	seq_printf(s, ": %lld", fence->seqno);
+1 −2
Original line number Diff line number Diff line
@@ -217,8 +217,7 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
	drm_printf(&p, "version: " AMDGPU_COREDUMP_VERSION "\n");
	drm_printf(&p, "kernel: " UTS_RELEASE "\n");
	drm_printf(&p, "module: " KBUILD_MODNAME "\n");
	drm_printf(&p, "time: %lld.%09ld\n", coredump->reset_time.tv_sec,
		   coredump->reset_time.tv_nsec);
	drm_printf(&p, "time: %ptSp\n", &coredump->reset_time);

	if (coredump->reset_task_info.task.pid)
		drm_printf(&p, "process_name: %s PID: %d\n",
Loading