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

PCI/VGA: Remove empty vga_arb_device_card_gone()

vga_arb_device_card_gone() has always been empty. Remove it.

Link: https://lore.kernel.org/r/20220224224753.297579-9-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

+1 -15
+1 -15
drivers/pci/vgaarb.c
··· 123 123 /* this is only used a cookie - it should not be dereferenced */ 124 124 static struct pci_dev *vga_default; 125 125 126 - static void vga_arb_device_card_gone(struct pci_dev *pdev); 127 - 128 126 /* Find somebody in our list */ 129 127 static struct vga_device *vgadev_find(struct pci_dev *pdev) 130 128 { ··· 876 878 /* Remove entry from list */ 877 879 list_del(&vgadev->list); 878 880 vga_count--; 879 - /* Notify userland driver that the device is gone so it discards 880 - * it's copies of the pci_dev pointer 881 - */ 882 - vga_arb_device_card_gone(pdev); 883 881 884 882 /* Wake up all possible waiters */ 885 883 wake_up_all(&vga_wait_queue); ··· 1125 1131 if (lbuf == NULL) 1126 1132 return -ENOMEM; 1127 1133 1128 - /* Shields against vga_arb_device_card_gone (pci_dev going 1129 - * away), and allows access to vga list 1130 - */ 1134 + /* Protects vga_list */ 1131 1135 spin_lock_irqsave(&vga_lock, flags); 1132 1136 1133 1137 /* If we are targeting the default, use it */ ··· 1142 1150 /* Wow, it's not in the list, that shouldn't happen, 1143 1151 * let's fix us up and return invalid card 1144 1152 */ 1145 - if (pdev == priv->target) 1146 - vga_arb_device_card_gone(pdev); 1147 1153 spin_unlock_irqrestore(&vga_lock, flags); 1148 1154 len = sprintf(lbuf, "invalid"); 1149 1155 goto done; ··· 1483 1493 kfree(priv); 1484 1494 1485 1495 return 0; 1486 - } 1487 - 1488 - static void vga_arb_device_card_gone(struct pci_dev *pdev) 1489 - { 1490 1496 } 1491 1497 1492 1498 /*