[PATCH v3 1/2] dt-bindings: rtc: add reset-source property

2020-12-18 Thread Rasmus Villemoes
ar to wakeup-source. Suggested-by: Alexandre Belloni Signed-off-by: Rasmus Villemoes --- Documentation/devicetree/bindings/rtc/rtc.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/rtc/rtc.yaml b/Documentation/devicetree/bindings/rtc/rtc.yaml

[PATCH v3 0/2] add reset-source RTC binding, update pcf2127 driver

2020-12-18 Thread Rasmus Villemoes
elide the refactoring patch already in -next (5d78533a0c53 - rtc: pcf2127: move watchdog initialisation to a separate function), make sure to cc the DT binding list. Applies on top of next-20201218. Rasmus Villemoes (1): dt-bindings: rtc: add reset-source property Uwe Kleine-König (1): rtc: pcf

[PATCH v3 2/2] rtc: pcf2127: only use watchdog when explicitly available

2020-12-18 Thread Rasmus Villemoes
the device tree has a "reset-source" property. Signed-off-by: Uwe Kleine-König [RV: s/has-watchdog/reset-source/] Signed-off-by: Rasmus Villemoes --- drivers/rtc/rtc-pcf2127.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc

[PATCH net v2 0/3] ucc_geth fixes

2020-12-18 Thread Rasmus Villemoes
This is three bug fixes that fell out of a series of cleanups of the ucc_geth driver. Please consider applying via the net tree. v2: reorder and split off from larger series; add Andrew's R-b to patch 1; only move the free_netdev() call in patch 3. Rasmus Villemoes (3): ethernet: ucc_geth

[PATCH net v2 2/3] ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram

2020-12-18 Thread Rasmus Villemoes
t could be attributed to this, but it seems to be the kind of thing that would be extremely hard to debug. So extend the struct definition so that we do allocate 192 bytes. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.h | 9 - 1 file changed, 8 insertions(+),

[PATCH net v2 1/3] ethernet: ucc_geth: set dev->max_mtu to 1518

2020-12-18 Thread Rasmus Villemoes
Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 714b501be7d0..380c1f09adaf 10064

[PATCH net v2 3/3] ethernet: ucc_geth: fix use-after-free in ucc_geth_remove()

2020-12-18 Thread Rasmus Villemoes
ugeth is the netdiv_priv() part of the netdevice. Accessing the memory pointed to by ugeth (such as done by ucc_geth_memclean() and the two of_node_puts) after free_netdev() is thus use-after-free. Signed-off-by: Rasmus Villemoes --- drivers/net/ethernet/freescale/ucc_geth.c | 2 +- 1 file

Re: [PATCH] genksyms: Ignore module scoped _Static_assert()

2020-12-01 Thread Rasmus Villemoes
On 01/12/2020 20.56, Nick Desaulniers wrote: > On Tue, Dec 1, 2020 at 9:04 AM Marco Elver wrote: >> >> On Tue, Dec 01, 2020 at 04:14PM +, Christoph Hellwig wrote: >>> Why not use the kernels own BUILD_BUG_ON instead of this idiom? >> > And to proactively address the inevitable: why do we have

Re: [PATCH] lib/find_bit: Add find_prev_*_bit functions.

2020-12-02 Thread Rasmus Villemoes
On 02/12/2020 10.47, Andy Shevchenko wrote: > On Wed, Dec 02, 2020 at 10:10:09AM +0900, Yun Levi wrote: >> Inspired find_next_*bit function series, add find_prev_*_bit series. >> I'm not sure whether it'll be used right now But, I add these functions >> for future usage. > > This patch has few iss

Re:

2020-12-03 Thread Rasmus Villemoes
On 03/12/2020 02.23, Yun Levi wrote: > On Thu, Dec 3, 2020 at 7:51 AM Yun Levi wrote: >> >> On Thu, Dec 3, 2020 at 6:26 AM Yury Norov wrote: >>> >>> On Wed, Dec 2, 2020 at 10:22 AM Yun Levi wrote: On Thu, Dec 3, 2020 at 2:26 AM Yury Norov wrote: > Also look at lib/find_bit_be

Re: [PATCH 2/2] drivers: misc: add ripple counter driver

2021-03-01 Thread Rasmus Villemoes
On 28/02/2021 10.33, Andy Shevchenko wrote: > On Sun, Feb 28, 2021 at 11:29 AM Andy Shevchenko > wrote: >> >> On Sun, Feb 28, 2021 at 11:07 AM Andy Shevchenko >> wrote: >>> On Friday, February 26, 2021, Rasmus Villemoes >>> wrote: >>>>

