Re: [PATCH v7 10/20] fixup! usb-redir: add files for SCSI and USB MSC implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Sep 18, 2019 at 06:21:27AM -0400, Frediano Ziglio wrote:
> > 
> > From: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > 
> > Do not use 0x%u as format, misleasding, %u is decimal.
> > Also most of these are formatting lun number which in multiple cases are
> > expressed as decimal.
> 
> I remember somebody acked this so can be squashed in the previous
> which is already acked.

Okay, I'll squash and apply changes from the review and send a
v8 and then we wait for Yuri.

Cheers,
> 
> > ---
> >  src/cd-scsi.c | 20 ++++++++++----------
> >  1 file changed, 10 insertions(+), 10 deletions(-)
> > 
> > diff --git a/src/cd-scsi.c b/src/cd-scsi.c
> > index 25842b3..ea682ef 100644
> > --- a/src/cd-scsi.c
> > +++ b/src/cd-scsi.c
> > @@ -2079,7 +2079,7 @@ static void cd_scsi_cmd_send_event(CdScsiLU *dev,
> > CdScsiRequest *req)
> >      pers_prevent = event[1] & 0x80;
> >      ext_req_code = (event[2] << 8) | event[3];
> >  
> > -    SPICE_DEBUG("send_event, lun:0x%u immed:%u param_len:%u"
> > +    SPICE_DEBUG("send_event, lun:%u immed:%u param_len:%u"
> >                  " ext_req_event:0x%x ext_req_status:0x%x"
> >                  " pers_prevent:0x%x ext_req_code:0x%x",
> >                  req->lun, immed, event_param_len, ext_req_event,
> > @@ -2177,7 +2177,7 @@ static void cd_scsi_cmd_start_stop_unit(CdScsiLU *dev,
> > CdScsiRequest *req)
> >      load_eject = (req->cdb[4] & CD_START_STOP_FLAG_LOEJ) ? TRUE : FALSE;
> >      power_cond = req->cdb[4] >> 4;
> >  
> > -    SPICE_DEBUG("start_stop_unit, lun:0x%u"
> > +    SPICE_DEBUG("start_stop_unit, lun:%u"
> >                  " immed:%d start:%d load_eject:%d power_cond:0x%x(%s)",
> >                  req->lun, immed, start, load_eject, power_cond,
> >                  cd_scsi_start_stop_power_cond_name(power_cond));
> > @@ -2187,23 +2187,23 @@ static void cd_scsi_cmd_start_stop_unit(CdScsiLU
> > *dev, CdScsiRequest *req)
> >          if (!start) { /* stop the unit */
> >              if (load_eject) { /* eject medium */
> >                  if (dev->prevent_media_removal) {
> > -                    SPICE_DEBUG("start_stop_unit, lun:0x%u"
> > +                    SPICE_DEBUG("start_stop_unit, lun:%u"
> >                                  " prevent_media_removal set, eject failed",
> >                                  req->lun);
> >                      cd_scsi_cmd_complete_check_cond(dev, req,
> >                      &sense_code_MEDIUM_REMOVAL_PREVENTED);
> >                      return;
> >                  }
> > -                SPICE_DEBUG("start_stop_unit, lun:0x%u eject", req->lun);
> > +                SPICE_DEBUG("start_stop_unit, lun:%u eject", req->lun);
> >                  cd_scsi_lu_unload(dev);
> >                  cd_scsi_dev_changed(dev->tgt->user_data, req->lun);
> >              }
> >              dev->power_cond = CD_SCSI_POWER_STOPPED;
> > -            SPICE_DEBUG("start_stop_unit, lun:0x%u stopped", req->lun);
> > +            SPICE_DEBUG("start_stop_unit, lun:%u stopped", req->lun);
> >          } else { /* start the unit */
> >              dev->power_cond = CD_SCSI_POWER_ACTIVE;
> > -            SPICE_DEBUG("start_stop_unit, lun:0x%u started", req->lun);
> > +            SPICE_DEBUG("start_stop_unit, lun:%u started", req->lun);
> >  
> >              if (load_eject) { /* load medium */
> > -                SPICE_DEBUG("start_stop_unit, lun:0x%u load with no media",
> > +                SPICE_DEBUG("start_stop_unit, lun:%u load with no media",
> >                              req->lun);
> >                  cd_scsi_lu_load(dev, NULL);
> >                  cd_scsi_dev_changed(dev->tgt->user_data, req->lun);
> > @@ -2213,17 +2213,17 @@ static void cd_scsi_cmd_start_stop_unit(CdScsiLU
> > *dev, CdScsiRequest *req)
> >      case CD_START_STOP_POWER_COND_ACTIVE:
> >          /* not error to specify transition to the current power condition */
> >          dev->power_cond = CD_SCSI_POWER_ACTIVE;
> > -        SPICE_DEBUG("start_stop_unit, lun:0x%u active", req->lun);
> > +        SPICE_DEBUG("start_stop_unit, lun:%u active", req->lun);
> >          break;
> >      case CD_START_STOP_POWER_COND_IDLE:
> >      case CD_START_STOP_POWER_COND_FORCE_IDLE_0:
> >          dev->power_cond = CD_SCSI_POWER_IDLE;
> > -        SPICE_DEBUG("start_stop_unit, lun:0x%u idle", req->lun);
> > +        SPICE_DEBUG("start_stop_unit, lun:%u idle", req->lun);
> >          break;
> >      case CD_START_STOP_POWER_COND_STANDBY:
> >      case CD_START_STOP_POWER_COND_FORCE_STANDBY_0:
> >          dev->power_cond = CD_SCSI_POWER_STANDBY;
> > -        SPICE_DEBUG("start_stop_unit, lun:0x%u standby", req->lun);
> > +        SPICE_DEBUG("start_stop_unit, lun:%u standby", req->lun);
> >          break;
> >      case CD_START_STOP_POWER_COND_LU_CONTROL:
> >          break;
> 
> Frediano

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]