Skip to content

Commit f03464c

Browse files
author
Rob Clark
committed
drm/msm/registers: Remove license/etc from generated headers
Since these generated files are no longer checked in, either in mesa or in the linux kernel, simplify things by dropping the verbose generated comment. These were semi-nerf'd on the kernel side, in the name of build reproducibility, by commit ba64c67 ("drivers: gpu: drm: msm: registers: improve reproducibility"), but in a way that was semi- kernel specific. We can just reduce the divergence between kernel and mesa by just dropping all of this. Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/673551/
1 parent a643abb commit f03464c

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

drivers/gpu/drm/msm/registers/gen_header.py

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,6 @@ def __init__(self):
444444
self.variants = set()
445445
self.file = []
446446
self.xml_files = []
447-
self.copyright_year = None
448-
self.authors = []
449-
self.license = None
450447

451448
def error(self, message):
452449
parser, filename = self.stack[-1]
@@ -686,10 +683,6 @@ def start_element(self, name, attrs):
686683
self.parse_field(attrs["name"], attrs)
687684
elif name == "database":
688685
self.do_validate(attrs["xsi:schemaLocation"])
689-
elif name == "copyright":
690-
self.copyright_year = attrs["year"]
691-
elif name == "author":
692-
self.authors.append(attrs["name"] + " <" + attrs["email"] + "> " + attrs["name"])
693686

694687
def end_element(self, name):
695688
if name == "domain":
@@ -706,8 +699,6 @@ def end_element(self, name):
706699
self.current_array = self.current_array.parent
707700
elif name == "enum":
708701
self.current_enum = None
709-
elif name == "license":
710-
self.license = self.cdata
711702

712703
def character_data(self, data):
713704
self.cdata += data
@@ -868,33 +859,7 @@ def dump_c(args, guard, func):
868859

869860
print("#ifndef %s\n#define %s\n" % (guard, guard))
870861

871-
print("""/* Autogenerated file, DO NOT EDIT manually!
872-
873-
This file was generated by the rules-ng-ng gen_header.py tool in this git repository:
874-
http://gitlab.freedesktop.org/mesa/mesa/
875-
git clone https://gitlab.freedesktop.org/mesa/mesa.git
876-
877-
The rules-ng-ng source files this header was generated from are:
878-
""")
879-
maxlen = 0
880-
for filepath in p.xml_files:
881-
new_filepath = re.sub("^.+drivers","drivers",filepath)
882-
maxlen = max(maxlen, len(new_filepath))
883-
for filepath in p.xml_files:
884-
pad = " " * (maxlen - len(new_filepath))
885-
filesize = str(os.path.getsize(filepath))
886-
filesize = " " * (7 - len(filesize)) + filesize
887-
filetime = time.ctime(os.path.getmtime(filepath))
888-
print("- " + new_filepath + pad + " (" + filesize + " bytes, from <stripped>)")
889-
if p.copyright_year:
890-
current_year = str(datetime.date.today().year)
891-
print()
892-
print("Copyright (C) %s-%s by the following authors:" % (p.copyright_year, current_year))
893-
for author in p.authors:
894-
print("- " + author)
895-
if p.license:
896-
print(p.license)
897-
print("*/")
862+
print("/* Autogenerated file, DO NOT EDIT manually! */")
898863

899864
print()
900865
print("#ifdef __KERNEL__")

0 commit comments

Comments
 (0)