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: misc - 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/AS8PR02MB7237884EB989EFF55D1BEF8B8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Erick Archer and committed by
Dmitry Torokhov
a0bd7ada bb8706a4

+9 -9
+1 -1
drivers/input/misc/88pm80x_onkey.c
··· 57 57 struct pm80x_onkey_info *info; 58 58 int err; 59 59 60 - info = kzalloc(sizeof(struct pm80x_onkey_info), GFP_KERNEL); 60 + info = kzalloc(sizeof(*info), GFP_KERNEL); 61 61 if (!info) 62 62 return -ENOMEM; 63 63
+1 -1
drivers/input/misc/cma3000_d0x.c
··· 292 292 goto err_out; 293 293 } 294 294 295 - data = kzalloc(sizeof(struct cma3000_accl_data), GFP_KERNEL); 295 + data = kzalloc(sizeof(*data), GFP_KERNEL); 296 296 input_dev = input_allocate_device(); 297 297 if (!data || !input_dev) { 298 298 error = -ENOMEM;
+2 -2
drivers/input/misc/ims-pcu.c
··· 287 287 struct input_dev *input; 288 288 int error; 289 289 290 - gamepad = kzalloc(sizeof(struct ims_pcu_gamepad), GFP_KERNEL); 290 + gamepad = kzalloc(sizeof(*gamepad), GFP_KERNEL); 291 291 input = input_allocate_device(); 292 292 if (!gamepad || !input) { 293 293 dev_err(pcu->dev, ··· 1993 1993 struct ims_pcu *pcu; 1994 1994 int error; 1995 1995 1996 - pcu = kzalloc(sizeof(struct ims_pcu), GFP_KERNEL); 1996 + pcu = kzalloc(sizeof(*pcu), GFP_KERNEL); 1997 1997 if (!pcu) 1998 1998 return -ENOMEM; 1999 1999
+1 -1
drivers/input/misc/max8997_haptic.c
··· 249 249 return -EINVAL; 250 250 } 251 251 252 - chip = kzalloc(sizeof(struct max8997_haptic), GFP_KERNEL); 252 + chip = kzalloc(sizeof(*chip), GFP_KERNEL); 253 253 input_dev = input_allocate_device(); 254 254 if (!chip || !input_dev) { 255 255 dev_err(&pdev->dev, "unable to allocate memory\n");
+1 -1
drivers/input/misc/pcap_keys.c
··· 49 49 struct pcap_keys *pcap_keys; 50 50 struct input_dev *input_dev; 51 51 52 - pcap_keys = kmalloc(sizeof(struct pcap_keys), GFP_KERNEL); 52 + pcap_keys = kmalloc(sizeof(*pcap_keys), GFP_KERNEL); 53 53 if (!pcap_keys) 54 54 return err; 55 55
+1 -1
drivers/input/misc/powermate.c
··· 320 320 0, interface->desc.bInterfaceNumber, NULL, 0, 321 321 USB_CTRL_SET_TIMEOUT); 322 322 323 - pm = kzalloc(sizeof(struct powermate_device), GFP_KERNEL); 323 + pm = kzalloc(sizeof(*pm), GFP_KERNEL); 324 324 input_dev = input_allocate_device(); 325 325 if (!pm || !input_dev) 326 326 goto fail1;
+1 -1
drivers/input/misc/uinput.c
··· 379 379 { 380 380 struct uinput_device *newdev; 381 381 382 - newdev = kzalloc(sizeof(struct uinput_device), GFP_KERNEL); 382 + newdev = kzalloc(sizeof(*newdev), GFP_KERNEL); 383 383 if (!newdev) 384 384 return -ENOMEM; 385 385
+1 -1
drivers/input/misc/yealink.c
··· 868 868 if (!usb_endpoint_is_int_in(endpoint)) 869 869 return -ENODEV; 870 870 871 - yld = kzalloc(sizeof(struct yealink_dev), GFP_KERNEL); 871 + yld = kzalloc(sizeof(*yld), GFP_KERNEL); 872 872 if (!yld) 873 873 return -ENOMEM; 874 874