Skip to content

Commit

Permalink
Move the SPDX tag to the first line (riscv#137)
Browse files Browse the repository at this point in the history
Linux kernel coding style requires the SPDX tag to be placed in
the very first line of the generated file. See kernel file
 Documentation/process/license-rules.rst
at chapter 'License identifier syntax', '1. Placement:'.

Move the SPDX tag in the python script.
While there, adjust also the style of the multi-line comment.

Signed-off-by: Antonio Borneo <[email protected]>
  • Loading branch information
borneoa authored Jul 22, 2022
1 parent 7008313 commit 8ab2df7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 0 additions & 2 deletions encoding.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* SPDX-License-Identifier: BSD-3-Clause-Clear */

#ifndef RISCV_CSR_ENCODING_H
#define RISCV_CSR_ENCODING_H

Expand Down
10 changes: 6 additions & 4 deletions parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,13 @@ def make_c(instr_dict):

commit = os.popen('git log -1 --format="format:%h"').read()
enc_file = open('encoding.out.h','w')
enc_file.write(f'''
enc_file.write(f'''/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
* This file is auto-generated by running 'make' in
* https://github.com/riscv/riscv-opcodes ({commit})
*/
* This file is auto-generated by running 'make' in
* https://github.com/riscv/riscv-opcodes ({commit})
*/
{enc_header}
/* Automatically generated by parse_opcodes. */
#ifndef RISCV_ENCODING_H
Expand Down

0 comments on commit 8ab2df7

Please sign in to comment.