Re: [PATCH 0/2] add ripple counter dt binding and driver

2021-03-01 Thread Rasmus Villemoes
On 26/02/2021 20.53, Guenter Roeck wrote: > On 2/26/21 8:35 AM, Rasmus Villemoes wrote: >> On 26/02/2021 15.35, Arnd Bergmann wrote: >>> On Fri, Feb 26, 2021 at 3:14 PM Rasmus Villemoes >>> wrote: >>> >>>> >>>> So I'm thinking t

Re: [PATCH 06/14] bitsperlong.h: introduce SMALL_CONST() macro

2021-03-12 Thread Rasmus Villemoes
On 12/03/2021 06.28, Yury Norov wrote: > On Fri, Feb 19, 2021 at 12:07:27AM +0100, Rasmus Villemoes wrote: >> On 18/02/2021 05.05, Yury Norov wrote: >>> Many algorithms become simpler if they are passed with relatively small >>> input values. One example is bitmap opera

Re: [PATCH 14/14] MAINTAINERS: Add entry for the bitmap API

2021-03-12 Thread Rasmus Villemoes
On 18/02/2021 16.34, Yury Norov wrote: > On Thu, Feb 18, 2021 at 05:28:32PM +0200, Andy Shevchenko wrote: >> On Wed, Feb 17, 2021 at 08:05:12PM -0800, Yury Norov wrote: >>> Add myself as maintainer for bitmap API. >>> >>> I'm an author of current implementation of lib/find_bit and an >>> active con

[PATCH 1/2] devtmpfs: fix placement of complete() call

2021-03-12 Thread Rasmus Villemoes
which we'll fix in a subsequent patch. Fixes: bcbacc4909f1 ("devtmpfs: refactor devtmpfsd()") Signed-off-by: Rasmus Villemoes --- drivers/base/devtmpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.

[PATCH 2/2] devtmpfs: actually reclaim some init memory

2021-03-12 Thread Rasmus Villemoes
on() is in an __init function. Signed-off-by: Rasmus Villemoes --- drivers/base/devtmpfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index aedeb2dc1a18..8be352ab4ddb 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/ba

Re: [PATCH v2 1/2] init/initramfs.c: allow asynchronous unpacking

2021-03-13 Thread Rasmus Villemoes
On 11/03/2021 19.02, Linus Torvalds wrote: > On Wed, Mar 10, 2021 at 5:45 PM Rasmus Villemoes > wrote: >> >> Hm, gcc does elide the test of the return value, but jumps back to a >> place where it always loads state from its memory location and does the >> who

[PATCH v3 0/2] background initramfs unpacking, and CONFIG_MODPROBE_PATH

2021-03-13 Thread Rasmus Villemoes
he subsystem being used. - Add A-b, R-b to patch 2. Rasmus Villemoes (2): init/initramfs.c: do unpacking asynchronously modules: add CONFIG_MODPROBE_PATH .../admin-guide/kernel-parameters.txt | 12 ++ drivers/base/firmware_loader/main.c | 2 + include/linux/i

[PATCH v3 1/2] init/initramfs.c: do unpacking asynchronously

2021-03-13 Thread Rasmus Villemoes
. So there is an escape hatch in the form of an initramfs_async= command line parameter. Signed-off-by: Rasmus Villemoes --- .../admin-guide/kernel-parameters.txt | 12 ++ drivers/base/firmware_loader/main.c | 2 + include/linux/initrd.h|

[PATCH v3 2/2] modules: add CONFIG_MODPROBE_PATH

2021-03-13 Thread Rasmus Villemoes
pletely in the background while devices get probed means I get to handle the gpio watchdog in time without getting reset. [1] __request_module() already has an early -ENOENT return when modprobe_path is the empty string. Reviewed-by: Greg Kroah-Hartman Acked-by: Jessica Yu Signed-off-by: Rasmus

Re: [PATCH] [RFC] arm64: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION

2021-03-10 Thread Rasmus Villemoes
On 10/03/2021 21.49, Masahiro Yamada wrote: > On Mon, Mar 1, 2021 at 10:11 AM Nicholas Piggin wrote: > > I tested LD_DEAD_CODE_DATA_ELIMINATION for the latest kernel. > > I added an unused function, this_func_is_unused(), > then built the ppc kernel with LD_DEAD_CODE_DATA_ELIMINATION. > > It r

[PATCH resend] kernel/cred.c: make init_groups static

2021-03-10 Thread Rasmus Villemoes
init_groups is declared in both cred.h and init_task.h, but it is not actually referenced anywhere outside of cred.c where it is defined. So make it static and remove the declarations. Signed-off-by: Rasmus Villemoes --- include/linux/cred.h | 1 - include/linux/init_task.h | 1 - kernel

