All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.com>
To: Zhiqiang Liu <liuzhiqiang26@huawei.com>,
	Benjamin Marzinski <bmarzins@redhat.com>,
	Christophe Varoqui <christophe.varoqui@opensvc.com>,
	Zdenek Kabelac <zkabelac@redhat.com>
Cc: linfeilong <linfeilong@huawei.com>,
	Yanxiaodan <yanxiaodan@huawei.com>,
	dm-devel@redhat.com, lixiaokeng <lixiaokeng@huawei.com>
Subject: Re: [PATCH V2 1/5] multipathd: adopt static char* arr in daemon_status
Date: Fri, 21 Aug 2020 15:42:02 +0200	[thread overview]
Message-ID: <5b382b169a8c499acfc523adb81681fe941d743a.camel@suse.com> (raw)
In-Reply-To: <b2c96dc6-1e01-beb2-0ccb-22e1d0d980a6@huawei.com>

On Fri, 2020-08-21 at 18:58 +0800, Zhiqiang Liu wrote:
> We adopt static char* array (demon_status_msg) in daemon_status func,
> so it looks more simpler and easier to expand.
> 
> V1->V2:
> - use "int" as the type of "status" (suggested by Martin)
> 
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> Signed-off-by: lixiaokeng <lixiaokeng@huawei.com>
> ---
>  multipathd/main.c | 30 +++++++++++++++---------------
>  multipathd/main.h |  3 ++-
>  2 files changed, 17 insertions(+), 16 deletions(-)
> 
> diff --git a/multipathd/main.c b/multipathd/main.c
> index 9ec65856..62cf4ff4 100644
> --- a/multipathd/main.c
> +++ b/multipathd/main.c
> diff --git a/multipathd/main.h b/multipathd/main.h
> index 5dff17e5..6a5592c0 100644
> --- a/multipathd/main.h
> +++ b/multipathd/main.h
> @@ -4,12 +4,13 @@
>  #define MAPGCINT 5
> 
>  enum daemon_status {
> -	DAEMON_INIT,
> +	DAEMON_INIT = 0,
>  	DAEMON_START,
>  	DAEMON_CONFIGURE,
>  	DAEMON_IDLE,
>  	DAEMON_RUNNING,
>  	DAEMON_SHUTDOWN,
> +	DAEMON_STATUS_SIZE,
>  };

This breaks compilation:

main.c: In function ‘sd_notify_status’:
main.c:184:2: error: enumeration value ‘DAEMON_STATUS_SIZE’ not handled
in switch [-Werror=switch]
  switch (state) {
  ^~~~~~

Please avoid introducing DAEMON_STATUS_SIZE.

This would be fixed by your patch 2 because it removes the switch
statement, but no patch in a series should break compilation, to 
allow future bisections.

I have to withdraw my "Reviewed-by: for the time being, sorry.

Martin


> 
>  struct prout_param_descriptor;



--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

  parent reply	other threads:[~2020-08-21 13:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 10:57 [PATCH V2 0/5] multipath-tools series: some cleanups and fixes Zhiqiang Liu
2020-08-21 10:58 ` [PATCH V2 1/5] multipathd: adopt static char* arr in daemon_status Zhiqiang Liu
2020-08-21 11:07   ` Martin Wilck
2020-08-21 13:42   ` Martin Wilck [this message]
2020-08-22  4:31     ` Zhiqiang Liu
2020-08-21 10:59 ` [PATCH V2 2/5] multipathd: use daemon_status_msg to construct sd notify msg in do_sd_notify func Zhiqiang Liu
2020-08-21 11:12   ` Martin Wilck
2020-08-21 11:00 ` [PATCH V2 3/5] libmultipath: check blist before calling MALLOC in alloc_ble_device func Zhiqiang Liu
2020-08-21 11:15   ` Martin Wilck
2020-08-21 11:00 ` [PATCH V2 4/5] vector: add lower boundary check in vector_foreach_slot_after Zhiqiang Liu
2020-08-21 11:20   ` Martin Wilck
2020-08-21 11:01 ` [PATCH V2 5/5] multipathd: remove useless memset after MALLOC in alloc_waiteri func Zhiqiang Liu
2020-08-21 11:18   ` Martin Wilck

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=5b382b169a8c499acfc523adb81681fe941d743a.camel@suse.com \
    --to=mwilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@redhat.com \
    --cc=linfeilong@huawei.com \
    --cc=liuzhiqiang26@huawei.com \
    --cc=lixiaokeng@huawei.com \
    --cc=yanxiaodan@huawei.com \
    --cc=zkabelac@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.