From 7391c6dcab3094610cb99bbd559beaa282582eac Mon Sep 17 00:00:00 2001 From: Douglas Thompson Date: Thu, 19 Jul 2007 01:50:21 -0700 Subject: 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/edac/edac_device.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/edac/edac_device.c') 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) -- cgit v1.2.3