edac: rewrite edac_align_ptr()
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 16 Apr 2012 13:18:12 +0000 (10:18 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 28 May 2012 22:10:59 +0000 (19:10 -0300)
commit93e4fe64ece4eccf0ff4ac69bceb389290b8ab7c
tree5794c15f0d2c47568e49379b56e9a8d139532050
parenta895bf8b1e1ea4c032a8fa8a09475a2ce09fe77a
edac: rewrite edac_align_ptr()

The edac_align_ptr() function is used to prepare data for a single
memory allocation kzalloc() call. It counts how many bytes are needed
by some data structure.

Using it as-is is not that trivial, as the quantity of memory elements
reserved is not there, but, instead, it is on a next call.

In order to avoid mistakes when using it, move the number of allocated
elements into it, making easier to use it.

Reviewed-by: Borislav Petkov <bp@amd64.org>
Cc: Aristeu Rozanski <arozansk@redhat.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/edac/edac_device.c
drivers/edac/edac_mc.c
drivers/edac/edac_module.h
drivers/edac/edac_pci.c