[formatting] run everything through codestyle

Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
This commit is contained in:
Travis Geiselbrecht
2019-06-19 20:54:28 -07:00
parent 4f2d4841d8
commit d8fa82cb91
491 changed files with 6037 additions and 9035 deletions

View File

@@ -51,8 +51,7 @@ struct gpio_kp {
/* TODO: Support multiple keypads? */
static struct gpio_kp *keypad;
static void check_output(struct gpio_kp *kp, int out, int polarity)
{
static void check_output(struct gpio_kp *kp, int out, int polarity) {
struct gpio_keypad_info *kpinfo = kp->keypad_info;
int key_index;
int in;
@@ -85,8 +84,7 @@ static void check_output(struct gpio_kp *kp, int out, int polarity)
}
static enum handler_return
gpio_keypad_timer_func(struct timer *timer, time_t now, void *arg)
{
gpio_keypad_timer_func(struct timer *timer, time_t now, void *arg) {
struct gpio_kp *kp = keypad;
struct gpio_keypad_info *kpinfo = kp->keypad_info;
int polarity = !!(kpinfo->flags & GPIOKPF_ACTIVE_HIGH);
@@ -138,8 +136,7 @@ done:
return INT_RESCHEDULE;
}
void gpio_keypad_init(struct gpio_keypad_info *kpinfo)
{
void gpio_keypad_init(struct gpio_keypad_info *kpinfo) {
int key_count;
int output_val;
int output_cfg;

View File

@@ -36,13 +36,11 @@
static unsigned long key_bitmap[BITMAP_NUM_WORDS(MAX_KEYS)];
void keys_init(void)
{
void keys_init(void) {
memset(key_bitmap, 0, sizeof(key_bitmap));
}
void keys_post_event(uint16_t code, int16_t value)
{
void keys_post_event(uint16_t code, int16_t value) {
if (code >= MAX_KEYS) {
dprintf(INFO, "Invalid keycode posted: %d\n", code);
return;
@@ -57,8 +55,7 @@ void keys_post_event(uint16_t code, int16_t value)
// dprintf(INFO, "key state change: %d %d\n", code, value);
}
int keys_get_state(uint16_t code)
{
int keys_get_state(uint16_t code) {
if (code >= MAX_KEYS) {
dprintf(INFO, "Invalid keycode requested: %d\n", code);
return -1;