Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: keyboard - use sizeof(*pointer) instead of sizeof(type)

It is preferred to use sizeof(*pointer) instead of sizeof(type)
due to the type of the variable can change and one needs not
change the former (unlike the latter). This patch has no effect
on runtime behavior.

Signed-off-by: Erick Archer <erick.archer@outlook.com>
Link: https://lore.kernel.org/r/AS8PR02MB7237277464F23CA168BFB3B18BF52@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Erick Archer and committed by
Dmitry Torokhov
bb8706a4 6c7cc1a2

+8 -8
+1 -1
drivers/input/keyboard/atkbd.c
··· 1279 1279 struct input_dev *dev; 1280 1280 int err = -ENOMEM; 1281 1281 1282 - atkbd = kzalloc(sizeof(struct atkbd), GFP_KERNEL); 1282 + atkbd = kzalloc(sizeof(*atkbd), GFP_KERNEL); 1283 1283 dev = input_allocate_device(); 1284 1284 if (!atkbd || !dev) 1285 1285 goto fail1;
+1 -1
drivers/input/keyboard/lkkbd.c
··· 608 608 int i; 609 609 int err; 610 610 611 - lk = kzalloc(sizeof(struct lkkbd), GFP_KERNEL); 611 + lk = kzalloc(sizeof(*lk), GFP_KERNEL); 612 612 input_dev = input_allocate_device(); 613 613 if (!lk || !input_dev) { 614 614 err = -ENOMEM;
+1 -1
drivers/input/keyboard/locomokbd.c
··· 227 227 struct input_dev *input_dev; 228 228 int i, err; 229 229 230 - locomokbd = kzalloc(sizeof(struct locomokbd), GFP_KERNEL); 230 + locomokbd = kzalloc(sizeof(*locomokbd), GFP_KERNEL); 231 231 input_dev = input_allocate_device(); 232 232 if (!locomokbd || !input_dev) { 233 233 err = -ENOMEM;
+1 -1
drivers/input/keyboard/maple_keyb.c
··· 154 154 mdev = to_maple_dev(dev); 155 155 mdrv = to_maple_driver(dev->driver); 156 156 157 - kbd = kzalloc(sizeof(struct dc_kbd), GFP_KERNEL); 157 + kbd = kzalloc(sizeof(*kbd), GFP_KERNEL); 158 158 if (!kbd) { 159 159 error = -ENOMEM; 160 160 goto fail;
+1 -1
drivers/input/keyboard/newtonkbd.c
··· 68 68 int err = -ENOMEM; 69 69 int i; 70 70 71 - nkbd = kzalloc(sizeof(struct nkbd), GFP_KERNEL); 71 + nkbd = kzalloc(sizeof(*nkbd), GFP_KERNEL); 72 72 input_dev = input_allocate_device(); 73 73 if (!nkbd || !input_dev) 74 74 goto fail1;
+1 -1
drivers/input/keyboard/stowaway.c
··· 72 72 int err = -ENOMEM; 73 73 int i; 74 74 75 - skbd = kzalloc(sizeof(struct skbd), GFP_KERNEL); 75 + skbd = kzalloc(sizeof(*skbd), GFP_KERNEL); 76 76 input_dev = input_allocate_device(); 77 77 if (!skbd || !input_dev) 78 78 goto fail1;
+1 -1
drivers/input/keyboard/sunkbd.c
··· 263 263 int err = -ENOMEM; 264 264 int i; 265 265 266 - sunkbd = kzalloc(sizeof(struct sunkbd), GFP_KERNEL); 266 + sunkbd = kzalloc(sizeof(*sunkbd), GFP_KERNEL); 267 267 input_dev = input_allocate_device(); 268 268 if (!sunkbd || !input_dev) 269 269 goto fail1;
+1 -1
drivers/input/keyboard/xtkbd.c
··· 70 70 int err = -ENOMEM; 71 71 int i; 72 72 73 - xtkbd = kmalloc(sizeof(struct xtkbd), GFP_KERNEL); 73 + xtkbd = kmalloc(sizeof(*xtkbd), GFP_KERNEL); 74 74 input_dev = input_allocate_device(); 75 75 if (!xtkbd || !input_dev) 76 76 goto fail1;