[PATCH] scsi: bnx2i: make bnx2i_process_iscsi_error simpler and more robust

2021-03-10 Thread Rasmus Villemoes
;. Also give the message pointer a similar treatment - there's no point making temporary copies on the stack of those two strings. Signed-off-by: Rasmus Villemoes --- drivers/scsi/bnx2i/bnx2i_hwi.c | 85 -- 1 file changed, 41 insertions(+), 44 deletions(-) dif

Re: [PATCH v2 1/2] init/initramfs.c: allow asynchronous unpacking

2021-03-10 Thread Rasmus Villemoes
On 09/03/2021 23.16, Linus Torvalds wrote: > On Tue, Mar 9, 2021 at 1:17 PM Rasmus Villemoes > wrote: >> >> So add an initramfs_async= kernel parameter, allowing the main init >> process to proceed to handling device_initcall()s without waiting for >> populate_root

Re: [PATCH v2 1/2] init/initramfs.c: allow asynchronous unpacking

2021-03-10 Thread Rasmus Villemoes
On 11/03/2021 01.17, Rasmus Villemoes wrote: > On 09/03/2021 23.16, Linus Torvalds wrote: >> On Tue, Mar 9, 2021 at 1:17 PM Rasmus Villemoes >> wrote: >>> >>> So add an initramfs_async= kernel parameter, allowing the main init >>> process to proceed to h

Re: [PATCH 3/3] [v4] lib/vsprintf: no_hash_pointers prints all addresses as unhashed

2021-03-02 Thread Rasmus Villemoes
On 02/03/2021 15.28, Geert Uytterhoeven wrote: > Fortunately gcc is already smart enough to deduplicate identical strings, > but only in the same source file. Yeah, gcc can't do much more since it only handles one source file at a time. However, the linker certainly deduplicates strings across tr

[PATCH] ARM: decompressor: remove unused global variable output_data

2021-03-08 Thread Rasmus Villemoes
output_data seems to have been write-only since the flush_window() callback was removed in commit e7db7b4270ed ("arm: add support for LZO-compressed kernels"). Signed-off-by: Rasmus Villemoes --- arch/arm/boot/compressed/misc.c | 5 + 1 file changed, 1 insertion(+), 4 deletion

Re: [PATCH 1/2] dt-bindings: misc: add binding for generic ripple counter

2021-03-08 Thread Rasmus Villemoes
On 08/03/2021 18.21, Rob Herring wrote: > On Fri, Feb 26, 2021 at 03:14:10PM +0100, Rasmus Villemoes wrote: >> While a ripple counter can not usually be interfaced with (directly) >> from software, it may still be a crucial component in a board >> layout. To prevent its i

[PATCH net v2 1/2] net: mrp: fix definitions of MRP test packets

2021-01-21 Thread Rasmus Villemoes
tibility issues. Signed-off-by: Rasmus Villemoes --- include/uapi/linux/mrp_bridge.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/mrp_bridge.h b/include/uapi/linux/mrp_bridge.h index 6aeb13ef0b1e..d1d0cf65916d 100644 --- a/include/uapi/linux/mrp_br

[PATCH net v2 2/2] net: mrp: move struct definitions out of uapi

2021-01-21 Thread Rasmus Villemoes
fact, most of these structs are unused in the kernel, so only keep the few that are actually referenced in the kernel code, and move them to the br_private_mrp.h header. Signed-off-by: Rasmus Villemoes --- include/uapi/linux/mrp_bridge.h | 86 - net/bridge/br_pri

[PATCH net v2 0/2] fix and move definitions of MRP data structures

2021-01-21 Thread Rasmus Villemoes
v2: update commit log of the patch to include comments on 32 bit alignment; include second patch moving the structs out of uapi. Rasmus Villemoes (2): net: mrp: fix definitions of MRP test packets net: mrp: move struct definitions out of uapi include/uapi/linux/mrp_bridge.h | 86

Re: [PATCH net v2 1/2] net: mrp: fix definitions of MRP test packets

