* [PATCH] ib_srpt: wait_for_completion_timeout does not return negativ status
@ 2015-01-16 11:20 Nicholas Mc Guire
[not found] ` <1421407217-9105-1-git-send-email-der.herr-kA1LtwSENNE@public.gmane.org>
2015-01-20 23:51 ` Nicholas A. Bellinger
0 siblings, 2 replies; 4+ messages in thread
From: Nicholas Mc Guire @ 2015-01-16 11:20 UTC (permalink / raw)
To: Roland Dreier
Cc: Sean Hefty, Hal Rosenstock, Nicholas Bellinger, Bart Van Assche,
Jingoo Han, Andrew Morton, Rasmus Villemoes, Mike Marciniszyn,
Ira Weiny, Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Nicholas Mc Guire
Signed-off-by: Nicholas Mc Guire <der.herr-kA1LtwSENNE@public.gmane.org>
---
Patch is against 3.19.0-rc3 -next-20150109
Patch was compiletested only with x86_64_defconfig +
CONFIG_TARGET_CORE=m, CONFIG_INFINIBAND=m, CONFIG_INFINIBAND_SRPT=m
drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index eb694dd..4e58c76 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -3533,7 +3533,7 @@ static void srpt_close_session(struct se_session *se_sess)
spin_unlock_irq(&sdev->spinlock);
res = wait_for_completion_timeout(&release_done, 60 * HZ);
- WARN_ON(res <= 0);
+ WARN_ON(res == 0);
}
/**
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ib_srpt: wait_for_completion_timeout does not return negativ status
[not found] ` <1421407217-9105-1-git-send-email-der.herr-kA1LtwSENNE@public.gmane.org>
@ 2015-01-16 11:57 ` Bart Van Assche
[not found] ` <54B8FCAE.2020408-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2015-01-16 11:57 UTC (permalink / raw)
To: Nicholas Mc Guire, Roland Dreier
Cc: Sean Hefty, Hal Rosenstock, Nicholas Bellinger, Jingoo Han,
Andrew Morton, Rasmus Villemoes, Mike Marciniszyn, Ira Weiny,
Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On 01/16/15 12:20, Nicholas Mc Guire wrote:
> Signed-off-by: Nicholas Mc Guire <der.herr-kA1LtwSENNE@public.gmane.org>
> ---
>
> Patch is against 3.19.0-rc3 -next-20150109
>
> Patch was compiletested only with x86_64_defconfig +
> CONFIG_TARGET_CORE=m, CONFIG_INFINIBAND=m, CONFIG_INFINIBAND_SRPT=m
>
> drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index eb694dd..4e58c76 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -3533,7 +3533,7 @@ static void srpt_close_session(struct se_session *se_sess)
> spin_unlock_irq(&sdev->spinlock);
>
> res = wait_for_completion_timeout(&release_done, 60 * HZ);
> - WARN_ON(res <= 0);
> + WARN_ON(res == 0);
> }
>
> /**
The description of this patch explains why you would like to change this
code but not why this change is useful. Does building the current code
e.g. trigger a compiler warning ? If so, which warning ? If not, why
would you like to change this code and why do you think this change is
an improvement ?
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ib_srpt: wait_for_completion_timeout does not return negativ status
[not found] ` <54B8FCAE.2020408-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
@ 2015-01-16 12:02 ` Nicholas Mc Guire
0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Mc Guire @ 2015-01-16 12:02 UTC (permalink / raw)
To: Bart Van Assche
Cc: Roland Dreier, Sean Hefty, Hal Rosenstock, Nicholas Bellinger,
Jingoo Han, Andrew Morton, Rasmus Villemoes, Mike Marciniszyn,
Ira Weiny, Christoph Hellwig, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Fri, 16 Jan 2015, Bart Van Assche wrote:
> On 01/16/15 12:20, Nicholas Mc Guire wrote:
> > Signed-off-by: Nicholas Mc Guire <der.herr-kA1LtwSENNE@public.gmane.org>
> > ---
> >
> > Patch is against 3.19.0-rc3 -next-20150109
> >
> > Patch was compiletested only with x86_64_defconfig +
> > CONFIG_TARGET_CORE=m, CONFIG_INFINIBAND=m, CONFIG_INFINIBAND_SRPT=m
> >
> > drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> > index eb694dd..4e58c76 100644
> > --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> > +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> > @@ -3533,7 +3533,7 @@ static void srpt_close_session(struct se_session *se_sess)
> > spin_unlock_irq(&sdev->spinlock);
> >
> > res = wait_for_completion_timeout(&release_done, 60 * HZ);
> > - WARN_ON(res <= 0);
> > + WARN_ON(res == 0);
> > }
> >
> > /**
>
> The description of this patch explains why you would like to change this
> code but not why this change is useful. Does building the current code
> e.g. trigger a compiler warning ? If so, which warning ? If not, why
> would you like to change this code and why do you think this change is
> an improvement ?
>
the code will not fail in its urrent form but it will trigger
static code chekcers (actually this was found by a static code checker)
so its a QA issue not a bug fix in any way.
thx!
hofrat
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ib_srpt: wait_for_completion_timeout does not return negativ status
2015-01-16 11:20 [PATCH] ib_srpt: wait_for_completion_timeout does not return negativ status Nicholas Mc Guire
[not found] ` <1421407217-9105-1-git-send-email-der.herr-kA1LtwSENNE@public.gmane.org>
@ 2015-01-20 23:51 ` Nicholas A. Bellinger
1 sibling, 0 replies; 4+ messages in thread
From: Nicholas A. Bellinger @ 2015-01-20 23:51 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Roland Dreier, Sean Hefty, Hal Rosenstock, Bart Van Assche,
Jingoo Han, Andrew Morton, Rasmus Villemoes, Mike Marciniszyn,
Ira Weiny, Christoph Hellwig, linux-rdma, linux-kernel
Hi Nicholas,
On Fri, 2015-01-16 at 12:20 +0100, Nicholas Mc Guire wrote:
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
> ---
>
> Patch is against 3.19.0-rc3 -next-20150109
>
> Patch was compiletested only with x86_64_defconfig +
> CONFIG_TARGET_CORE=m, CONFIG_INFINIBAND=m, CONFIG_INFINIBAND_SRPT=m
>
> drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index eb694dd..4e58c76 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -3533,7 +3533,7 @@ static void srpt_close_session(struct se_session *se_sess)
> spin_unlock_irq(&sdev->spinlock);
>
> res = wait_for_completion_timeout(&release_done, 60 * HZ);
> - WARN_ON(res <= 0);
> + WARN_ON(res == 0);
> }
>
> /**
Notice that 'res' here is still incorrectly defined as an 'int', instead
of 'unsigned long'.
I've updated your patch to use the proper type for res, and added a
short commit log to describe what it's doing.
Merged into target-pending/for-next.
Thanks!
--nab
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-20 23:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16 11:20 [PATCH] ib_srpt: wait_for_completion_timeout does not return negativ status Nicholas Mc Guire
[not found] ` <1421407217-9105-1-git-send-email-der.herr-kA1LtwSENNE@public.gmane.org>
2015-01-16 11:57 ` Bart Van Assche
[not found] ` <54B8FCAE.2020408-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-01-16 12:02 ` Nicholas Mc Guire
2015-01-20 23:51 ` Nicholas A. Bellinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox