From 33e9eb098cb6b59a4bbd89840f2629b877e2f04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ni=C3=B1o=20D=C3=ADaz?= Date: Fri, 26 Jan 2018 18:57:25 +0000 Subject: [PATCH] Exclude html files from checkpatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also, fix 2 nits in the codebase. Signed-off-by: Antonio Niño Díaz --- Makefile | 4 ++-- src/link/patch.c | 1 - src/link/script.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5d5114c2..c21d4a6c 100644 --- a/Makefile +++ b/Makefile @@ -156,8 +156,8 @@ install: all # Target used to check the coding style of the whole codebase. '.y' and '.l' # files aren't checked, unfortunately... checkcodebase: - $Qfor file in `git ls-files | grep -E '\.c|\.h'`; do \ - ${CHECKPATCH} -f "$$file"; \ + $Qfor file in `git ls-files | grep -E '\.c|\.h' | grep -v '\.html'`; do \ + ${CHECKPATCH} -f "$$file"; \ done # Target used to check the coding style of the patches from the upstream branch diff --git a/src/link/patch.c b/src/link/patch.c index 5087a312..aed1d758 100644 --- a/src/link/patch.c +++ b/src/link/patch.c @@ -49,7 +49,6 @@ static int32_t getsymvalue(int32_t symid) errx(1, "%s: Unknown symbol type", __func__); } - static int32_t getrealbankfrominternalbank(int32_t n) { if (BankIndexIsWRAM0(n) || BankIndexIsROM0(n) || diff --git a/src/link/script.c b/src/link/script.c index 9b274f4d..119c2a7e 100644 --- a/src/link/script.c +++ b/src/link/script.c @@ -120,9 +120,9 @@ void script_SetCurrentSectionType(const char *type, uint32_t bank) current_real_bank = bank; return; } else if (strcmp(type, "WRAM0") == 0) { - if (bank != 0) { + if (bank != 0) errx(1, "Trying to assign a bank number to WRAM0.\n"); - } + current_bank = BANK_INDEX_WRAM0; current_real_bank = 0; return;