[PATCH v2] arch: consolidate pm_power_off callback

2020-12-27 Thread Enrico Weigelt, metux IT consult
Move the pm_power_off callback into one global place and also add an function for conditionally calling it (when not NULL), in order to remove code duplication in all individual archs. Reported-by: kernel test robot Signed-off-by: Enrico Weigelt, metux IT consult changes v2: * fix

Re: [PATCH] arch: consolidate pm_power_off callback

2020-12-22 Thread Enrico Weigelt, metux IT consult
On 22.12.20 19:54, Geert Uytterhoeven wrote: Hi, > On Tue, Dec 22, 2020 at 7:46 PM Enrico Weigelt, metux IT consult > wrote: >> Move the pm_power_off callback into one global place and also add an >> function for conditionally calling it (when not NULL), in order to remove &

[PATCH] arch: consolidate pm_power_off callback

2020-12-22 Thread Enrico Weigelt, metux IT consult
Move the pm_power_off callback into one global place and also add an function for conditionally calling it (when not NULL), in order to remove code duplication in all individual archs. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/alpha/kernel/process.c| 6 -- arch/arc

[PATCH 06/23] arch: mips: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/mips/include/asm/hardirq.h |

[PATCH 09/23] arch: s390: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/s390/include/asm/hardirq.h | 5 +---

[PATCH 17/23] arch: arm: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm/include/asm/hardirq.h | 2 +- arch/arm/include/asm/hw_irq.h | 6 -- arch/arm/kernel/

[PATCH 18/23] arch: arm64: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm64/include/asm/hardirq.h | 9 ++--- arch/arm64/kernel/smp.c | 6 ++ 2

[PATCH 19/23] arch: c6x: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/c6x/include/asm/hardirq.h | 3 --- arch/c6x/include/asm/irq.h | 2 -- arch/c6x/kernel/

[PATCH 15/23] arch: mips: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/mips/include/asm/hw_irq.h | 4 arch/mips/kernel/irq-gt641xx.c | 3 ++- arch/mips/kernel/

[PATCH 16/23] arch: alpha: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/alpha/include/asm/hardirq.h | 3 --- arch/alpha/include/asm/hw_irq.h | 2 -- arch/alpha/k

[PATCH 13/23] arch: generic: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- include/asm-generic/hardirq.h | 1

[PATCH 11/23] arch: sparc: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/sparc/include/asm/hardirq_64.h | 2

[PATCH 14/23] kernel: generic counter for interrupt errors

2020-12-18 Thread Enrico Weigelt, metux IT consult
crease the counter in all call sites of ack_bad_irq() * subsequent patches will transform the individual archs one by one Signed-off-by: Enrico Weigelt, metux IT consult --- include/asm-generic/irq-err.h | 17 + kernel/irq/dummychip.c| 2 ++ kernel/irq/handle.c

[PATCH 08/23] arch: powerpc: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/powerpc/include/asm/hardirq.

[PATCH 04/23] arch: c6x: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/c6x/kernel/irq.c | 1 - 1 file chan

[PATCH 12/23] arch: x86: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/x86/kernel/irq.c | 3 --- 1 file

[PATCH 10/23] arch: sh: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/sh/kernel/irq.c | 1 - 1 file change

[PATCH 07/23] arch: parisc: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/parisc/include/asm/hardirq.h | 2 +

[PATCH 01/23] kernel: irq: irqdescs: warn on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
nce either the other callers already had printed more detailed information or (when called by __handle_domain_irq()) the printout just doesn't tell anything useful. Signed-off-by: Enrico Weigelt, metux IT consult --- kernel/irq/irqdesc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kern

[PATCH 05/23] arch: ia64: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
cases - we actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/ia64/include/asm/

[PATCH 03/23] arch: arm: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm/include/asm/hw_irq.h | 1

(repost) cleaning up handling of bad IRQs

2020-12-18 Thread Enrico Weigelt, metux IT consult
Hello friends, << reposting, since first queue didn't go through completely, due to mailer problem >> here's a patch queue for cleaning up the IRQ handling. Inspired by a discussion we had on a previous patch of mine: "arch: fix 'unexpected IRQ trap at vector' warnings" https://www.spi

