Commit de4921ce authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata

Pull libata fixes from Tejun Heo:
 "Two trivial fixes - one for a bug in the allocation failure path and
  the other a compiler warning fix"

* 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  ata: sata_mv: fix mis-conversion in mv_write_cached_reg()
  ata: fix return value check in ahci_seattle_get_port_info()
parents 595d9e34 76bf3441
...@@ -137,7 +137,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info( ...@@ -137,7 +137,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info(
u32 val; u32 val;
plat_data = devm_kzalloc(dev, sizeof(*plat_data), GFP_KERNEL); plat_data = devm_kzalloc(dev, sizeof(*plat_data), GFP_KERNEL);
if (IS_ERR(plat_data)) if (!plat_data)
return &ahci_port_info; return &ahci_port_info;
plat_data->sgpio_ctrl = devm_ioremap_resource(dev, plat_data->sgpio_ctrl = devm_ioremap_resource(dev,
......
...@@ -986,7 +986,7 @@ static inline void mv_write_cached_reg(void __iomem *addr, u32 *old, u32 new) ...@@ -986,7 +986,7 @@ static inline void mv_write_cached_reg(void __iomem *addr, u32 *old, u32 new)
* Looks like a lot of fuss, but it avoids an unnecessary * Looks like a lot of fuss, but it avoids an unnecessary
* +1 usec read-after-write delay for unaffected registers. * +1 usec read-after-write delay for unaffected registers.
*/ */
laddr = (long)addr & 0xffff; laddr = (unsigned long)addr & 0xffff;
if (laddr >= 0x300 && laddr <= 0x33c) { if (laddr >= 0x300 && laddr <= 0x33c) {
laddr &= 0x000f; laddr &= 0x000f;
if (laddr == 0x4 || laddr == 0xc) { if (laddr == 0x4 || laddr == 0xc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment