From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>,
RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: [PATCH rdma-core] ibdiag: Remove wrongly added ibtypes.py file
Date: Tue, 24 Sep 2019 11:18:34 +0300 [thread overview]
Message-ID: <20190924081834.16511-1-leon@kernel.org> (raw)
From: Leon Romanovsky <leonro@mellanox.com>
ibtypes.py was not supposed to be added from the beginning, hence remove it.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
ibtypes.py | 61 ------------------------------------------------------
1 file changed, 61 deletions(-)
delete mode 100644 ibtypes.py
diff --git a/ibtypes.py b/ibtypes.py
deleted file mode 100644
index 119a023e5..000000000
--- a/ibtypes.py
+++ /dev/null
@@ -1,61 +0,0 @@
-import re
-import sys
-
-def global_ln(ln):
- g = re.match(r"^#define\s+(\S+)\s+CL_HTON(\d+)\((.*)\)",ln)
- if g:
- print("#define %s htobe%s(%s)"%(g.group(1),g.group(2),g.group(3)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+\(CL_HTON(\d+)\((.*)\)\)",ln)
- if g:
- print("#define %s htobe%s(%s)"%(g.group(1),g.group(2),g.group(3)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+(0x\w+)",ln)
- if g:
- print("#define %s %s"%(g.group(1),g.group(2)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+\((0x\w+)\)",ln)
- if g:
- print("#define %s %s"%(g.group(1),g.group(2)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+(\d+)",ln)
- if g:
- print("#define %s %s"%(g.group(1),g.group(2)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+\((\d+)\)",ln)
- if g:
- print("#define %s %s"%(g.group(1),g.group(2)))
- return global_ln
-
- g = re.match(r"^typedef\s+(union|struct)\s+_\S+\s+{",ln);
- if g:
- print("typedef %s {"%(g.group(1)));
- return in_struct;
-
- print(ln,file=FO);
- return global_ln
-
-def in_struct(ln):
- g = re.match(r"^}\s+PACK_SUFFIX\s+(\S+);",ln);
- if g:
- print("} __attribute__((packed)) %s;"%(g.group(1)));
- return global_ln;
- g = re.match(r"^}\s+(\S+);",ln);
- if g:
- print("} %s;"%(g.group(1)));
- return global_ln;
-
- ln = ln.replace("PACK_SUFFIX","__attribute__((packed))");
- ln = ln.replace("ib_gid_prefix_t","__be64");
- ln = ln.replace("ib_net64_t","__be64");
- ln = ln.replace("ib_net32_t","__be32");
- ln = ln.replace("ib_net16_t","__be16");
- ln = ln.replace("boolean_t","bool");
- print(ln)
- return in_struct;
-
-mode = global_ln
-with open(sys.argv[1]) as FI, open(sys.argv[2],"wt") as FO:
- for ln in FI:
- ln = ln.rstrip();
- mode = mode(ln);
--
2.20.1
reply other threads:[~2019-09-24 8:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190924081834.16511-1-leon@kernel.org \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
/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.