]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commitdiff
formatting warnings
authorAlex Markuze <amarkuze@redhat.com>
Tue, 18 Mar 2025 20:19:12 +0000 (20:19 +0000)
committerAlex Markuze <amarkuze@redhat.com>
Tue, 18 Mar 2025 20:19:12 +0000 (20:19 +0000)
fs/ceph/debugfs.c
net/ceph/ceph_san_logger.c

index 6cc0384aa1e45f205ade09d40dedb19fead63ee6..5a7d287474af5607f9eac5ebc06f3320edbf3352 100644 (file)
@@ -386,37 +386,11 @@ static int jiffies_to_formatted_time(unsigned long jiffies_value, char *buffer,
     tm_time.tm_year = (seconds / 365 / 12) + 70; // Simplified year since 1970
 
     // Format the time into the buffer
-    return snprintf(buffer, buffer_len, "%04d-%02d-%02d %02d:%02d:%02d",
+    return snprintf(buffer, buffer_len, "%04ld-%02d-%02d %02d:%02d:%02d",
                    tm_time.tm_year + 1900, tm_time.tm_mon + 1, tm_time.tm_mday,
                    tm_time.tm_hour, tm_time.tm_min, tm_time.tm_sec);
 }
 
-static void jiffies_to_datetime_str(unsigned long input_jiffies, char *buffer, size_t buf_size)
-{
-    static time64_t boot_time_sec = 0;
-    struct rtc_time tm;
-    time64_t timestamp;
-
-    // Initialize boot_time_sec only once
-    if (boot_time_sec == 0) {
-        struct timespec64 boot_ts;
-        ktime_get_boottime_ts64(&boot_ts);
-        boot_time_sec = boot_ts.tv_sec;
-    }
-
-       //use ktime_get_boottime_ts64() to get the boot time
-    // Convert jiffies to absolute timestamp
-    timestamp = boot_time_sec + (input_jiffies / HZ);
-
-    // Convert timestamp to human-readable format
-    rtc_time64_to_tm(timestamp, &tm);
-
-    // Format the output string
-    snprintf(buffer, buf_size, "%04d-%02d-%02d %02d:%02d:%02d",
-             tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
-             tm.tm_hour, tm.tm_min, tm.tm_sec);
-}
-
 static int status_show(struct seq_file *s, void *p)
 {
        struct ceph_fs_client *fsc = s->private;
index 0d5e76146223530b67fed7a4c7bca8a31fdcbaec..06138396eeac072bdd90cb731b9f795bcee868eb 100644 (file)
@@ -268,12 +268,12 @@ struct ceph_san_log_entry *ceph_san_log_iter_next(struct ceph_san_log_iter *iter
         /* Get previous entry if available */
         struct ceph_san_log_entry *prev_entry = NULL;
         prev_entry = cephsan_pagefrag_get_ptr(iter->pf, iter->prev_offset);
-        pr_err("Previous entry: entry=%px poison=%x len=%u prev_offset=%llu\n",
+        pr_err("Previous entry: entry=%px poison=%llx len=%u prev_offset=%llu\n",
                 prev_entry, prev_entry->debug_poison, prev_entry->len, iter->prev_offset);
 
         iter->prev_offset = iter->current_offset;
         iter->current_offset = iter->end_offset;
-        pr_err("Pagefrag corruption detected: entry=%px poison=%x len=%u\n"
+        pr_err("Pagefrag corruption detected: entry=%px poison=%llx len=%u\n"
                "pf: head=%u tail=%u buffer=%px alloc_count=%u prev_offset=%llu\n",
                entry, entry->debug_poison, entry->len,
                iter->pf->head, iter->pf->tail, iter->pf->buffer,