[PATCH 02/23] arch: alpha: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/alpha/kernel/irq.c | 1 - 1 fil

[PATCH 19/23] arch: c6x: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/c6x/include/asm/hardirq.h | 3 --- arch/c6x/include/asm/irq.h | 2 -- arch/c6x/kernel/

[PATCH 14/23] kernel: generic counter for interrupt errors

2020-12-18 Thread Enrico Weigelt, metux IT consult
crease the counter in all call sites of ack_bad_irq() * subsequent patches will transform the individual archs one by one Signed-off-by: Enrico Weigelt, metux IT consult --- include/asm-generic/irq-err.h | 17 + kernel/irq/dummychip.c| 2 ++ kernel/irq/handle.c

[PATCH 16/23] arch: alpha: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/alpha/include/asm/hardirq.h | 3 --- arch/alpha/include/asm/hw_irq.h | 2 -- arch/alpha/k

[PATCH 12/23] arch: x86: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/x86/kernel/irq.c | 3 --- 1 file

[PATCH 03/23] arch: arm: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm/include/asm/hw_irq.h | 1

[PATCH 17/23] arch: arm: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm/include/asm/hardirq.h | 2 +- arch/arm/include/asm/hw_irq.h | 6 -- arch/arm/kernel/

[PATCH 18/23] arch: arm64: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm64/include/asm/hardirq.h | 9 ++--- arch/arm64/kernel/smp.c | 6 ++ 2

[PATCH 10/23] arch: sh: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/sh/kernel/irq.c | 1 - 1 file change

[PATCH 13/23] arch: generic: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- include/asm-generic/hardirq.h | 1

[PATCH 09/23] arch: s390: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/s390/include/asm/hardirq.h | 5 +---

[PATCH 08/23] arch: powerpc: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/powerpc/include/asm/hardirq.

[PATCH 15/23] arch: mips: use generic irq error counter

2020-12-18 Thread Enrico Weigelt, metux IT consult
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/mips/include/asm/hw_irq.h | 4 arch/mips/kernel/irq-gt641xx.c | 3 ++- arch/mips/kernel/

[PATCH 07/23] arch: parisc: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/parisc/include/asm/hardirq.h | 2 +

[PATCH 01/23] kernel: irq: irqdescs: warn on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
nce either the other callers already had printed more detailed information or (when called by __handle_domain_irq()) the printout just doesn't tell anything useful. Signed-off-by: Enrico Weigelt, metux IT consult --- kernel/irq/irqdesc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kern

[PATCH 11/23] arch: sparc: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/sparc/include/asm/hardirq_64.h | 2

[PATCH 04/23] arch: c6x: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/c6x/kernel/irq.c | 1 - 1 file chan

[PATCH 06/23] arch: mips: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/mips/include/asm/hardirq.h |

[PATCH 05/23] arch: ia64: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
cases - we actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/ia64/include/asm/

cleanup handling of bad IRQs

2020-12-18 Thread Enrico Weigelt, metux IT consult
Hello friends, here's a patch queue for cleaning up the IRQ handling. Inspired by a discussion we had on a previous patch of mine: "arch: fix 'unexpected IRQ trap at vector' warnings" https://www.spinics.net/lists/kernel/msg3763137.html Turned out that the whole message, as it is right

[PATCH 02/23] arch: alpha: drop misleading warning on spurious IRQ

2020-12-18 Thread Enrico Weigelt, metux IT consult
actually would want it to print the hw irq. Since all call sites already print out more detailed and correct information, we just don't need to duplicate this in each single arch. So just drop it. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/alpha/kernel/irq.c | 1 - 1 fil

