public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* libata-acpi.c ata_acpi_register_power_resource copy and paste mistake ?
@ 2013-02-28 16:45 Sander Eikelenboom
  2013-03-01  1:59 ` Aaron Lu
  0 siblings, 1 reply; 7+ messages in thread
From: Sander Eikelenboom @ 2013-02-28 16:45 UTC (permalink / raw)
  To: Jeff Garzik, linux-kernel; +Cc: linux-ide

Hi Jeff,

During the last merge of ahci code (d9978ec5680059d727b39d6c706777c6973587f2), i saw this coming by:


--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1024,30 +1024,20 @@ static void ata_acpi_register_power_resource(struct ata_device *dev)
 {
        struct scsi_device *sdev = dev->sdev;
        acpi_handle handle;
-       struct device *device;
 
        handle = ata_dev_acpi_handle(dev);
-       if (!handle)
-               return;
-
-       device = &sdev->sdev_gendev;
-
-       acpi_power_resource_register_device(device, handle);
+       if (handle)
+               acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);
 }

shouldn't:

acpi_dev_pm_remove_dependent(handle, &sdev->sdev_gendev);

be

acpi_dev_pm_add_dependent(handle, &sdev->sdev_gendev);

in the ata_acpi_register_power_resource function ?

(seems like a copy and paste mistake from the unregister function)

--
Sander




^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH] libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource
@ 2013-03-01 14:33 Sedat Dilek
  0 siblings, 0 replies; 7+ messages in thread
From: Sedat Dilek @ 2013-03-01 14:33 UTC (permalink / raw)
  To: Sander Eikelenboom
  Cc: Rafael J. Wysocki, Linux PM List, LKML, Linux ACPI, linux-next,
	Stephen Rothwell

Original posting see [1].

Good catch!

Latest Linux-Next (next-20130301) is also affected!

The patch can be easily grabbed from [2].

Sander pointed to the mismatch in [3].

- Sedat -

[1] http://marc.info/?l=linux-kernel&m=136213666529000&w=2
[2] https://patchwork.kernel.org/patch/2200901/
[3] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8#patch5

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-04 22:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-28 16:45 libata-acpi.c ata_acpi_register_power_resource copy and paste mistake ? Sander Eikelenboom
2013-03-01  1:59 ` Aaron Lu
2013-03-01  2:11   ` Rafael J. Wysocki
2013-03-01 11:16     ` [PATCH] libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource Sander Eikelenboom
2013-03-01 16:34       ` Rafael J. Wysocki
2013-03-04 22:15       ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2013-03-01 14:33 Sedat Dilek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox