From 99ef48f9c47a318c0004cd0d17f94ac169e260a7 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 23 Sep 2020 13:32:46 -0600 Subject: [PATCH] Address PR feedback --- layouts.sh | 2 ++ src/board/system76/common/kbled.c | 2 ++ src/ec/it5570e/include/ec/scratch.h | 2 ++ src/ec/it8587e/include/ec/scratch.h | 2 ++ tool/src/main.rs | 2 +- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/layouts.sh b/layouts.sh index d58e66f..169a58b 100755 --- a/layouts.sh +++ b/layouts.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-only +# This script produces layout data for the System76 Keyboard Configurator set -e diff --git a/src/board/system76/common/kbled.c b/src/board/system76/common/kbled.c index 1e36e18..7f7fb7e 100644 --- a/src/board/system76/common/kbled.c +++ b/src/board/system76/common/kbled.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-3.0-only + #include #include diff --git a/src/ec/it5570e/include/ec/scratch.h b/src/ec/it5570e/include/ec/scratch.h index 752dfc5..9195a38 100644 --- a/src/ec/it5570e/include/ec/scratch.h +++ b/src/ec/it5570e/include/ec/scratch.h @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-3.0-only + #ifndef _EC_SCRATCH_H #define _EC_SCRATCH_H diff --git a/src/ec/it8587e/include/ec/scratch.h b/src/ec/it8587e/include/ec/scratch.h index 1688d76..44be010 100644 --- a/src/ec/it8587e/include/ec/scratch.h +++ b/src/ec/it8587e/include/ec/scratch.h @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-3.0-only + #ifndef _EC_SCRATCH_H #define _EC_SCRATCH_H diff --git a/tool/src/main.rs b/tool/src/main.rs index 115af52..d29186e 100644 --- a/tool/src/main.rs +++ b/tool/src/main.rs @@ -397,7 +397,7 @@ fn main() { let output = parse_arg(&mut args, "output"); let input = parse_arg(&mut args, "input"); match args.next() { - Some(value_str) => match u16::from_str_radix(&value_str, 16) { + Some(value_str) => match u16::from_str_radix(value_str.trim_start_matches("0x"), 16) { Ok(value) => match unsafe { keymap_set(layer, output, input, value) } { Ok(()) => (), Err(err) => {