2021-01-21 Thread Rasmus Villemoes
On 21/01/2021 22.23, Horatiu Vultur wrote: > The 01/21/2021 21:40, Rasmus Villemoes wrote: > > It seems that is missing a Fixes tag, other than that it looks fine. That would be these two I guess: Fixes: 2801758391ba ("bridge: uapi: mrp: Extend MRP attributes for MRP interc

Re: [PATCH 1/2] dt-bindings: misc: add binding for generic ripple counter

2021-03-08 Thread Rasmus Villemoes
On 08/03/2021 22.38, Rob Herring wrote: > On Mon, Mar 08, 2021 at 09:02:29PM +0100, Rasmus Villemoes wrote: >> On 08/03/2021 18.21, Rob Herring wrote: >>> On Fri, Feb 26, 2021 at 03:14:10PM +0100, Rasmus Villemoes wrote: >>>> While a ripple counter can not usuall

Re: [PATCH RESEND 0/2] Common protected-clocks implementation

2021-03-09 Thread Rasmus Villemoes
On 03/09/2020 06.00, Samuel Holland wrote: > Stephen, Maxime, > > You previously asked me to implement the protected-clocks property in a > driver-independent way: > > https://www.spinics.net/lists/arm-kernel/msg753832.html > > I provided an implementation 6 months ago, which I am resending now:

[PATCH 1/2] kernel/async.c: stop guarding pr_debug() statements

2021-03-09 Thread Rasmus Villemoes
ktime_get() for the starttime value, but the corresponding ktime_get for the end time can be elided by factoring it into a function which only gets called if the printk() arguments end up being evaluated. Signed-off-by: Rasmus Villemoes --- Andrew, this one is of course on top of https://lore.kerne

[PATCH 2/2] kernel/async.c: remove async_unregister_domain()

2021-03-09 Thread Rasmus Villemoes
No callers in the tree. Signed-off-by: Rasmus Villemoes --- include/linux/async.h | 1 - kernel/async.c| 18 -- 2 files changed, 19 deletions(-) diff --git a/include/linux/async.h b/include/linux/async.h index 0a17cd27f348..cce4ad31e8fc 100644 --- a/include/linux

Re: [PATCH v2 3/4] kbuild: re-implement CONFIG_TRIM_UNUSED_KSYMS to make it work in one-pass

2021-03-09 Thread Rasmus Villemoes
On 09/03/2021 20.54, Nicolas Pitre wrote: > On Wed, 10 Mar 2021, Masahiro Yamada wrote: > >>> I'm not sure I do understand every detail here, especially since it is >>> so far away from the version that I originally contributed. But the >>> concept looks good. >>> >>> I still think that there is

[PATCH v2 0/2] background initramfs unpacking, and CONFIG_MODPROBE_PATH

2021-03-09 Thread Rasmus Villemoes
m wait_for_initramfs(). - Fix initialization of initramfs_async variable. Rasmus Villemoes (2): init/initramfs.c: allow asynchronous unpacking modules: add CONFIG_MODPROBE_PATH .../admin-guide/kernel-parameters.txt | 12 ++ drivers/base/firmware_loader/main.c | 2 + in

[PATCH v2 2/2] modules: add CONFIG_MODPROBE_PATH

2021-03-09 Thread Rasmus Villemoes
g proceeds completely in the background while devices get probed means I get to handle the gpio watchdog in time without getting reset. [1] __request_module() already has an early -ENOENT return when modprobe_path is the empty string. Signed-off-by: Rasmus Villemoes --- init/Kconfig | 12 ++

[PATCH v2 1/2] init/initramfs.c: allow asynchronous unpacking

2021-03-09 Thread Rasmus Villemoes
es is roughly the same as above, but with 172 lines inbetween - so more than one cpu has been kept busy doing work that would otherwise only happen after the populate_rootfs() finished. Signed-off-by: Rasmus Villemoes --- .../admin-guide/kernel-parameters.txt | 12 ++ drivers

Re: [PATCH] ethernet: ucc_geth: Use kmemdup instead of kmalloc and memcpy

2021-03-09 Thread Rasmus Villemoes
;ugeth_primary_info, sizeof(*ug_info), GFP_KERNEL); > if (ug_info == NULL) > return -ENOMEM; > - memcpy(ug_info, &ugeth_primary_info, sizeof(*ug_info)); > > ug_info->uf_info.ucc_num = ucc_num; > > Ah, yes, of course, I should have used that. Acked-by: Rasmus Villemoes

Re: [PATCH v2 1/2] init/initramfs.c: allow asynchronous unpacking

2021-03-09 Thread Rasmus Villemoes
On 09/03/2021 23.07, Linus Torvalds wrote: > On Tue, Mar 9, 2021 at 1:17 PM Rasmus Villemoes > wrote: >> >> So add an initramfs_async= kernel parameter, allowing the main init >> process to proceed to handling device_initcall()s without waiting for >> populate_rootfs

Re: [PATCH v2 1/2] init/initramfs.c: allow asynchronous unpacking

2021-03-09 Thread Rasmus Villemoes
On 09/03/2021 23.16, Linus Torvalds wrote: > On Tue, Mar 9, 2021 at 1:17 PM Rasmus Villemoes > wrote: >> >> So add an initramfs_async= kernel parameter, allowing the main init >> process to proceed to handling device_initcall()s without waiting for >> populate_root

