--- initial
+++ final
@@ -1,90 +1,90 @@
 static struct fc_host_statistics *lpfc_get_stats(struct Scsi_Host *shost) {
   struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata;
   struct lpfc_hba *phba = vport->phba;
   struct lpfc_sli *psli = &phba->sli;
   struct fc_host_statistics *hs = &phba->link_stats;
   struct lpfc_lnk_stat *lso = &psli->lnk_stat_offsets;
   LPFC_MBOXQ_t *pmboxq;
   MAILBOX_t *pmb;
-  unsigned long seconds;
+  time64_t seconds;
   int rc = 0;
   /*
    * prevent udev from issuing mailbox commands until the port is
    * configured.
    */
   if (phba->link_state < LPFC_LINK_DOWN || !phba->mbox_mem_pool || (phba->sli.sli_flag & LPFC_SLI_ACTIVE) == 0) return NULL;
   if (phba->sli.sli_flag & LPFC_BLOCK_MGMT_IO) return NULL;
   pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
   if (!pmboxq) return NULL;
   memset(pmboxq, 0, sizeof(LPFC_MBOXQ_t));
   pmb = &pmboxq->u.mb;
   pmb->mbxCommand = MBX_READ_STATUS;
   pmb->mbxOwner = OWN_HOST;
   pmboxq->context1 = NULL;
   pmboxq->vport = vport;
   if (vport->fc_flag & FC_OFFLINE_MODE)
     rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL);
   else
     rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2);
   if (rc != MBX_SUCCESS) {
     if (rc != MBX_TIMEOUT) mempool_free(pmboxq, phba->mbox_mem_pool);
     return NULL;
   }
   memset(hs, 0, sizeof(struct fc_host_statistics));
   hs->tx_frames = pmb->un.varRdStatus.xmitFrameCnt;
   /*
    * The MBX_READ_STATUS returns tx_k_bytes which has to
    * converted to words
    */
   hs->tx_words = (uint64_t)((uint64_t)pmb->un.varRdStatus.xmitByteCnt * (uint64_t)256);
   hs->rx_frames = pmb->un.varRdStatus.rcvFrameCnt;
   hs->rx_words = (uint64_t)((uint64_t)pmb->un.varRdStatus.rcvByteCnt * (uint64_t)256);
   memset(pmboxq, 0, sizeof(LPFC_MBOXQ_t));
   pmb->mbxCommand = MBX_READ_LNK_STAT;
   pmb->mbxOwner = OWN_HOST;
   pmboxq->context1 = NULL;
   pmboxq->vport = vport;
   if (vport->fc_flag & FC_OFFLINE_MODE)
     rc = lpfc_sli_issue_mbox(phba, pmboxq, MBX_POLL);
   else
     rc = lpfc_sli_issue_mbox_wait(phba, pmboxq, phba->fc_ratov * 2);
   if (rc != MBX_SUCCESS) {
     if (rc != MBX_TIMEOUT) mempool_free(pmboxq, phba->mbox_mem_pool);
     return NULL;
   }
   hs->link_failure_count = pmb->un.varRdLnk.linkFailureCnt;
   hs->loss_of_sync_count = pmb->un.varRdLnk.lossSyncCnt;
   hs->loss_of_signal_count = pmb->un.varRdLnk.lossSignalCnt;
   hs->prim_seq_protocol_err_count = pmb->un.varRdLnk.primSeqErrCnt;
   hs->invalid_tx_word_count = pmb->un.varRdLnk.invalidXmitWord;
   hs->invalid_crc_count = pmb->un.varRdLnk.crcCnt;
   hs->error_frames = pmb->un.varRdLnk.crcCnt;
   hs->link_failure_count -= lso->link_failure_count;
   hs->loss_of_sync_count -= lso->loss_of_sync_count;
   hs->loss_of_signal_count -= lso->loss_of_signal_count;
   hs->prim_seq_protocol_err_count -= lso->prim_seq_protocol_err_count;
   hs->invalid_tx_word_count -= lso->invalid_tx_word_count;
   hs->invalid_crc_count -= lso->invalid_crc_count;
   hs->error_frames -= lso->error_frames;
   if (phba->hba_flag & HBA_FCOE_MODE) {
     hs->lip_count = -1;
     hs->nos_count = (phba->link_events >> 1);
     hs->nos_count -= lso->link_events;
   } else if (phba->fc_topology == LPFC_TOPOLOGY_LOOP) {
     hs->lip_count = (phba->fc_eventTag >> 1);
     hs->lip_count -= lso->link_events;
     hs->nos_count = -1;
   } else {
     hs->lip_count = -1;
     hs->nos_count = (phba->fc_eventTag >> 1);
     hs->nos_count -= lso->link_events;
   }
   hs->dumped_frames = -1;
-  seconds = get_seconds();
+  seconds = ktime_get_seconds();
   if (seconds < psli->stats_start)
     hs->seconds_since_last_reset = seconds + ((unsigned long)-1 - psli->stats_start);
   else
     hs->seconds_since_last_reset = seconds - psli->stats_start;
   mempool_free(pmboxq, phba->mbox_mem_pool);
   return hs;
 }<sep>@@
identifier time;
@@
-       unsigned long time;
+       time64_t time;
	<+...
	time =
-       get_seconds()
+       ktime_get_seconds()
	...+>