qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: fred.konrad@greensocs.com
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
Subject: Re: [Qemu-devel] [PATCH for-1.5 3/4] scsi: add scsi_named_bus_new().
Date: Mon, 29 Apr 2013 17:40:44 +0200	[thread overview]
Message-ID: <517E947C.1010001@redhat.com> (raw)
In-Reply-To: <1367248365-27260-4-git-send-email-fred.konrad@greensocs.com>

Il 29/04/2013 17:12, fred.konrad@greensocs.com ha scritto:
> From: KONRAD Frederic <fred.konrad@greensocs.com>
> 
> This add the possibility to create a scsi-bus with a specified name.
> 
> Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
> ---
>  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

> +/* 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)
>  {
> 

  reply	other threads:[~2013-04-29 15:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29 15:12 [Qemu-devel] [PATCH for-1.5 0/4] virtio: fix bus command line compatibility fred.konrad
2013-04-29 15:12 ` [Qemu-devel] [PATCH for-1.5 1/4] virtio-x-bus: force bus name to virtio-bus fred.konrad
2013-04-29 15:12 ` [Qemu-devel] [PATCH for-1.5 2/4] virtio-serial: fix command line compatibility fred.konrad
2013-04-29 15:45   ` Paolo Bonzini
2013-04-29 15:12 ` [Qemu-devel] [PATCH for-1.5 3/4] scsi: add scsi_named_bus_new() fred.konrad
2013-04-29 15:40   ` Paolo Bonzini [this message]
2013-04-29 16:15     ` KONRAD Frédéric
2013-04-29 15:12 ` [Qemu-devel] [PATCH for-1.5 4/4] virtio-scsi: fix the command line compatibility fred.konrad
2013-04-29 15:44   ` Paolo Bonzini
2013-04-29 16:28     ` KONRAD Frédéric
2013-04-29 16:32       ` Paolo Bonzini
2013-04-29 17:39         ` KONRAD Frédéric
2013-04-29 17:55           ` Andreas Färber
2013-04-29 18:17             ` KONRAD Frédéric
2013-04-30 13:06     ` KONRAD Frédéric
2013-04-30 14:01       ` Paolo Bonzini
2013-04-30 14:15         ` KONRAD Frédéric
2013-04-30 14:17           ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=517E947C.1010001@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=fred.konrad@greensocs.com \
    --cc=mark.burton@greensocs.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).