Re: [PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-16 Thread Enrico Weigelt, metux IT consult
andle.c and inline'd accessor functions in include/asm-generic/irq.h (just feeling that accessors are a bit cleaner than direct access). Would that be okay ? By the way: I still wonder whether my case should have ever reached ack_bad_irq(). The irqdescs had been allocated via devm_irq_alloc_des

Re: [PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-15 Thread Enrico Weigelt, metux IT consult
e both callers (dummychip.c, handle.c) already dump out before ack_bad_irq(), do we need to print out anything at all ? I've also seen that many archs increase a counter (some use long, others atomic_t) - should we also consolidate this in an arch-independent way in handle.c (or does kstat_incr_irqs_this_cpu alre

Re: [PATCH] drivers: usb: gadget: prefer pr_*() functions over raw printk()

2020-12-10 Thread Enrico Weigelt, metux IT consult
usb endpoint logging, ...). --mtx -- --- Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren GPG/PGP-Schlüssel zu. --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [PATCH] drivers: usb: gadget: prefer pr_*() functions over raw printk()

2020-12-09 Thread Enrico Weigelt, metux IT consult
is would become > > dev_err(&pdev->dev, "Check IRQ setup!\n"); > You're right. I didn't check for that yet. I'll do it in a separate patch. --mtx -- --- Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert werden ! Für ein

[PATCH] drivers: usb: gadget: prefer pr_*() functions over raw printk()

2020-12-08 Thread Enrico Weigelt, metux IT consult
Reduce a bit logging boilerplate by using the preferred pr_*() macros instead of raw printk(). Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/usb/gadget/function/uvc.h | 2 +- drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- drivers/usb/gadget/udc/fsl_udc_core.c | 4

[PATCH] arch: fix 'unexpected IRQ trap at vector' warnings

2020-12-07 Thread Enrico Weigelt, metux IT consult
All archs, except Alpha, print out the irq number in hex, but the message looks like it was a decimal number, which is quite confusing. Fixing this by adding "0x" prefix. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/arm/include/asm/hw_irq.h | 2 +- arch/parisc/i

[PATCH] drivers: char: tpm: remove unneeded MODULE_VERSION() usage

2020-12-02 Thread Enrico Weigelt, metux IT consult
Remove MODULE_VERSION(), as it isn't needed at all: the only version making sense is the kernel version. Link: https://lkml.org/lkml/2017/11/22/480 Signed-off-by: Enrico Weigelt --- drivers/char/tpm/st33zp24/i2c.c | 1 - drivers/char/tpm/st33zp24/spi.c | 1 - drivers/char/tpm/st33zp24

[PATCH] drivers: char: tpm: remove unneeded MODULE_VERSION() usage

2019-12-16 Thread Enrico Weigelt, metux IT consult
Remove MODULE_VERSION(), as it isn't needed at all: the only version making sense is the kernel version. See also: https://lkml.org/lkml/2017/11/22/480 Signed-off-by: Enrico Weigelt, metux IT consult --- drivers/char/tpm/st33zp24/i2c.c | 1 - drivers/char/tpm/st33zp24/spi.c

[PATCH] arch: powerpc: Kconfig: pedantic formatting

2019-07-03 Thread Enrico Weigelt, metux IT consult
Formatting of Kconfig files doesn't look so pretty, so let the Great White Handkerchief come around and clean it up. Also convert "---help---" as requested on lkml. Signed-off-by: Enrico Weigelt, metux IT consult --- arch/powerpc/Kconfig

Re: [PATCH 13/41] drivers: tty: serial: uartlite: fill mapsize and use it

2019-04-29 Thread Enrico Weigelt, metux IT consult
On 29.04.19 17:19, Peter Korsgaard wrote: >>>>>> "Enrico" == Enrico Weigelt, metux IT consult writes: > > > Fill the struct uart_port->mapsize field and use it, insteaf of > > s/insteaf/instead/ Fixed. > > hardcoded values in man

Re: serial drivers polishing

2019-04-29 Thread Enrico Weigelt, metux IT consult
e ... turned out that this one needs some more rework :o --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [PATCH 22/41] drivers: tty: serial: cpm_uart: fix logging calls

2019-04-29 Thread Enrico Weigelt, metux IT consult
n't entirely sure that it's always defined before these functions could be called. Shall I change it to dev_*() ? --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [PATCH 37/41] drivers: tty: serial: 8250: simplify io resource size computation

2019-04-29 Thread Enrico Weigelt, metux IT consult
On 27.04.19 15:03, John Paul Adrian Glaubitz wrote: > On 4/27/19 2:52 PM, Enrico Weigelt, metux IT consult wrote: >> Simpily io resource size computation by setting mapsize field. > > Here's a typo thx. fixed. --mtx -- Enrico Weigelt, metux IT consult Free softwar

Re: [PATCH 36/41] drivers: tty: serial: 8250: store mmio resource size in port struct

2019-04-29 Thread Enrico Weigelt, metux IT consult
On 28.04.19 17:18, Andy Shevchenko wrote: > On Sat, Apr 27, 2019 at 02:52:17PM +0200, Enrico Weigelt, metux IT consult > wrote: >> The io resource size is currently recomputed when it's needed but this >> actually needs to be done once (or drivers could specify fixed value

Re: [PATCH 01/41] drivers: tty: serial: dz: use dev_err() instead of printk()

2019-04-29 Thread Enrico Weigelt, metux IT consult
On 27.04.19 15:29, Greg KH wrote: > On Sat, Apr 27, 2019 at 02:51:42PM +0200, Enrico Weigelt, metux IT consult > wrote: >> Using dev_err() instead of printk() for more consistent output. >> (prints device name, etc). >> >> Signed-off-by: Enrico Weigelt > >

Re: [PATCH 01/41] drivers: tty: serial: dz: use dev_err() instead of printk()

2019-04-29 Thread Enrico Weigelt, metux IT consult
On 27.04.19 15:31, Greg KH wrote: > On Sat, Apr 27, 2019 at 02:51:42PM +0200, Enrico Weigelt, metux IT consult > wrote: >> Using dev_err() instead of printk() for more consistent output. >> (prints device name, etc). >> >> Signed-off-by: Enrico Weigelt >>

Re: [PATCH 40/41] drivers: tty: serial: helper for setting mmio range

2019-04-29 Thread Enrico Weigelt, metux IT consult
ey don't really need to. >> + */ > >> +static inline void uart_memres_set_start_len(struct uart_driver *uart, >> + resource_size_t start, >> + resource_size_t len) > > The comment doesn't tell why this is needed when we have one for struct > resource. Renamed it to uart_memres_set_mmio_range(). This helper is meant for drivers that don't work w/ struct resource, or explicitly set their own len. Thanks for your review. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [PATCH 40/41] drivers: tty: serial: helper for setting mmio range

2019-04-29 Thread Enrico Weigelt, metux IT consult
ecialities of the various UPIO_* modes via struct resource. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

Re: [PATCH 01/41] drivers: tty: serial: dz: use dev_err() instead of printk()

2019-04-29 Thread Enrico Weigelt, metux IT consult
On 27.04.19 15:31, Greg KH wrote: > On Sat, Apr 27, 2019 at 02:51:42PM +0200, Enrico Weigelt, metux IT consult > wrote: >> Using dev_err() instead of printk() for more consistent output. >> (prints device name, etc). >> >> Signed-off-by: Enrico Weigelt >>

Re: [PATCH 37/41] drivers: tty: serial: 8250: simplify io resource size computation

2019-04-29 Thread Enrico Weigelt, metux IT consult
you like me to. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287

[PATCH 40/41] drivers: tty: serial: helper for setting mmio range

2019-04-27 Thread Enrico Weigelt, metux IT consult
Introduce a little helpers for settings the mmio range from an struct resource or start/len parameters with less code. (also setting iotype to UPIO_MEM) Also converting drivers to use these new helpers as well as fetching mapsize field instead of using hardcoded values. (the runtime overhead of th

[PATCH 24/41] drivers: tty: serial: timbuart: use dev_err() instead of printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Using dev_err() instead of printk() for more consistent output. (prints device name, etc). Signed-off-by: Enrico Weigelt --- drivers/tty/serial/timbuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/timbuart.c b/drivers/tty/serial/timbuart.c index 19d

[PATCH 27/41] drivers: tty: serial: sunzilog: fix formatting issues

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warnings: WARNING: Use #include instead of #38: FILE: drivers/tty/serial/sunzilog.c:38: +#include WARNING: line over 80 characters #109: FILE: drivers/tty/serial/sunzilog.c:109: +#define ZILOG_CHANNEL_FROM_PORT(PORT) ((struct zilog_channel __iomem *

[PATCH 35/41] drivers: tty: serial: 8250: add mapsize to platform data

2019-04-27 Thread Enrico Weigelt, metux IT consult
Adding a mapsize field for the 8250 port platform data struct, so we can now set the resource size (eg. *1) and don't need funny runtime detections like serial8250_port_size() anymore. For now, serial8250_port_size() is called everytime we need the io resource size. That function checks which chip

[PATCH 41/41] drivers: tty: serial: lpc32xx_hs: fill mapsize and use it

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fill the struct uart_port->mapsize field and use it, insteaf of hardcoded values in many places. This makes the code layout a bit more consistent and easily allows using generic helpers for the io memory handling. Candidates for such helpers could be eg. the request+ioremap and iounmap+release com

[PATCH 36/41] drivers: tty: serial: 8250: store mmio resource size in port struct

2019-04-27 Thread Enrico Weigelt, metux IT consult
The io resource size is currently recomputed when it's needed but this actually needs to be done once (or drivers could specify fixed values) Simplify that by doing this computation only once and storing the result into the mapsize field. serial8250_register_8250_port() is now called only once on

[PATCH 34/41] drivers: tty: serial: zs: fill mapsize and use it

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fill the struct uart_port->mapsize field and use it, insteaf of hardcoded values in many places. This makes the code layout a bit more consistent and easily allows using generic helpers for the io memory handling. Candidates for such helpers could be eg. the request+ioremap and iounmap+release com

[PATCH 33/41] drivers: tty: serial: zs: use dev_err() instead of printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Using dev_err() instead of printk() for more consistent output. (prints device name, etc). Signed-off-by: Enrico Weigelt --- drivers/tty/serial/zs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/zs.c b/drivers/tty/serial/zs.c index b03d3e4..adbfe79

[PATCH 30/41] drivers: tty: serial: ioc4_serial: use dev_warn() instead of printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Using dev_warn() instead of printk() for more consistent output. (prints device name, etc). Signed-off-by: Enrico Weigelt --- drivers/tty/serial/ioc4_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c i

[PATCH 06/41] drivers: tty: serial: sb1250-duart: use dev_err() instead of printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Using dev_err() instead of printk() for more consistent output. (prints device name, etc). Signed-off-by: Enrico Weigelt --- drivers/tty/serial/sb1250-duart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/sb1250-duart.c b/drivers/tty/serial/sb1250-d

[PATCH 01/41] drivers: tty: serial: dz: use dev_err() instead of printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Using dev_err() instead of printk() for more consistent output. (prints device name, etc). Signed-off-by: Enrico Weigelt --- drivers/tty/serial/dz.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/dz.c b/drivers/tty/serial/dz.c index 7b57e84..96e35a

[PATCH 25/41] drivers: tty: serial: timbuart: fix formatting issues

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warnings: WARNING: Missing a blank line after declarations #43: FILE: drivers/tty/serial/timbuart.c:43: + u32 ier = ioread32(port->membase + TIMBUART_IER) & ~RXFLAGS; + iowrite32(ier, port->membase + TIMBUART_IER); WARNING: Missing a blank line after declara

[PATCH 07/41] drivers: tty: serial: sb1250-duart: include instead of

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warning: WARNING: Use #include instead of #41: FILE: drivers/tty/serial/sb1250-duart.c:41: +#include Signed-off-by: Enrico Weigelt --- drivers/tty/serial/sb1250-duart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/sb1250-du

[PATCH 28/41] drivers: tty: serial: sunzilog: fix includes

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warning: WARNING: Use #include instead of #38: FILE: drivers/tty/serial/sunzilog.c:38: +#include Signed-off-by: Enrico Weigelt --- drivers/tty/serial/sunzilog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/sunzilog.c b/driv

[PATCH 09/41] drivers: tty: serial: sb1250-duart: fill mapsize and use it

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fill the struct uart_port->mapsize field and use it, insteaf of hardcoded values in many places. This makes the code layout a bit more consistent and easily allows using generic helpers for the io memory handling. Candidates for such helpers could be eg. the request+ioremap and iounmap+release com

[PATCH 20/41] drivers: tty: serial: cpm_uart: use dev_err()/dev_warn() instead of printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Using dev_err()/dev_warn() instead of printk() for more consistent output. (prints device name, etc). Signed-off-by: Enrico Weigelt --- drivers/tty/serial/cpm_uart/cpm_uart_core.c | 6 +++--- drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) di

[PATCH 10/41] drivers: tty: serial: sb1250-duart: fix missing parentheses

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warning: ERROR: Macros with complex values should be enclosed in parentheses #911: FILE: drivers/tty/serial/sb1250-duart.c:911: +#define SERIAL_SB1250_DUART_CONSOLE&sbd_console Signed-off-by: Enrico Weigelt --- drivers/tty/serial/sb1250-duart.c | 2 +- 1 file

[PATCH 08/41] drivers: tty: serial: sb1250-duart: fix checkpatch warning on printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
checkpatch complaints: WARNING: printk() should include KERN_ facility level #698: FILE: drivers/tty/serial/sb1250-duart.c:698: + printk(err); WARNING: printk() should include KERN_ facility level #706: FILE: drivers/tty/serial/sb1250-duart.c:706: +

[PATCH 22/41] drivers: tty: serial: cpm_uart: fix logging calls

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warnings by using pr_err(): WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... #109: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:109: + printk(KERN_ERR WARNING: Prefer [subsys

[PATCH 15/41] drivers: tty: serial: uartlite: fix use fix bare 'unsigned'

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #562: FILE: drivers/tty/serial/uartlite.c:562: + unsigned retries = 100; WARNING: Prefer 'unsigned int' to bare use of 'unsigned' #574: FILE: drivers/tty/serial/uartlite.c:574: +

[PATCH 14/41] drivers: tty: serial: uartlite: remove unnecessary braces

2019-04-27 Thread Enrico Weigelt, metux IT consult
checkpatch complains: WARNING: braces {} are not necessary for any arm of this statement #489: FILE: drivers/tty/serial/uartlite.c:489: + if (oops_in_progress) { [...] + } else [...] Signed-off-by: Enrico Weigelt --- drivers/tty/serial/uartlite.c | 4 ++-- 1 file cha

[PATCH 17/41] drivers: tty: serial: apbuart: fix logging calls

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warnings: WARNING: Prefer using '"%s...", __func__' to using 'apbuart_console_setup', this function's name, in a string #491: FILE: drivers/tty/serial/apbuart.c:491: + pr_debug("apbuart_console_setup co=%p, co->index=%i, options=%s\n", WARNING: Prefer [subsystem

[PATCH 21/41] drivers: tty: serial: cpm_uart: fix includes

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fixing checkpatch warning: WARNING: Use #include instead of #25: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:25: +#include WARNING: Use #include instead of +#include WARNING: Use #include instead of +#include Signed-off-by: Enrico Weigelt --- drivers

[PATCH 37/41] drivers: tty: serial: 8250: simplify io resource size computation

2019-04-27 Thread Enrico Weigelt, metux IT consult
Simpily io resource size computation by setting mapsize field. Some of the special cases handled by serial8250_port_size() can be simplified by putting this data to corresponding platform data or probe function. Signed-off-by: Enrico Weigelt --- arch/mips/alchemy/common/platform.c | 1 + driver

[PATCH 39/41] drivers: tty: serial: pmac_zilog: fill mapsize and use it

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fill the struct uart_port->mapsize field and use it, insteaf of hardcoded values in many places. This makes the code layout a bit more consistent and easily allows using generic helpers for the io memory handling. Candidates for such helpers could be eg. the request+ioremap and iounmap+release com

[PATCH 38/41] drivers: tty: serial: xilinx_uartps: fill mapsize and use it

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fill the struct uart_port->mapsize field and use it, insteaf of hardcoded values in many places. This makes the code layout a bit more consistent and easily allows using generic helpers for the io memory handling. Candidates for such helpers could be eg. the request+ioremap and iounmap+release com

[PATCH 31/41] drivers: tty: serial: ioc4_serial: use pr_*() instead of printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
This fixes a bunch of checkpatch warnings: WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... #930: FILE: drivers/tty/serial/ioc4_serial.c:930: + printk(KERN_ERR WARNING: Prefer [subsystem eg: net

[PATCH 23/41] drivers: tty: serial: cpm_uart: fix styling issues

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch errors: ERROR: else should follow close brace '}' #121: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:121: + } + else WARNING: line over 80 characters #150: FILE: drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c:150: +

[PATCH 32/41] drivers: tty: serial: 21285: define's for address/size, use mapsize field

2019-04-27 Thread Enrico Weigelt, metux IT consult
Instead of hardcoding raw numbers, add define's for the mmio address/size. Also fill the mapsize field and use it on mem request/release calls, for more consistency and allowing generic helpers to be used later. Signed-off-by: Enrico Weigelt --- drivers/tty/serial/21285.c | 12 +--- 1 fi

[PATCH 29/41] drivers: tty: serial: sunzilog: cleanup logging

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warning: WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... #1238: FILE: drivers/tty/serial/sunzilog.c:1238: + printk(KERN_INFO "Console: ttyS%d (SunZilog zs%d)\n", Signed-off-by: Enrico We

[PATCH 03/41] drivers: tty: serial: dz: fix missing parentheses

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warning: ERROR: Macros with complex values should be enclosed in parentheses #912: FILE: dz.c:912: +#define SERIAL_DZ_CONSOLE&dz_console Signed-off-by: Enrico Weigelt --- drivers/tty/serial/dz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 26/41] drivers: tty: serial: sunzilog: use dev_info() instead of printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Using dev_info() instead of printk() for more consistent output. (prints device name, etc). Signed-off-by: Enrico Weigelt --- drivers/tty/serial/sunzilog.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c inde

serial drivers polishing

2019-04-27 Thread Enrico Weigelt, metux IT consult
Hello folks, here's another attempt of polishing the serial drivers: * lots of minor cleanups to make checkpatch happier (eg. formatting, includes, inttypes, ...) * use appropriate logging helpers instead of printk() * consequent use of mapsize/mapbase fields: the basic idea is, all driver

[PATCH 05/41] drivers: tty: serial: dz: use pr_info() instead of incomplete printk()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix the checkpatch warning: WARNING: printk() should include KERN_ facility level #934: FILE: dz.c:934: + printk("%s%s\n", dz_name, dz_version); Signed-off-by: Enrico Weigelt --- drivers/tty/serial/dz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tt

[PATCH 12/41] drivers: tty: serial: uartlite: use dev_dbg() instead of pr_debug()

2019-04-27 Thread Enrico Weigelt, metux IT consult
Using dev_dbg() instead of pr_debg() for more consistent output. (prints device name, etc). Signed-off-by: Enrico Weigelt --- drivers/tty/serial/uartlite.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c inde

[PATCH 11/41] drivers: tty: serial: sb1250-duart: fix formatting error

2019-04-27 Thread Enrico Weigelt, metux IT consult
checkpatch complains: ERROR: space required before the open parenthesis '(' #659: FILE: drivers/tty/serial/sb1250-duart.c:659: + if(refcount_dec_and_test(&duart->map_guard)) Just add this missing space to make checkpatch happy. Signed-off-by: Enrico Weigelt --- drivers/tty/serial

[PATCH 19/41] drivers: tty: serial: apbuart: fix code formatting

2019-04-27 Thread Enrico Weigelt, metux IT consult
Fix checkpatch warnings: WARNING: line over 80 characters #9: FILE: drivers/tty/serial/apbuart.c:9: + * Copyright (C) 2006 Daniel Hellstrom , Aeroflex Gaisler AB WARNING: line over 80 characters #11: FILE: drivers/tty/serial/apbuart.c:11: + * Copyright (C) 2009 Kristoff

  1   2   >