diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-16 09:18:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-28 18:10:59 -0400 |
commit | 93e4fe64ece4eccf0ff4ac69bceb389290b8ab7c (patch) | |
tree | 5794c15f0d2c47568e49379b56e9a8d139532050 /drivers/edac/edac_module.h | |
parent | a895bf8b1e1ea4c032a8fa8a09475a2ce09fe77a (diff) |
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 | |||
50 | *edac_dev, unsigned long value); | 50 | *edac_dev, unsigned long value); |
51 | extern void edac_mc_reset_delay_period(int value); | 51 | extern void edac_mc_reset_delay_period(int value); |
52 | 52 | ||
53 | extern void *edac_align_ptr(void *ptr, unsigned size); | 53 | extern void *edac_align_ptr(void **p, unsigned size, int n_elems); |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * EDAC PCI functions | 56 | * EDAC PCI functions |