diff options
author | Maxim Polyakov <max.senia.poliak@gmail.com> | 2020-09-27 12:14:09 +0300 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2020-10-11 11:19:07 +0000 |
commit | 7b27f4b62fc2302cfe7018829780bdfabea5d35e (patch) | |
tree | c0a44588d04b2c2539633e68290cfc8e1074b4d2 /src/ec/kontron/kempld/kempld.c | |
parent | aa99830c067036015b6ce45c01063b4482bf05b9 (diff) |
ec/kontron/kempld: Reflow long lines
Change-Id: Ia5ad0715b742427dffa6c0c507269d904fe19bcb
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45372
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/ec/kontron/kempld/kempld.c')
-rw-r--r-- | src/ec/kontron/kempld/kempld.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/ec/kontron/kempld/kempld.c b/src/ec/kontron/kempld/kempld.c index 19376c7961..f8371a8d82 100644 --- a/src/ec/kontron/kempld/kempld.c +++ b/src/ec/kontron/kempld/kempld.c @@ -16,21 +16,20 @@ static void kempld_uart_read_resources(struct device *dev) struct resource *const res_io = new_resource(dev, 0); struct resource *const res_irq = new_resource(dev, 1); const unsigned int uart = dev->path.generic.subid; + if (!config || !res_io || !res_irq || uart >= KEMPLD_NUM_UARTS) return; const enum kempld_uart_io io = config->uart[uart].io; if (io >= ARRAY_SIZE(io_addr)) { - printk(BIOS_ERR, "KEMPLD: Bad io value '%d' for UART#%u\n.", - io, uart); + printk(BIOS_ERR, "KEMPLD: Bad io value '%d' for UART#%u\n.", io, uart); dev->enabled = false; return; } const int irq = config->uart[uart].irq; if (irq >= 16) { - printk(BIOS_ERR, "KEMPLD: Bad irq value '%d' for UART#%u\n.", - irq, uart); + printk(BIOS_ERR, "KEMPLD: Bad irq value '%d' for UART#%u\n.", irq, uart); dev->enabled = false; return; } @@ -49,9 +48,10 @@ static void kempld_uart_read_resources(struct device *dev) const uint8_t reg = uart ? KEMPLD_UART_1 : KEMPLD_UART_0; const uint8_t val = kempld_read8(reg); - kempld_write8(reg, (val & ~(KEMPLD_UART_IO_MASK | KEMPLD_UART_IRQ_MASK)) - | io << KEMPLD_UART_IO_SHIFT - | irq << KEMPLD_UART_IRQ_SHIFT); + kempld_write8(reg, + (val & ~(KEMPLD_UART_IO_MASK | KEMPLD_UART_IRQ_MASK)) | + io << KEMPLD_UART_IO_SHIFT | + irq << KEMPLD_UART_IRQ_SHIFT); kempld_release_mutex(); } @@ -90,9 +90,7 @@ static void kempld_enable_dev(struct device *const dev) } /* Fall through. */ default: - printk(BIOS_WARNING, - "KEMPLD: Spurious device %s.\n", - dev_path(dev)); + printk(BIOS_WARNING, "KEMPLD: Spurious device %s.\n", dev_path(dev)); break; } } |