aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_device.c')
-rw-r--r--drivers/edac/edac_device.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 3ccadda3e723..d60f5df87af5 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -89,17 +89,14 @@ struct edac_device_ctl_info *edac_device_alloc_ctl_info(
89 dev_ctl = (struct edac_device_ctl_info *)NULL; 89 dev_ctl = (struct edac_device_ctl_info *)NULL;
90 90
91 /* Calc the 'end' offset past the ctl_info structure */ 91 /* Calc the 'end' offset past the ctl_info structure */
92 dev_inst = (struct edac_device_instance *) 92 dev_inst = edac_align_ptr(&dev_ctl[1], sizeof(*dev_inst));
93 edac_align_ptr(&dev_ctl[1], sizeof(*dev_inst));
94 93
95 /* Calc the 'end' offset past the instance array */ 94 /* Calc the 'end' offset past the instance array */
96 dev_blk = (struct edac_device_block *) 95 dev_blk = edac_align_ptr(&dev_inst[nr_instances], sizeof(*dev_blk));
97 edac_align_ptr(&dev_inst[nr_instances], sizeof(*dev_blk));
98 96
99 /* Calc the 'end' offset past the dev_blk array */ 97 /* Calc the 'end' offset past the dev_blk array */
100 count = nr_instances * nr_blocks; 98 count = nr_instances * nr_blocks;
101 dev_attrib = (struct edac_attrib *) 99 dev_attrib = edac_align_ptr(&dev_blk[count], sizeof(*dev_attrib));
102 edac_align_ptr(&dev_blk[count], sizeof(*dev_attrib));
103 100
104 /* Check for case of NO attributes specified */ 101 /* Check for case of NO attributes specified */
105 if (nr_attribs > 0) 102 if (nr_attribs > 0)