Staging: sm7xx: preferred form for passing a size to memory allocation routines
PATCH 2/3 Staging: sm7xx: preferred form for passing a size to memory allocation routines
The preferred form for passing a size of a struct is the following:
p = kmalloc(sizeof(*p), ...);
Please refer Documentation/Codingstyle chapter 14
Signed-off-by anish kumar <[email protected]>
Acked-by Harry Wei <[email protected]>
--- drivers/staging/sm7xx/smtcfb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/sm7xx/smtcfb.c +1 -1
@@ -714,7 +714,7 @@ static struct smtcfb_info *smtc_alloc_fb_info(struct pci_dev *dev, {struct smtcfb_info *sfb; - sfb =kzalloc (sizeof (struct smtcfb_info ),GFP_KERNEL ); + sfb =kzalloc (sizeof (*sfb),GFP_KERNEL );if (!sfb)return NULL ;
Signature · 1 line
1.7.0.4
Quoted 6 lines · anish
The preferred form for passing a size of a struct is the following:
p = kmalloc(sizeof(*p), ...);Please refer
Documentation/Codingstylechapter 14Signed-off-by anish kumar <[email protected]>Acked-by Harry Wei <[email protected]>
What's with the extra spaces at the beginning of the lines?
And I never got patch 1/3 in my inbox.
You also need to put your full name in the "From:" line, like you did for the signed-off-by: line.
So, care to try again?
thanks,
greg k-h