diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-16 10:18:12 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-28 19:10:59 -0300 |
commit | 93e4fe64ece4eccf0ff4ac69bceb389290b8ab7c (patch) | |
tree | 5794c15f0d2c47568e49379b56e9a8d139532050 /drivers/edac/edac_module.h | |
parent | a895bf8b1e1ea4c032a8fa8a09475a2ce09fe77a (diff) | |
download | linux-93e4fe64ece4eccf0ff4ac69bceb389290b8ab7c.tar.bz2 |
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>
Diffstat (limited to 'drivers/edac/edac_module.h')
-rw-r--r-- | drivers/edac/edac_module.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/edac_module.h b/drivers/edac/edac_module.h index 00f81b47a51f..0ea7d14cb930 100644 --- a/drivers/edac/edac_module.h +++ b/drivers/edac/edac_module.h @@ -50,7 +50,7 @@ extern void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev, unsigned long value); extern void edac_mc_reset_delay_period(int value); -extern void *edac_align_ptr(void *ptr, unsigned size); +extern void *edac_align_ptr(void **p, unsigned size, int n_elems); /* * EDAC PCI functions |