summaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_device.c
diff options
context:
space:
mode:
authorDouglas Thompson <dougthompson@xmission.com>2007-07-19 01:50:21 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 10:04:56 -0700
commit7391c6dcab3094610cb99bbd559beaa282582eac (patch)
tree29ec05cc8abdb9be8311ea797b29c9c5b9a99aea /drivers/edac/edac_device.c
parent52490c8d07680a7ecc3c1a70a16841455d37e96a (diff)
downloadblackbird-op-linux-7391c6dcab3094610cb99bbd559beaa282582eac.tar.gz
blackbird-op-linux-7391c6dcab3094610cb99bbd559beaa282582eac.zip
drivers/edac: mod edac_align_ptr function
Refactor the edac_align_ptr() function to reduce the noise of casting the aligned pointer to the various types of data objects and modified its callers to its new signature Signed-off-by: Douglas Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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(
dev_ctl = (struct edac_device_ctl_info *)NULL;
/* Calc the 'end' offset past the ctl_info structure */
- dev_inst = (struct edac_device_instance *)
- edac_align_ptr(&dev_ctl[1], sizeof(*dev_inst));
+ dev_inst = edac_align_ptr(&dev_ctl[1], sizeof(*dev_inst));
/* Calc the 'end' offset past the instance array */
- dev_blk = (struct edac_device_block *)
- edac_align_ptr(&dev_inst[nr_instances], sizeof(*dev_blk));
+ dev_blk = edac_align_ptr(&dev_inst[nr_instances], sizeof(*dev_blk));
/* Calc the 'end' offset past the dev_blk array */
count = nr_instances * nr_blocks;
- dev_attrib = (struct edac_attrib *)
- edac_align_ptr(&dev_blk[count], sizeof(*dev_attrib));
+ dev_attrib = edac_align_ptr(&dev_blk[count], sizeof(*dev_attrib));
/* Check for case of NO attributes specified */
if (nr_attribs > 0)
OpenPOWER on IntegriCloud