On Tue, Jul 14, 2026 at 5:06 AM Arthur Kiyanovski [off-list ref] wrote:
+ n_samples = data->request.num_samples;
+ sts.clockid = data->request.clock_id;
+ kfree(data);
+ data = kzalloc(struct_size(data, timestamps, n_samples), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
any idea why you free then allocate back?
quoted hunk ↗ jump to hunk
--- a/include/linux/ptp_clock_kernel.h
+++ b/include/linux/ptp_clock_kernel.h
@@ -123,11 +123,34 @@ struct ptp_system_timestamp {
* reading the lowest bits of the PHC timestamp and the second
* reading immediately follows that.
*
+ * @gettimexattrs64: Reads the current time from the hardware clock and
+ * optionally also the system clock with additional clock
+ * attributes.
+ * parameter ts: Holds the PHC timestamp.
+ * parameter sts: If not NULL, it holds a pair of
+ * timestamps from the system clock. The first reading is
+ * made right before reading the lowest bits of the PHC
+ * timestamp and the second reading immediately follows that.
The descriptions for ts and sts here are identical to gettimex64.
Instead of duplicating this text, could we just refer back to the
gettimex64 documentation?