• M
    edac: rewrite edac_align_ptr() · 93e4fe64
    Mauro Carvalho Chehab 提交于
    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: NBorislav Petkov <bp@amd64.org>
    Cc: Aristeu Rozanski <arozansk@redhat.com>
    Cc: Doug Thompson <norsk5@yahoo.com>
    Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
    93e4fe64
edac_mc.c 25.0 KB