public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Justin Tee <justin.tee@broadcom.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: James Smart <james.smart@broadcom.com>,
	Dick Kennedy <dick.kennedy@broadcom.com>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/1] scsi: lpfc: Switch to use %ptTs
Date: Thu,  6 Feb 2025 17:58:22 +0200	[thread overview]
Message-ID: <20250206155822.1126056-1-andriy.shevchenko@linux.intel.com> (raw)

Use %ptTs instead of open-coded variant to print contents of time64_t type
in human readable form.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index e360fc79b028..240e92143d73 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -5643,24 +5643,11 @@ void
 lpfc_cgn_update_tstamp(struct lpfc_hba *phba, struct lpfc_cgn_ts *ts)
 {
 	struct timespec64 cur_time;
-	struct tm tm_val;
 
 	ktime_get_real_ts64(&cur_time);
-	time64_to_tm(cur_time.tv_sec, 0, &tm_val);
-
-	ts->month = tm_val.tm_mon + 1;
-	ts->day	= tm_val.tm_mday;
-	ts->year = tm_val.tm_year - 100;
-	ts->hour = tm_val.tm_hour;
-	ts->minute = tm_val.tm_min;
-	ts->second = tm_val.tm_sec;
 
 	lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT,
-			"2646 Updated CMF timestamp : "
-			"%u/%u/%u %u:%u:%u\n",
-			ts->day, ts->month,
-			ts->year, ts->hour,
-			ts->minute, ts->second);
+			"2646 Updated CMF timestamp : %ptTs\n", cur_time);
 }
 
 /**
-- 
2.43.0.rc1.1336.g36b5255a03ac


             reply	other threads:[~2025-02-06 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06 15:58 Andy Shevchenko [this message]
2025-02-06 16:52 ` [PATCH v1 1/1] scsi: lpfc: Switch to use %ptTs Thomas Weißschuh
2025-02-06 18:57   ` Andy Shevchenko
2025-02-06 18:16 ` Justin Tee
2025-02-06 18:57   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250206155822.1126056-1-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=justin.tee@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox