From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWqju-0000IS-Qm for qemu-devel@nongnu.org; Mon, 29 Apr 2013 12:15:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWqjs-0005mp-BG for qemu-devel@nongnu.org; Mon, 29 Apr 2013 12:15:42 -0400 Received: from greensocs.com ([87.106.252.221]:45484 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWqjs-0005ml-2T for qemu-devel@nongnu.org; Mon, 29 Apr 2013 12:15:40 -0400 Message-ID: <517E9CA7.3020709@greensocs.com> Date: Mon, 29 Apr 2013 18:15:35 +0200 From: =?ISO-8859-15?Q?KONRAD_Fr=E9d=E9ric?= MIME-Version: 1.0 References: <1367248365-27260-1-git-send-email-fred.konrad@greensocs.com> <1367248365-27260-4-git-send-email-fred.konrad@greensocs.com> <517E947C.1010001@redhat.com> In-Reply-To: <517E947C.1010001@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-1.5 3/4] scsi: add scsi_named_bus_new(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, mark.burton@greensocs.com, qemu-devel@nongnu.org, agraf@suse.de, amit.shah@redhat.com, cornelia.huck@de.ibm.com, afaerber@suse.de On 29/04/2013 17:40, Paolo Bonzini wrote: > Il 29/04/2013 17:12, fred.konrad@greensocs.com ha scritto: >> From: KONRAD Frederic >> >> This add the possibility to create a scsi-bus with a specified name. >> >> Signed-off-by: KONRAD Frederic >> --- >> hw/scsi/scsi-bus.c | 12 +++++++++--- >> include/hw/scsi/scsi.h | 2 ++ >> 2 files changed, 11 insertions(+), 3 deletions(-) >> >> diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c >> index 6239ee1..0364749 100644 >> --- a/hw/scsi/scsi-bus.c >> +++ b/hw/scsi/scsi-bus.c >> @@ -71,15 +71,21 @@ static void scsi_device_unit_attention_reported(SCSIDevice *s) >> } >> } >> >> -/* Create a scsi bus, and attach devices to it. */ >> -void scsi_bus_new(SCSIBus *bus, DeviceState *host, const SCSIBusInfo *info) >> +void scsi_named_bus_new(SCSIBus *bus, DeviceState *host, >> + const SCSIBusInfo *info, const char *bus_name) >> { >> - qbus_create_inplace(&bus->qbus, TYPE_SCSI_BUS, host, NULL); >> + qbus_create_inplace(&bus->qbus, TYPE_SCSI_BUS, host, bus_name); >> bus->busnr = next_scsi_bus++; >> bus->info = info; >> bus->qbus.allow_hotplug = 1; >> } > I'd prefer that you just add the argument to scsi_bus_new and change all > callers. > > Paolo Ok, will do. >> +/* Create a scsi bus, and attach devices to it. */ >> +void scsi_bus_new(SCSIBus *bus, DeviceState *host, const SCSIBusInfo *info) >> +{ >> + scsi_named_bus_new(bus, host, info, NULL); >> +} >> + >> static void scsi_dma_restart_bh(void *opaque) >> { >> SCSIDevice *s = opaque; >> diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h >> index 3bda1c4..ddcb07c 100644 >> --- a/include/hw/scsi/scsi.h >> +++ b/include/hw/scsi/scsi.h >> @@ -153,6 +153,8 @@ struct SCSIBus { >> }; >> >> void scsi_bus_new(SCSIBus *bus, DeviceState *host, const SCSIBusInfo *info); >> +void scsi_named_bus_new(SCSIBus *bus, DeviceState *host, >> + const SCSIBusInfo *info, const char *bus_name); >> >> static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d) >> { >>