* [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined
@ 2014-05-19 21:13 Jeff Cody
2014-05-19 22:12 ` Peter Lieven
2014-05-20 8:10 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Jeff Cody @ 2014-05-19 21:13 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, pbonzini, pl, stefanha
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)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined
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
1 sibling, 0 replies; 3+ messages in thread
From: Peter Lieven @ 2014-05-19 22:12 UTC (permalink / raw)
To: Jeff Cody; +Cc: kwolf, pbonzini, qemu-devel, stefanha
Am 19.05.2014 um 23:13 schrieb Jeff Cody <jcody@redhat.com>:
> 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)
> --
> 1.8.3.1
>
Thanks for spotting this.
Reviewed-by: Peter Lieven <pl@kamp.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined
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
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-05-20 8:10 UTC (permalink / raw)
To: Jeff Cody, qemu-devel; +Cc: kwolf, pl, stefanha
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-20 8:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).