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.

Bluetooth: 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>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Erick Archer and committed by
Luiz Augusto von Dentz
973dd9c4 183469bc

+5 -6
+1 -1
drivers/bluetooth/btrtl.c
··· 811 811 struct sk_buff *skb; 812 812 struct hci_rp_read_local_version *rp; 813 813 814 - dl_cmd = kmalloc(sizeof(struct rtl_download_cmd), GFP_KERNEL); 814 + dl_cmd = kmalloc(sizeof(*dl_cmd), GFP_KERNEL); 815 815 if (!dl_cmd) 816 816 return -ENOMEM; 817 817
+1 -1
drivers/bluetooth/hci_ldisc.c
··· 488 488 if (tty->ops->write == NULL) 489 489 return -EOPNOTSUPP; 490 490 491 - hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL); 491 + hu = kzalloc(sizeof(*hu), GFP_KERNEL); 492 492 if (!hu) { 493 493 BT_ERR("Can't allocate control structure"); 494 494 return -ENFILE;
+2 -3
drivers/bluetooth/hci_qca.c
··· 569 569 if (!hci_uart_has_flow_control(hu)) 570 570 return -EOPNOTSUPP; 571 571 572 - qca = kzalloc(sizeof(struct qca_data), GFP_KERNEL); 572 + qca = kzalloc(sizeof(*qca), GFP_KERNEL); 573 573 if (!qca) 574 574 return -ENOMEM; 575 575 ··· 1040 1040 } 1041 1041 1042 1042 if (!qca_memdump) { 1043 - qca_memdump = kzalloc(sizeof(struct qca_memdump_info), 1044 - GFP_ATOMIC); 1043 + qca_memdump = kzalloc(sizeof(*qca_memdump), GFP_ATOMIC); 1045 1044 if (!qca_memdump) { 1046 1045 mutex_unlock(&qca->hci_memdump_lock); 1047 1046 return;
+1 -1
drivers/bluetooth/hci_vhci.c
··· 633 633 { 634 634 struct vhci_data *data; 635 635 636 - data = kzalloc(sizeof(struct vhci_data), GFP_KERNEL); 636 + data = kzalloc(sizeof(*data), GFP_KERNEL); 637 637 if (!data) 638 638 return -ENOMEM; 639 639