提交 09c8a87c 编写于 作者: J Julia Lawall 提交者: Greg Kroah-Hartman

staging: lustre: obdclass: expand double GOTO macros

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier lbl;
@@

if (...)
  GOTO(lbl,...);
+else
GOTO(lbl,...);

@@
identifier lbl;
expression e,e1,e2;
@@

if (e)
-  GOTO(lbl,e1);
-else GOTO(lbl,e2);
+  e1;
+else e2;
+goto lbl;

@@
identifier lbl1,lbl2;
expression e,e1,e2;
@@

+ e1=e2;
if (e)
-  GOTO(lbl1,e1=e2);
-GOTO(lbl2,e1=e2);
+  goto lbl1;
+goto lbl2;
// </smpl>
Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a8e147da
...@@ -689,8 +689,10 @@ static int dt_index_page_build(const struct lu_env *env, union lu_page *lp, ...@@ -689,8 +689,10 @@ static int dt_index_page_build(const struct lu_env *env, union lu_page *lp,
if (nob < size) { if (nob < size) {
if (lip->lip_nr == 0) if (lip->lip_nr == 0)
GOTO(out, rc = -EINVAL); rc = -EINVAL;
GOTO(out, rc = 0); else
rc = 0;
goto out;
} }
if ((ii->ii_flags & II_FL_NOHASH) == 0) { if ((ii->ii_flags & II_FL_NOHASH) == 0) {
......
...@@ -336,9 +336,10 @@ static int llog_process_thread(void *arg) ...@@ -336,9 +336,10 @@ static int llog_process_thread(void *arg)
if (rec->lrh_index == 0) { if (rec->lrh_index == 0) {
/* probably another rec just got added? */ /* probably another rec just got added? */
rc = 0;
if (index <= loghandle->lgh_last_idx) if (index <= loghandle->lgh_last_idx)
GOTO(repeat, rc = 0); goto repeat;
GOTO(out, rc = 0); /* no more records */ goto out; /* no more records */
} }
if (rec->lrh_len == 0 || if (rec->lrh_len == 0 ||
rec->lrh_len > LLOG_CHUNK_SIZE) { rec->lrh_len > LLOG_CHUNK_SIZE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册