}
 }
 
-const char *
+static const char *
 hisi_sas_debugfs_to_reg_name(int off, int base_off,
                             const struct hisi_sas_debugfs_reg_lu *lu)
 {
 
                if (name)
                        seq_printf(s, "0x%08x 0x%08x %s\n", off,
-                                  le32_to_cpu(regs_val[i]), name);
+                                  regs_val[i], name);
                else
                        seq_printf(s, "0x%08x 0x%08x\n", off,
-                                  le32_to_cpu(regs_val[i]));
+                                  regs_val[i]);
        }
 }
 
        const struct hisi_sas_hw *hw = hisi_hba->hw;
        const struct hisi_sas_debugfs_reg *reg_global = hw->debugfs_reg_global;
 
-       hisi_sas_debugfs_print_reg((u32 *)hisi_hba->debugfs_global_reg,
+       hisi_sas_debugfs_print_reg(hisi_hba->debugfs_global_reg,
                                   reg_global, s);
 
        return 0;
 };
 
 static int hisi_sas_show_row_64(struct seq_file *s, int index,
-                               int sz, u64 *ptr)
+                               int sz, __le64 *ptr)
 {
        int i;
 
 }
 
 static int hisi_sas_show_row_32(struct seq_file *s, int index,
-                               int sz, u32 *ptr)
+                               int sz, __le32 *ptr)
 {
        int i;
 
        struct hisi_sas_cq *cq = cq_ptr;
        struct hisi_hba *hisi_hba = cq->hisi_hba;
        void *complete_queue = hisi_hba->debugfs_complete_hdr[cq->id];
-       void *complete_hdr = complete_queue +
+       __le32 *complete_hdr = complete_queue +
                        (hisi_hba->hw->complete_hdr_size * slot);
 
        return hisi_sas_show_row_32(s, slot,
        struct hisi_sas_dq *dq = dq_ptr;
        struct hisi_hba *hisi_hba = dq->hisi_hba;
        void *cmd_queue = hisi_hba->debugfs_cmd_hdr[dq->id];
-       void *cmd_hdr = cmd_queue +
-               hisi_hba->hw->complete_hdr_size * slot;
+       __le32 *cmd_hdr = cmd_queue +
+               sizeof(struct hisi_sas_cmd_hdr) * slot;
 
        return hisi_sas_show_row_32(s, slot, sizeof(struct hisi_sas_cmd_hdr),
                                    cmd_hdr);
        struct hisi_hba *hisi_hba = s->private;
        struct hisi_sas_iost *debugfs_iost = hisi_hba->debugfs_iost;
        int i, ret, max_command_entries = hisi_hba->hw->max_command_entries;
+       __le64 *iost = &debugfs_iost->qw0;
 
        for (i = 0; i < max_command_entries; i++, debugfs_iost++) {
                ret = hisi_sas_show_row_64(s, i, sizeof(*debugfs_iost),
-                                          (u64 *)debugfs_iost);
+                                          iost);
                if (ret)
                        return ret;
        }