svn commit: r240671 - head/sys/dev/nvme
Jim Harris
jimharris at FreeBSD.org
Tue Sep 18 18:16:53 UTC 2012
Author: jimharris
Date: Tue Sep 18 18:16:52 2012
New Revision: 240671
URL: http://svn.freebsd.org/changeset/base/240671
Log:
Add __aligned(4) to NVMe defined data structures.
This fixes issue in nvmecontrol(8), where clang throws a cast-align
warning when casting a __packed structure pointer to a uint32_t
pointer as part of printing raw hex output.
Reported by: dhw
Modified:
head/sys/dev/nvme/nvme.h
Modified: head/sys/dev/nvme/nvme.h
==============================================================================
--- head/sys/dev/nvme/nvme.h Tue Sep 18 17:30:08 2012 (r240670)
+++ head/sys/dev/nvme/nvme.h Tue Sep 18 18:16:52 2012 (r240671)
@@ -513,7 +513,7 @@ struct nvme_controller_data {
/* bytes 3072-4095: vendor specific */
uint8_t reserved7[1024];
-} __packed;
+} __packed __aligned(4);
struct nvme_namespace_data {
@@ -603,7 +603,7 @@ struct nvme_namespace_data {
uint8_t reserved6[192];
uint8_t vendor_specific[3712];
-};
+} __packed __aligned(4);
enum nvme_log_page {
@@ -661,7 +661,7 @@ struct nvme_health_information_page {
uint64_t num_error_info_log_entries[2];
uint8_t reserved2[320];
-} __packed;
+} __packed __aligned(4);
#define NVME_TEST_MAX_THREADS 128
More information about the svn-src-all
mailing list