All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Stefan Weil <sw@weilnetz.de>, QEMU Trivial <qemu-trivial@nongnu.org>
Cc: Stefan Weil <sw@weilnetz.de>,
	QEMU Developer <qemu-devel@nongnu.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-trivial] [PATCH 2/7] 9pfs: Fix warnings from Sparse
Date: Tue, 10 Mar 2015 23:12:29 +0530	[thread overview]
Message-ID: <87bnk0rbp6.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1425838674-28393-1-git-send-email-sw@weilnetz.de>

Stefan Weil <sw@weilnetz.de> writes:

> Sparse report:
>
> 9pfs/virtio-9p.c:1953:9: warning: returning void-valued expression
> 9pfs/virtio-9p-handle.c:143:5: warning: returning void-valued expression
> 9pfs/virtio-9p-handle.c:160:5: warning: returning void-valued expression
> 9pfs/virtio-9p-local.c:384:5: warning: returning void-valued expression
> 9pfs/virtio-9p-local.c:415:5: warning: returning void-valued expression
> 9pfs/virtio-9p-proxy.c:672:5: warning: returning void-valued expression
> 9pfs/virtio-9p-proxy.c:689:5: warning: returning void-valued expression
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

> ---
>  hw/9pfs/virtio-9p-handle.c | 4 ++--
>  hw/9pfs/virtio-9p-local.c  | 4 ++--
>  hw/9pfs/virtio-9p-proxy.c  | 4 ++--
>  hw/9pfs/virtio-9p.c        | 3 ++-
>  4 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c
> index 4b79cef..13eabb9 100644
> --- a/hw/9pfs/virtio-9p-handle.c
> +++ b/hw/9pfs/virtio-9p-handle.c
> @@ -140,7 +140,7 @@ static int handle_opendir(FsContext *ctx,
>  
>  static void handle_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
>  {
> -    return rewinddir(fs->dir);
> +    rewinddir(fs->dir);
>  }
>  
>  static off_t handle_telldir(FsContext *ctx, V9fsFidOpenState *fs)
> @@ -157,7 +157,7 @@ static int handle_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
>  
>  static void handle_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
>  {
> -    return seekdir(fs->dir, off);
> +    seekdir(fs->dir, off);
>  }
>  
>  static ssize_t handle_preadv(FsContext *ctx, V9fsFidOpenState *fs,
> diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
> index a183eee..fec580b 100644
> --- a/hw/9pfs/virtio-9p-local.c
> +++ b/hw/9pfs/virtio-9p-local.c
> @@ -381,7 +381,7 @@ static int local_opendir(FsContext *ctx,
>  
>  static void local_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
>  {
> -    return rewinddir(fs->dir);
> +    rewinddir(fs->dir);
>  }
>  
>  static off_t local_telldir(FsContext *ctx, V9fsFidOpenState *fs)
> @@ -412,7 +412,7 @@ again:
>  
>  static void local_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
>  {
> -    return seekdir(fs->dir, off);
> +    seekdir(fs->dir, off);
>  }
>  
>  static ssize_t local_preadv(FsContext *ctx, V9fsFidOpenState *fs,
> diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c
> index 59c7445..edab402 100644
> --- a/hw/9pfs/virtio-9p-proxy.c
> +++ b/hw/9pfs/virtio-9p-proxy.c
> @@ -669,7 +669,7 @@ static int proxy_opendir(FsContext *ctx,
>  
>  static void proxy_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
>  {
> -    return rewinddir(fs->dir);
> +    rewinddir(fs->dir);
>  }
>  
>  static off_t proxy_telldir(FsContext *ctx, V9fsFidOpenState *fs)
> @@ -686,7 +686,7 @@ static int proxy_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
>  
>  static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
>  {
> -    return seekdir(fs->dir, off);
> +    seekdir(fs->dir, off);
>  }
>  
>  static ssize_t proxy_preadv(FsContext *ctx, V9fsFidOpenState *fs,
> diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
> index 5861a5b..4964da0 100644
> --- a/hw/9pfs/virtio-9p.c
> +++ b/hw/9pfs/virtio-9p.c
> @@ -1950,7 +1950,8 @@ static void v9fs_write(void *opaque)
>  
>      err = pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &count);
>      if (err < 0) {
> -        return complete_pdu(s, pdu, err);
> +        complete_pdu(s, pdu, err);
> +        return;
>      }
>      offset += err;
>      v9fs_init_qiov_from_pdu(&qiov_full, pdu, offset, count, true);
> -- 
> 2.1.4



WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Stefan Weil <sw@weilnetz.de>, QEMU Trivial <qemu-trivial@nongnu.org>
Cc: QEMU Developer <qemu-devel@nongnu.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/7] 9pfs: Fix warnings from Sparse
Date: Tue, 10 Mar 2015 23:12:29 +0530	[thread overview]
Message-ID: <87bnk0rbp6.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1425838674-28393-1-git-send-email-sw@weilnetz.de>

Stefan Weil <sw@weilnetz.de> writes:

> Sparse report:
>
> 9pfs/virtio-9p.c:1953:9: warning: returning void-valued expression
> 9pfs/virtio-9p-handle.c:143:5: warning: returning void-valued expression
> 9pfs/virtio-9p-handle.c:160:5: warning: returning void-valued expression
> 9pfs/virtio-9p-local.c:384:5: warning: returning void-valued expression
> 9pfs/virtio-9p-local.c:415:5: warning: returning void-valued expression
> 9pfs/virtio-9p-proxy.c:672:5: warning: returning void-valued expression
> 9pfs/virtio-9p-proxy.c:689:5: warning: returning void-valued expression
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

> ---
>  hw/9pfs/virtio-9p-handle.c | 4 ++--
>  hw/9pfs/virtio-9p-local.c  | 4 ++--
>  hw/9pfs/virtio-9p-proxy.c  | 4 ++--
>  hw/9pfs/virtio-9p.c        | 3 ++-
>  4 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c
> index 4b79cef..13eabb9 100644
> --- a/hw/9pfs/virtio-9p-handle.c
> +++ b/hw/9pfs/virtio-9p-handle.c
> @@ -140,7 +140,7 @@ static int handle_opendir(FsContext *ctx,
>  
>  static void handle_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
>  {
> -    return rewinddir(fs->dir);
> +    rewinddir(fs->dir);
>  }
>  
>  static off_t handle_telldir(FsContext *ctx, V9fsFidOpenState *fs)
> @@ -157,7 +157,7 @@ static int handle_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
>  
>  static void handle_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
>  {
> -    return seekdir(fs->dir, off);
> +    seekdir(fs->dir, off);
>  }
>  
>  static ssize_t handle_preadv(FsContext *ctx, V9fsFidOpenState *fs,
> diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
> index a183eee..fec580b 100644
> --- a/hw/9pfs/virtio-9p-local.c
> +++ b/hw/9pfs/virtio-9p-local.c
> @@ -381,7 +381,7 @@ static int local_opendir(FsContext *ctx,
>  
>  static void local_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
>  {
> -    return rewinddir(fs->dir);
> +    rewinddir(fs->dir);
>  }
>  
>  static off_t local_telldir(FsContext *ctx, V9fsFidOpenState *fs)
> @@ -412,7 +412,7 @@ again:
>  
>  static void local_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
>  {
> -    return seekdir(fs->dir, off);
> +    seekdir(fs->dir, off);
>  }
>  
>  static ssize_t local_preadv(FsContext *ctx, V9fsFidOpenState *fs,
> diff --git a/hw/9pfs/virtio-9p-proxy.c b/hw/9pfs/virtio-9p-proxy.c
> index 59c7445..edab402 100644
> --- a/hw/9pfs/virtio-9p-proxy.c
> +++ b/hw/9pfs/virtio-9p-proxy.c
> @@ -669,7 +669,7 @@ static int proxy_opendir(FsContext *ctx,
>  
>  static void proxy_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
>  {
> -    return rewinddir(fs->dir);
> +    rewinddir(fs->dir);
>  }
>  
>  static off_t proxy_telldir(FsContext *ctx, V9fsFidOpenState *fs)
> @@ -686,7 +686,7 @@ static int proxy_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
>  
>  static void proxy_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
>  {
> -    return seekdir(fs->dir, off);
> +    seekdir(fs->dir, off);
>  }
>  
>  static ssize_t proxy_preadv(FsContext *ctx, V9fsFidOpenState *fs,
> diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
> index 5861a5b..4964da0 100644
> --- a/hw/9pfs/virtio-9p.c
> +++ b/hw/9pfs/virtio-9p.c
> @@ -1950,7 +1950,8 @@ static void v9fs_write(void *opaque)
>  
>      err = pdu_unmarshal(pdu, offset, "dqd", &fid, &off, &count);
>      if (err < 0) {
> -        return complete_pdu(s, pdu, err);
> +        complete_pdu(s, pdu, err);
> +        return;
>      }
>      offset += err;
>      v9fs_init_qiov_from_pdu(&qiov_full, pdu, offset, count, true);
> -- 
> 2.1.4

  reply	other threads:[~2015-03-10 17:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08 18:17 [Qemu-trivial] [PATCH 2/7] 9pfs: Fix warnings from Sparse Stefan Weil
2015-03-08 18:17 ` [Qemu-devel] " Stefan Weil
2015-03-10 17:42 ` Aneesh Kumar K.V [this message]
2015-03-10 17:42   ` Aneesh Kumar K.V

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=87bnk0rbp6.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    /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.