Skip to contentSkip to conversation

pci: Don't pass negative errno to 'error_set_errno()'

PATCH In review SeokYeon Hwang 3 participants 4 messages Nov 12, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: Don't pass negative errno to 'error_set_errno()'

---
 hw/pci/pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci/pcie.c +1 -1
index 58455bd..2902f7d 100644
@@ -229,7 +229,7 @@ static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev,
         /* the slot is electromechanically locked.
          * This error is propagated up to qdev and then to HMP/QMP.
          */
-        error_setg_errno(errp, -EBUSY, "slot is electromechanically locked");
+        error_setg_errno(errp, EBUSY, "slot is electromechanically locked");
     }
 }
 
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#1 lore raw

Copying maintainer and -trivial.

In the future, please copy maintainers. You can use "scripts/get_maintainer.pl --no-git-fallback" to find them.

Quoted 10 lines · SeokYeon Hwang
---
 hw/pci/pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci/pcie.c +0 -0
index 58455bd..2902f7d 100644

hw/pci/pcie.c static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev, · line 234

Quoted 7 lines
hw/pci/pcie.c +1 -1
@@ -229,7 +229,7 @@ static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev,
         /* the slot is electromechanically locked.
          * This error is propagated up to qdev and then to HMP/QMP.
          */
-        error_setg_errno(errp, -EBUSY, "slot is electromechanically locked");
+        error_setg_errno(errp, EBUSY, "slot is electromechanically locked");
     }
 }
#2 lore raw
Quoted 9 lines

-----Original Message-----
From: Markus Armbruster [mailto:[email protected]]
Sent: Wednesday, November 12, 2014 4:33 PM
To: SeokYeon Hwang
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH for-2.2] pci: Don't pass negative errno to 'error_set_errno()'

Quoted 4 lines

Copying maintainer and -trivial.

In the future, please copy maintainers. You can use "scripts/get_maintainer.pl --no-git-fallback" to find them.

Thank you for your help.

Quoted 25 lines

hw/pci/pcie.c static void pcie_cap_slot_hotplug_common(PCIDevice

Quoted 10 lines · SeokYeon Hwang
---
 hw/pci/pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci/pcie.c index 58455bd..2902f7d renamed from hw/pci/pcie.c +0 -0

100644

hw/pci/pcie.c +0 -0
@@ -229,7 +229,7 @@ static void pcie_cap_slot_hotplug_common(PCIDevice

*hotplug_dev,

hw/pci/pcie.c static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev,

Quoted 4 lines
hw/pci/pcie.c +0 -1
         /* the slot is electromechanically locked.
          * This error is propagated up to qdev and then to HMP/QMP.
          */
-        error_setg_errno(errp, -EBUSY, "slot is electromechanically

locked");

hw/pci/pcie.c static void pcie_cap_slot_hotplug_common(PCIDevice · line 235

Quoted 4 lines
hw/pci/pcie.c +2 -0
+        error_setg_errno(errp, EBUSY, "slot is electromechanically
+ locked");
     }
 }
Reviewed-by on v1 1/1
#3 lore raw
In reply to SeokYeon Hwang
Quoted 10 lines · SeokYeon Hwang
---
  hw/pci/pcie.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci/pcie.c +0 -0
index 58455bd..2902f7d 100644

hw/pci/pcie.c static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev, · line 234

Quoted 7 lines
hw/pci/pcie.c +1 -1
@@ -229,7 +229,7 @@ static void pcie_cap_slot_hotplug_common(PCIDevice *hotplug_dev,
          /* the slot is electromechanically locked.
           * This error is propagated up to qdev and then to HMP/QMP.
           */
-        error_setg_errno(errp, -EBUSY, "slot is electromechanically locked");
+        error_setg_errno(errp, EBUSY, "slot is electromechanically locked");
      }
  }