[RFC PATCH] devres: better type safety with devm_*_action()

2021-03-09 Thread Rasmus Villemoes
for a trivial local wrapper - e.g. drivers/watchdog/cadence_wdt.c could just use clk_disable_unprepare directly and avoid defining cdns_clk_disable_unprepare. Signed-off-by: Rasmus Villemoes --- drivers/base/devres.c | 32 +++- include

Re: [PATCH v2] kernel: Expose SYS_kcmp by default

2021-02-05 Thread Rasmus Villemoes
On 05/02/2021 22.06, Chris Wilson wrote: > Userspace has discovered the functionality offered by SYS_kcmp and has > started to depend upon it. In particular, Mesa uses SYS_kcmp for > os_same_file_description() in order to identify when two fd (e.g. device > or dmabuf) point to the same struct file.

Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

2021-01-26 Thread Rasmus Villemoes
On 26/01/2021 09.50, Greg Kroah-Hartman wrote: > On Mon, Jan 25, 2021 at 08:59:54PM +0100, Rasmus Villemoes wrote: >> On 25/01/2021 20.40, Rasmus Villemoes wrote: >>> On 25/01/2021 19.39, Greg Kroah-Hartman wrote: >>>> From: Rasm

[PATCH 0/2] net: dsa: mv88e6xxx: fix vlan filtering for 6250

2021-01-15 Thread Rasmus Villemoes
. Rasmus Villemoes (2): net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext net: dsa: mv88e6xxx: use mv88e6185_g1_vtu_getnext() for the 6250 drivers/net/dsa/mv88e6xxx/chip.c| 2 +- drivers/net/dsa/mv88e6xxx/global1.h | 2 -- drivers/net/dsa/mv88e6xxx/global1_vtu.c

[PATCH net-next 2/2] net: dsa: mv88e6xxx: use mv88e6185_g1_vtu_getnext() for the 6250

2021-01-15 Thread Rasmus Villemoes
mv88e6250_g1_vtu_getnext is almost identical to mv88e6185_g1_vtu_getnext, except for the 6250 only having 64 databases instead of 256. We can reduce code duplication by simply masking off the extra two garbage bits when assembling the fid from VTU op [3:0] and [11:8]. Signed-off-by: Rasmus

[PATCH net 1/2] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

2021-01-15 Thread Rasmus Villemoes
sure to keep them that way when the entry is updated. Fixes: 92307069a96c (net: dsa: mv88e6xxx: Avoid VTU corruption on 6097) Signed-off-by: Rasmus Villemoes --- drivers/net/dsa/mv88e6xxx/global1_vtu.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/global1_vtu.c

Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

2021-01-25 Thread Rasmus Villemoes
On 25/01/2021 19.39, Greg Kroah-Hartman wrote: > From: Rasmus Villemoes > > commit 87fe04367d842c4d97a77303242d4dd4ac351e46 upstream. > Greg, please drop this from 4.19-stable. Details: > > --- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c > +++ b/drivers/net/dsa/mv

Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

2021-01-25 Thread Rasmus Villemoes
On 25/01/2021 20.40, Rasmus Villemoes wrote: > On 25/01/2021 19.39, Greg Kroah-Hartman wrote: >> From: Rasmus Villemoes >> >> commit 87fe04367d842c4d97a77303242d4dd4ac351e46 upstream. >> > > Greg, please drop this from 4.19-stable. Details: > >> >&g

Re: [PATCH net] net: mrp: use stp state as substitute for unimplemented mrp state

2021-01-25 Thread Rasmus Villemoes
On 19/01/2021 16.52, Andrew Lunn wrote: > On Tue, Jan 19, 2021 at 09:32:40AM +0100, Horatiu Vultur wrote: >> The 01/18/2021 21:27, Vladimir Oltean wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the >>> content is safe >>> >>> On Mon, Jan 18, 2021 at 09:20:36PM +0

Re: [PATCH] dt-bindings: rtc: pcf2127: update bindings

2021-01-27 Thread Rasmus Villemoes
On 26/01/2021 23.48, Alexandre Belloni wrote: > On 21/12/2020 22:17:54+0100, Rasmus Villemoes wrote: >> On 19/12/2020 02.34, Alexandre Belloni wrote: >>> pcf2127, pcf2129 and pca2129 support start-year and reset-source. >>> >> >> No, the 2129 variant doesn&#

Re: [PATCH] dt-bindings: rtc: pcf2127: update bindings

