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.

Merge tag 'libata-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata

Pull libata fixes from Damien Le Moal:
"Two sparse warning fixes and a couple of patches to fix an issue with
sata_fsl driver module removal:

- A couple of patches to avoid sparse warnings in libata-sata and in
the pata_falcon driver (from Yang and Finn).

- A couple of sata_fsl driver patches fixing IRQ free and proc
unregister on module removal (from Baokun)"

* tag 'libata-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
ata: replace snprintf in show functions with sysfs_emit
sata_fsl: fix warning in remove_proc_entry when rmmod sata_fsl
sata_fsl: fix UAF in sata_fsl_port_stop when rmmod sata_fsl
pata_falcon: Avoid type warnings from sparse

+22 -16
+1 -1
drivers/ata/libata-sata.c
··· 827 827 if (ap->target_lpm_policy >= ARRAY_SIZE(ata_lpm_policy_names)) 828 828 return -EINVAL; 829 829 830 - return snprintf(buf, PAGE_SIZE, "%s\n", 830 + return sysfs_emit(buf, "%s\n", 831 831 ata_lpm_policy_names[ap->target_lpm_policy]); 832 832 } 833 833 DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
+8 -8
drivers/ata/pata_falcon.c
··· 55 55 /* Transfer multiple of 2 bytes */ 56 56 if (rw == READ) { 57 57 if (swap) 58 - raw_insw_swapw((u16 *)data_addr, (u16 *)buf, words); 58 + raw_insw_swapw(data_addr, (u16 *)buf, words); 59 59 else 60 - raw_insw((u16 *)data_addr, (u16 *)buf, words); 60 + raw_insw(data_addr, (u16 *)buf, words); 61 61 } else { 62 62 if (swap) 63 - raw_outsw_swapw((u16 *)data_addr, (u16 *)buf, words); 63 + raw_outsw_swapw(data_addr, (u16 *)buf, words); 64 64 else 65 - raw_outsw((u16 *)data_addr, (u16 *)buf, words); 65 + raw_outsw(data_addr, (u16 *)buf, words); 66 66 } 67 67 68 68 /* Transfer trailing byte, if any. */ ··· 74 74 75 75 if (rw == READ) { 76 76 if (swap) 77 - raw_insw_swapw((u16 *)data_addr, (u16 *)pad, 1); 77 + raw_insw_swapw(data_addr, (u16 *)pad, 1); 78 78 else 79 - raw_insw((u16 *)data_addr, (u16 *)pad, 1); 79 + raw_insw(data_addr, (u16 *)pad, 1); 80 80 *buf = pad[0]; 81 81 } else { 82 82 pad[0] = *buf; 83 83 if (swap) 84 - raw_outsw_swapw((u16 *)data_addr, (u16 *)pad, 1); 84 + raw_outsw_swapw(data_addr, (u16 *)pad, 1); 85 85 else 86 - raw_outsw((u16 *)data_addr, (u16 *)pad, 1); 86 + raw_outsw(data_addr, (u16 *)pad, 1); 87 87 } 88 88 words++; 89 89 }
+13 -7
drivers/ata/sata_fsl.c
··· 1394 1394 return 0; 1395 1395 } 1396 1396 1397 + static void sata_fsl_host_stop(struct ata_host *host) 1398 + { 1399 + struct sata_fsl_host_priv *host_priv = host->private_data; 1400 + 1401 + iounmap(host_priv->hcr_base); 1402 + kfree(host_priv); 1403 + } 1404 + 1397 1405 /* 1398 1406 * scsi mid-layer and libata interface structures 1399 1407 */ ··· 1433 1425 1434 1426 .port_start = sata_fsl_port_start, 1435 1427 .port_stop = sata_fsl_port_stop, 1428 + 1429 + .host_stop = sata_fsl_host_stop, 1436 1430 1437 1431 .pmp_attach = sata_fsl_pmp_attach, 1438 1432 .pmp_detach = sata_fsl_pmp_detach, ··· 1490 1480 host_priv->ssr_base = ssr_base; 1491 1481 host_priv->csr_base = csr_base; 1492 1482 1493 - irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); 1494 - if (!irq) { 1495 - dev_err(&ofdev->dev, "invalid irq from platform\n"); 1483 + irq = platform_get_irq(ofdev, 0); 1484 + if (irq < 0) { 1485 + retval = irq; 1496 1486 goto error_exit_with_cleanup; 1497 1487 } 1498 1488 host_priv->irq = irq; ··· 1566 1556 device_remove_file(&ofdev->dev, &host_priv->rx_watermark); 1567 1557 1568 1558 ata_host_detach(host); 1569 - 1570 - irq_dispose_mapping(host_priv->irq); 1571 - iounmap(host_priv->hcr_base); 1572 - kfree(host_priv); 1573 1559 1574 1560 return 0; 1575 1561 }