From: "Zhen, Liang" <liang.zhen@intel.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
"Drokin, Oleg" <oleg.drokin@intel.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"HPDD-discuss@lists.01.org" <HPDD-discuss@ml01.01.org>
Subject: Re: [HPDD-discuss] [PATCH 15/16] staging: lustre: lnet: lnet: fix error return code
Date: Mon, 06 Apr 2015 06:41:46 +0000 [thread overview]
Message-ID: <D1482EB4.2B614%liang.zhen@intel.com> (raw)
In-Reply-To: <1428235596-4757-16-git-send-email-Julia.Lawall@lip6.fr>
Julia, yes this is a bug that we have already fixed in the latest Lustre.
Sorry we haven¹t submitted this patch to kernel on time.
Thanks
Liang
On 4/5/15, 8:06 PM, "Julia Lawall" <Julia.Lawall@lip6.fr> wrote:
>Return a negative error code on failure.
>
>A simplified version of the semantic match that finds this problem is as
>follows: (http://coccinelle.lip6.fr/)
>
>// <smpl>
>@@
>identifier ret; expression e1,e2;
>@@
>(
>if (\(ret < 0\|ret != 0\))
> { ... return ret; }
>|
>ret = 0
>)
>... when != ret = e1
> when != &ret
>*if(...)
>{
> ... when != ret = e2
> when forall
> return ret;
>}
>// </smpl>
>
>Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
>---
> drivers/staging/lustre/lnet/lnet/api-ni.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c
>b/drivers/staging/lustre/lnet/lnet/api-ni.c
>index faceb95..4a14e51 100644
>--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
>+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
>@@ -650,15 +650,19 @@ lnet_prepare(lnet_pid_t requested_pid)
>
> recs = lnet_res_containers_create(LNET_COOKIE_TYPE_ME, LNET_FL_MAX_MES,
> sizeof(lnet_me_t));
>- if (recs = NULL)
>+ if (recs = NULL) {
>+ rc = -ENOMEM;
> goto failed;
>+ }
>
> the_lnet.ln_me_containers = recs;
>
> recs = lnet_res_containers_create(LNET_COOKIE_TYPE_MD, LNET_FL_MAX_MDS,
> sizeof(lnet_libmd_t));
>- if (recs = NULL)
>+ if (recs = NULL) {
>+ rc = -ENOMEM;
> goto failed;
>+ }
>
> the_lnet.ln_md_containers = recs;
>
>
>_______________________________________________
>HPDD-discuss mailing list
>HPDD-discuss@lists.01.org
>https://lists.01.org/mailman/listinfo/hpdd-discuss
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: "Zhen, Liang" <liang.zhen@intel.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
"Drokin, Oleg" <oleg.drokin@intel.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"HPDD-discuss@lists.01.org" <HPDD-discuss@ml01.01.org>
Subject: Re: [HPDD-discuss] [PATCH 15/16] staging: lustre: lnet: lnet: fix error return code
Date: Mon, 6 Apr 2015 06:41:46 +0000 [thread overview]
Message-ID: <D1482EB4.2B614%liang.zhen@intel.com> (raw)
In-Reply-To: <1428235596-4757-16-git-send-email-Julia.Lawall@lip6.fr>
Julia, yes this is a bug that we have already fixed in the latest Lustre.
Sorry we haven¹t submitted this patch to kernel on time.
Thanks
Liang
On 4/5/15, 8:06 PM, "Julia Lawall" <Julia.Lawall@lip6.fr> wrote:
>Return a negative error code on failure.
>
>A simplified version of the semantic match that finds this problem is as
>follows: (http://coccinelle.lip6.fr/)
>
>// <smpl>
>@@
>identifier ret; expression e1,e2;
>@@
>(
>if (\(ret < 0\|ret != 0\))
> { ... return ret; }
>|
>ret = 0
>)
>... when != ret = e1
> when != &ret
>*if(...)
>{
> ... when != ret = e2
> when forall
> return ret;
>}
>// </smpl>
>
>Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
>---
> drivers/staging/lustre/lnet/lnet/api-ni.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c
>b/drivers/staging/lustre/lnet/lnet/api-ni.c
>index faceb95..4a14e51 100644
>--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
>+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
>@@ -650,15 +650,19 @@ lnet_prepare(lnet_pid_t requested_pid)
>
> recs = lnet_res_containers_create(LNET_COOKIE_TYPE_ME, LNET_FL_MAX_MES,
> sizeof(lnet_me_t));
>- if (recs == NULL)
>+ if (recs == NULL) {
>+ rc = -ENOMEM;
> goto failed;
>+ }
>
> the_lnet.ln_me_containers = recs;
>
> recs = lnet_res_containers_create(LNET_COOKIE_TYPE_MD, LNET_FL_MAX_MDS,
> sizeof(lnet_libmd_t));
>- if (recs == NULL)
>+ if (recs == NULL) {
>+ rc = -ENOMEM;
> goto failed;
>+ }
>
> the_lnet.ln_md_containers = recs;
>
>
>_______________________________________________
>HPDD-discuss mailing list
>HPDD-discuss@lists.01.org
>https://lists.01.org/mailman/listinfo/hpdd-discuss
next prev parent reply other threads:[~2015-04-06 6:41 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-05 12:06 [PATCH 0/16] fix error return code Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` [PATCH 1/16] wan: lmc: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-07 19:26 ` David Miller
2015-04-07 19:26 ` David Miller
2015-04-05 12:06 ` [PATCH 2/16] [media] si4713: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` [PATCH 4/16] [media] as102: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` [PATCH 3/16] [media] radio: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` [PATCH 5/16] ufs: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` [PATCH 6/16] HSI: cmt_speech: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:47 ` Sebastian Reichel
2015-04-05 12:47 ` Sebastian Reichel
2015-04-05 12:06 ` [PATCH 7/16] parport_sunbpp: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` [PATCH 8/16] cosa: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-07 19:26 ` David Miller
2015-04-07 19:26 ` David Miller
2015-04-05 12:06 ` [PATCH 9/16] HID: logitech-hidpp: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 14:38 ` Benjamin Tissoires
2015-04-05 14:38 ` Benjamin Tissoires
2015-04-05 20:57 ` Jiri Kosina
2015-04-05 20:57 ` Jiri Kosina
2015-04-05 12:06 ` [PATCH 10/16] zram: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` [PATCH 11/16] drm/msm/dp: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` [PATCH 12/16] ib_srpt: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
[not found] ` <1428235596-4757-13-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2015-04-05 16:27 ` Bart Van Assche
2015-04-05 16:27 ` Bart Van Assche
2015-04-05 16:27 ` Bart Van Assche
2015-04-05 12:06 ` [PATCH 13/16] ALSA: au1x00: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 16:06 ` [alsa-devel] " Takashi Iwai
2015-04-05 16:06 ` Takashi Iwai
2015-04-05 12:06 ` [PATCH 14/16] soc: ti: knav_qmss_queue: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-06 2:03 ` santosh.shilimkar
2015-04-06 2:03 ` santosh.shilimkar
2015-04-06 2:03 ` santosh.shilimkar at oracle.com
2015-04-05 12:06 ` [PATCH 15/16] staging: lustre: lnet: lnet: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-06 6:41 ` Zhen, Liang [this message]
2015-04-06 6:41 ` [HPDD-discuss] " Zhen, Liang
2015-04-05 12:06 ` [PATCH 16/16] NFC: pn533: " Julia Lawall
2015-04-05 12:06 ` Julia Lawall
2015-04-05 23:23 ` Samuel Ortiz
2015-04-05 23:23 ` Samuel Ortiz
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=D1482EB4.2B614%liang.zhen@intel.com \
--to=liang.zhen@intel.com \
--cc=HPDD-discuss@ml01.01.org \
--cc=Julia.Lawall@lip6.fr \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.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.