2021-01-27 Thread Rasmus Villemoes
On 27/01/2021 14.18, Alexandre Belloni wrote: > On 27/01/2021 14:07:59+0100, Rasmus Villemoes wrote: >> On 26/01/2021 23.48, Alexandre Belloni wrote: >>> On 21/12/2020 22:17:54+0100, Rasmus Villemoes wrote: >>>> On 19/12/2020 02.34, Alexandre Belloni wrote: >

[PATCH] spi: fsl: fix use of spisel_boot signal on MPC8309

2020-11-27 Thread Rasmus Villemoes
e more chip select in use than the number of GPIO chip selects. Cc: sta...@vger.kernel.org # v5.4+ Cc: Christophe Leroy Cc: Linus Walleij Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Signed-off-by: Rasmus Villemoes --- Longer-term, it might be nicer to introduce

Re: [RFC] [PATCH] Pre-emption control for userspace

2014-03-06 Thread Rasmus Villemoes
"H. Peter Anvin" writes: > I have several issues with this interface: > > 1. First, a process needs to know if it *should* have been preempted > before it calls sched_yield(). So there needs to be a second flag set > by the scheduler when granting amnesty. > > 2. A process which fails to call sc

Re: [RFC] [PATCH] Pre-emption control for userspace

2014-03-06 Thread Rasmus Villemoes
Peter Zijlstra writes: > On Thu, Mar 06, 2014 at 02:24:43PM +0100, Rasmus Villemoes wrote: >> Is it possible to implement non-sleeping versions of {get,put}_user()? > > __{get,put}_user() Huh? arch/x86/include/asm/uaccess.h: /** * __get_user: - Get a simple variable from u

Re: [PATCH 1/2] lib/lcm.c: Ensure correct result whenever it fits

2014-01-14 Thread Rasmus Villemoes
Rasmus Villemoes writes: Ping... > Ensure that lcm(a,b) returns the mathematically correct result, > provided it fits in an unsigned long. The current version returns > garbage if a*b overflows, even if the final result would fit. > > Signed-off-by: Rasmus Villemoes > --- >

[PATCH 2/2] lib/lcm.c: lcm(n,0)=lcm(0,n) is 0, not n

2013-12-17 Thread Rasmus Villemoes
Return the mathematically correct answer when an argument is 0. Signed-off-by: Rasmus Villemoes --- I don't think there is any instance of lcm(0,n) in the kernel, but at least this reduces code size a little. lib/lcm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --

[PATCH 1/2] lib/lcm.c: Ensure correct result whenever it fits

2013-12-17 Thread Rasmus Villemoes
Ensure that lcm(a,b) returns the mathematically correct result, provided it fits in an unsigned long. The current version returns garbage if a*b overflows, even if the final result would fit. Signed-off-by: Rasmus Villemoes --- There are of course still plenty of cases where the return value is

Re: [PATCH 17/22] thinkpad_acpi: Replace strnicmp with strncasecmp

2014-09-17 Thread Rasmus Villemoes
On Wed, Sep 17 2014, Darren Hart wrote: > On Tue, Sep 16, 2014 at 10:51:31PM +0200, Rasmus Villemoes wrote: >> The kernel used to contain two functions for length-delimited, >> case-insensitive string comparison, strnicmp with correct semantics >> and a slightly buggy strnc

Re: [PATCH 00/22] treewide: Replace strnicmp with strncasecmp

2014-09-17 Thread Rasmus Villemoes
On Tue, Sep 16 2014, Theodore Ts'o wrote: > On Tue, Sep 16, 2014 at 10:51:14PM +0200, Rasmus Villemoes wrote: >> The kernel used to contain two functions for length-delimited, >> case-insensitive string comparison, strnicmp with correct semantics >> and a slightly bug

Re: [PATCH] mm/sl[aou]b: make kfree() aware of error pointers

2014-09-11 Thread Rasmus Villemoes
On Wed, Sep 10 2014, Jiri Kosina wrote: > On Wed, 10 Sep 2014, Dan Carpenter wrote: > >> > BTW if we stretch this argument a little bit more, we should also kill the >> > ZERO_OR_NULL_PTR() check from kfree() and make it callers responsibility >> > to perform the checking only if applicable ...

Re: [PATCH/RFC 1/2] lib: string: Remove duplicated function

2014-09-12 Thread Rasmus Villemoes
On Fri, Sep 12 2014, Andrew Morton wrote: > On Wed, 27 Aug 2014 09:36:01 +0200 Rasmus Villemoes > wrote: > >> lib/string.c contains two functions, strnicmp and strncasecmp, which >> do roughly the same thing, namely compare two strings >> case-insensitively up

[PATCH 0/6] Small seqfile-use improvements

2014-09-12 Thread Rasmus Villemoes
kernel/trace/. The net result is a nice round, but admittedly tiny, 256 byte .text reduction. Rasmus Villemoes (6): Coccinelle: Semantic patch for replacing puts with putc Coccinelle: Semantic patch for joining seq_puts calls Coccinelle: Semantic patch for replacing seq_printf calls with

[PATCH 3/6] Coccinelle: Semantic patch for replacing seq_printf calls with equivalent but simpler functions

2014-09-12 Thread Rasmus Villemoes
rn 0 on failure, but printf and putc return 1 on success, puts returns the length of the string. Therefore, we only do the printf->puts conversion where the return value of trace_seq_printf is either unused or used as a boolean; the printf->putc conversion can safely be done anywhere. Signe

[PATCH 2/6] Coccinelle: Semantic patch for joining seq_puts calls

2014-09-12 Thread Rasmus Villemoes
fewer cache lines (nothing guarantees that the linker places string literals which are used together close together in the final image). Signed-off-by: Rasmus Villemoes --- scripts/coccinelle/api/seq_puts_concat.cocci | 71 1 file changed, 71 insertions(+) create

[PATCH 6/6] trace: Replace single-character seq_puts with seq_putc

2014-09-12 Thread Rasmus Villemoes
Printing a single character to a seqfile might as well be done with seq_putc instead of seq_puts; this avoids a strlen() call and a memory access. It also shaves another few bytes off the generated code. Signed-off-by: Rasmus Villemoes --- kernel/trace/ftrace.c| 2 +- kernel

[PATCH 1/6] Coccinelle: Semantic patch for replacing puts with putc

2014-09-12 Thread Rasmus Villemoes
is either 0 or 1. In both cases, _putc is a drop-in replacement for _puts when the argument is a one-character string. Signed-off-by: Rasmus Villemoes --- scripts/coccinelle/api/seq_putsc.cocci | 61 ++ 1 file changed, 61 insertions(+) create mode 100644 scripts

[PATCH 5/6] trace: Merge consecutive seq_puts calls

2014-09-12 Thread Rasmus Villemoes
Consecutive seq_puts calls with literal strings can be merged to a single call. This reduces the size of the generated code, and can also lead to slight .rodata reduction (because of fewer nul and padding bytes). It should also shave a off a few clock cycles. Signed-off-by: Rasmus Villemoes

[PATCH 4/6] trace: Replace seq_printf by simpler equivalents

2014-09-12 Thread Rasmus Villemoes
t; seq_putc(m, c) Subsequent patches will simplify further. Signed-off-by: Rasmus Villemoes --- kernel/trace/ftrace.c| 30 kernel/trace/trace.c | 44 ++-- kernel/trace/trace_branch.c | 24 +

[PATCH 00/22] treewide: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Sorry for the unimaginative and identical commit messages. Rasmus Villemoes (22): ARM: Replace strnicmp with

[PATCH 19/22] s390/cio: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Sebastian Ott Cc: Peter Oberparleiter Cc: linux...@de.ibm.com Cc: linux-s...@vger.kernel.org Signed-off-by: Rasmus

[PATCH 18/22] PNP: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: "Rafael J. Wysocki" Signed-off-by: Rasmus Villemoes --- drivers/pnp/interface.c | 24 -

[PATCH 21/22] Thermal: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Zhang Rui Cc: Eduardo Valentin Cc: linux...@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers/thermal

[PATCH 22/22] kdb: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Jason Wessel Cc: kgdb-bugrep...@lists.sourceforge.net Signed-off-by: Rasmus Villemoes --- kernel/debug/kdb

[PATCH 17/22] thinkpad_acpi: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
-...@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers/platform/x86/thinkpad_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 3bbc6eb..f6a14c0 100644 --- a/drivers/platform/x86

[PATCH 12/22] cpuidle: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: "Rafael J. Wysocki" Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Signed-off-by: Rasmus Villemoes --

[PATCH 20/22] staging: r8188eu: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Greg Kroah-Hartman Cc: Larry Finger Cc: de...@driverdev.osuosl.org Signed-off-by: Rasmus Villemoes --- drivers

[PATCH 15/22] Input: edt-ft5x06 - Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Dmitry Torokhov Cc: linux-in...@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers/input/touchscreen/edt

[PATCH 16/22] altera-stapl: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: "Igor M. Liplianin" Signed-off-by: Rasmus Villemoes --- drivers/misc/altera-stapl/altera.c | 4 ++

[PATCH 14/22] ib_srpt: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Roland Dreier Cc: Nicholas Bellinger Cc: linux-r...@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers

[PATCH 09/22] batman-adv: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Marek Lindner Cc: b.a.t.m@lists.open-mesh.org Cc: net...@vger.kernel.org Signed-off-by: Rasmus Villemoes

[PATCH 10/22] ACPI / battery: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: linux-a...@vger.kernel.org Signed-off-by: Rasmus Villemoes --

[PATCH 13/22] scsi: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: linux-s...@vger.kernel.org Signed-off-

[PATCH 07/22] isofs: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Jan Kara Signed-off-by: Rasmus Villemoes --- fs/isofs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 04/22] video: fbdev: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers/video/fbdev/pvr2fb.c | 2 +- drivers/video/fbdev/s3c2410fb.c| 8 ++--- drivers/video/fbdev/sis/sis_main.c | 66 +++--- drivers/video/fbdev/sm501fb.c | 4

[PATCH 06/22] ocfs2: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Mark Fasheh Cc: Joel Becker Cc: ocfs2-de...@oss.oracle.com Signed-off-by: Rasmus Villemoes --- fs/ocfs2/cluster

[PATCH 05/22] cifs: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Steve French Cc: linux-c...@vger.kernel.org Cc: samba-techni...@lists.samba.org Signed-off-by: Rasmus Villemoes

[PATCH 01/22] ARM: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Rasmus Villemoes --- arch/arm/mach-pxa

[PATCH 11/22] cpufreq: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: linux...@vger.kernel.org Signed-off-by: Rasmus Villemoes --

[PATCH 08/22] ALSA: hda - Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-de...@alsa-project.org Signed-off-by: Rasmus Villemoes --- sound/pci

[PATCH 03/22] netfilter: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
org Signed-off-by: Rasmus Villemoes --- net/netfilter/ipvs/ip_vs_ftp.c | 6 +++--- net/netfilter/nf_conntrack_ftp.c | 4 ++-- net/netfilter/nf_conntrack_sip.c | 22 +++--- net/netfilter/nf_log.c | 2 +- net/netfilter/nf_nat_sip.c | 2 +- 5 files changed, 18

[PATCH 02/22] block: Replace strnicmp with strncasecmp

2014-09-16 Thread Rasmus Villemoes
avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Jens Axboe Signed-off-by: Rasmus Villemoes --- block/partitions/mac.c | 8 1 file changed, 4 insertions

Comment added in 63662139e "params: Fix potential memory leak in add_sysfs_param()"

2014-03-21 Thread Rasmus Villemoes
Hi, I'm not at all convinced by the comment added in commit 63662139e519ce. If krealloc(attrs, ...) fails, nothing seems to free attrs; the krealloc() call certainly doesn't do it. If attrs was NULL to begin with, no harm done, but otherwise it is "attrs = mk->mp->grp.attrs;", and mk->mp is NULL'e

[PATCH] linux/thermal.h: Rename KELVIN_TO_CELSIUS to DECI_KELVIN_TO_CELSIUS

2014-03-24 Thread Rasmus Villemoes
The macros KELVIN_TO_CELSIUS and CELSIUS_TO_KELVIN actually work on decikelvins, so rename them to reflect their actual semantics. Signed-off-by: Rasmus Villemoes --- drivers/acpi/thermal.c | 12 ++-- drivers/platform/x86/asus-wmi.c | 2 +- drivers/platform/x86

[PATCH] mm: percpu: micro-optimize round-to-even

2014-06-19 Thread Rasmus Villemoes
This change shaves a few bytes off the generated code. Signed-off-by: Rasmus Villemoes --- mm/percpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index 2ddf9a9..978097f 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -720,8 +720,7 @@ static

[PATCH] drivers/sbus/char: Micro-optimization in display7seg.c

2014-06-19 Thread Rasmus Villemoes
Flipping a bit doesn't need four lines of code; and gcc seems to actually generate two branches. Signed-off-by: Rasmus Villemoes --- drivers/sbus/char/display7seg.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus

[PATCH] x86: Micro-optimization in nhmex_rbox_get_constraint

2014-06-19 Thread Rasmus Villemoes
Flipping the LSB doesn't require four lines of code. This shaves a few bytes of the generated code, including a branch. Signed-off-by: Rasmus Villemoes --- arch/x86/kernel/cpu/perf_event_intel_uncore.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/kerne

[PATCH] trivial: drivers/macintosh/smu.c: Fix closing brace followed by if

2014-06-20 Thread Rasmus Villemoes
A closing brace followed by "if" is almost certainly a mistake. Maybe "else if" was meant, but in this case it doesn't really matter. Signed-off-by: Rasmus Villemoes --- drivers/macintosh/smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

<    3   4   5   6   7   8   9   10   11   12   >