Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48100b0e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley
Browse files

megaraid_sas : move endianness conversion into caller of megasas_get_seq_num



Converting structure fields in place is always a bad idea, and in this case
by moving it into the only caller we also only have to do a single byte
swap as most fields of this structure are never used.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSumit Saxena <sumit.saxena@avagotech.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent c6f5bf81
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -4887,11 +4887,11 @@ megasas_get_seq_num(struct megasas_instance *instance,
		/*
		 * Copy the data back into callers buffer
		 */
		eli->newest_seq_num = le32_to_cpu(el_info->newest_seq_num);
		eli->oldest_seq_num = le32_to_cpu(el_info->oldest_seq_num);
		eli->clear_seq_num = le32_to_cpu(el_info->clear_seq_num);
		eli->shutdown_seq_num = le32_to_cpu(el_info->shutdown_seq_num);
		eli->boot_seq_num = le32_to_cpu(el_info->boot_seq_num);
		eli->newest_seq_num = el_info->newest_seq_num;
		eli->oldest_seq_num = el_info->oldest_seq_num;
		eli->clear_seq_num = el_info->clear_seq_num;
		eli->shutdown_seq_num = el_info->shutdown_seq_num;
		eli->boot_seq_num = el_info->boot_seq_num;
	}

	pci_free_consistent(instance->pdev, sizeof(struct megasas_evt_log_info),
@@ -5051,7 +5051,7 @@ static int megasas_start_aen(struct megasas_instance *instance)
	class_locale.members.class = MR_EVT_CLASS_DEBUG;

	return megasas_register_aen(instance,
			eli.newest_seq_num + 1,
			le32_to_cpu(eli.newest_seq_num) + 1,
			class_locale.word);
}