All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jeff Cody <jcody@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pl@kamp.de, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined
Date: Tue, 20 May 2014 10:10:14 +0200	[thread overview]
Message-ID: <537B0DE6.4080608@redhat.com> (raw)
In-Reply-To: <7574375ef9b855f3e9556c929c86c0b85a2c4af9.1400533515.git.jcody@redhat.com>

Il 19/05/2014 23:13, Jeff Cody ha scritto:
> Commit b03c380 introduced the function
> iscsi_allocationmap_is_allocated(), however it is only used within a
> code block that is conditionally compiled.  This produces a warning
> (error with -werror) of "defined but not used" for the the function, if
> LIBISCSI_FEATURE_IOVECTOR is not defined.
>
> This wraps iscsi_allocationmap_is_allocated() in the same conditional.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  block/iscsi.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index d649424..d5548fa 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -381,6 +381,7 @@ retry:
>  }
>
>
> +#if defined(LIBISCSI_FEATURE_IOVECTOR)
>  static bool iscsi_allocationmap_is_allocated(IscsiLun *iscsilun,
>                                               int64_t sector_num, int nb_sectors)
>  {
> @@ -392,6 +393,7 @@ static bool iscsi_allocationmap_is_allocated(IscsiLun *iscsilun,
>      return !(find_next_bit(iscsilun->allocationmap, size,
>                             sector_num / iscsilun->cluster_sectors) == size);
>  }
> +#endif
>
>
>  #if defined(LIBISCSI_FEATURE_IOVECTOR)

The new #endif and the subsequent #if can be elided.

Applied to scsi-next with this change, thanks.

Paolo

      parent reply	other threads:[~2014-05-20  8:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 21:13 [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined Jeff Cody
2014-05-19 22:12 ` Peter Lieven
2014-05-20  8:10 ` Paolo Bonzini [this message]

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=537B0DE6.4080608@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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.