Skip to contentSkip to conversation

sysbus: Remove ignored return value of FindSysbusDeviceFunc

PATCH Andreas Färber 2 participants 2 messages Jan 18, 2016 – Jan 19, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Am 18.01.2016 um 05:39 schrieb David Gibson:

Quoted 7 lines

Functions of type FindSysbusDeviceFunc currently return an integer. I recently made an error in a patch because I assumed that this return value would control whether iteration of the function across devices continues or not. In fact, the function's return value is always ignored.

This changes the function type to return void, so that others don't make the same mistake.

Have you considered implementing the behavior you expected? :) Not necessary for your use case or too complicated?

Quoted 5 lines

---

Please apply.

Patch looks okay, too short notice for today's pull though. Usually we avoid "I" in a commit message.

Regards,
Andreas

Quoted 8 lines
 hw/arm/sysbus-fdt.c    | 4 ++--
 hw/core/machine.c      | 2 +-
 hw/core/platform-bus.c | 8 ++------
 hw/ppc/e500.c          | 4 +---
 hw/ppc/spapr.c         | 4 +---
 include/hw/sysbus.h    | 2 +-
 6 files changed, 8 insertions(+), 16 deletions(-)
Signature · 2 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)
#2 lore raw
Quoted 11 lines · Andreas Färber

Am 18.01.2016 um 05:39 schrieb David Gibson:

Quoted 7 lines

Functions of type FindSysbusDeviceFunc currently return an integer. I recently made an error in a patch because I assumed that this return value would control whether iteration of the function across devices continues or not. In fact, the function's return value is always ignored.

This changes the function type to return void, so that others don't make the same mistake.

Have you considered implementing the behavior you expected? :) Not necessary for your use case or too complicated?

A bit of both.

Quoted 7 lines
Quoted 4 lines

---

Please apply.

Patch looks okay, too short notice for today's pull though. Usually we avoid "I" in a commit message.

True, that probably won't make so much sense sitting in the commit history. I'll reword and resend.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson