qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@stackframe.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/5] lsi: use enum type for s->waiting
Date: Tue, 5 Mar 2019 08:17:12 +0100	[thread overview]
Message-ID: <20190305071712.GA29106@t470p.stackframe.org> (raw)
In-Reply-To: <2951e9ec-41c9-14cb-423c-4292c27965aa@redhat.com>

Hi Philippe,

On Tue, Mar 05, 2019 at 12:18:01AM +0100, Philippe Mathieu-Daudé wrote:
> >  
> > +enum {
> > +    LSI_NOWAIT,
> 
> You forgot the comment for NOWAIT.

I thought LSI_NOWAIT is self-explaining, but will add that.

> >      int waiting;
> 
> When a field is not used by migration, you can declare it as enum:
> 
>        enum {
>            LSI_NOWAIT = 0, /* SCRIPTS are running or stopped */
>            LSI_WAIT_RESELECT = 1, /* Wait Reselect instruction has been
> issued */
>            LSI_DMA_SCRIPTS = 2, /* processing DMA from lsi_execute_script */
>            LSI_DMA_IN_PROGRESS = 3, /* DMA operation is in progress */
>        } waiting;
> 
> This gives hints to the compiler about values to check.

But it is used by migration, so this doesn't apply here? I had a typedef enum before,
but this doesn't compile.

Otherwise thanks for reviewing.

Regards
Sven

  reply	other threads:[~2019-03-05  7:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 18:09 [Qemu-devel] [PATCH 1/5] lsi: use ldn_le_p()/stn_le_p() Sven Schnelle
2019-03-04 18:09 ` [Qemu-devel] [PATCH 2/5] lsi: use enum type for s->waiting Sven Schnelle
2019-03-04 23:18   ` Philippe Mathieu-Daudé
2019-03-05  7:17     ` Sven Schnelle [this message]
2019-03-05 12:07       ` Philippe Mathieu-Daudé
2019-03-04 18:09 ` [Qemu-devel] [PATCH 3/5] lsi: use enum type for s->msg_action Sven Schnelle
2019-03-04 23:14   ` Philippe Mathieu-Daudé
2019-03-04 23:22     ` Philippe Mathieu-Daudé
2019-03-04 18:09 ` [Qemu-devel] [PATCH 4/5] lsi: use SCSI phase names instead of numbers in trace Sven Schnelle
2019-03-04 23:10   ` Philippe Mathieu-Daudé
2019-03-04 18:09 ` [Qemu-devel] [PATCH 5/5] lsi: return dfifo value Sven Schnelle
2019-03-04 18:40 ` [Qemu-devel] [PATCH 1/5] lsi: use ldn_le_p()/stn_le_p() Eric Blake
2019-03-04 20:38   ` Sven Schnelle
2019-03-04 21:15     ` Eric Blake
2019-03-04 23:21 ` Philippe Mathieu-Daudé

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=20190305071712.GA29106@t470p.stackframe.org \
    --to=svens@stackframe.org \
    --cc=fam@euphon.net \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --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).