Re: [PATCH] gpiolib: cdev: Annotate struct linereq with __counted_by

2023-09-23 Thread Linus Walleij
tialization earlier. > > [1] > https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Linus Walleij > Cc: Bartosz Golaszewski > Cc: Andy Shevchenko > Cc: linux-g...@vger.kernel.org > Signed-off-by: Kees Cook That's neat! Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH] pinctrl: uniphier: Annotate struct uniphier_pinctrl_reg_region with __counted_by

2023-09-27 Thread Linus Walleij
; (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family > functions). > > As found with Coccinelle[1], add __counted_by for struct > uniphier_pinctrl_reg_region. > > [1] > https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci >

Re: [PATCH] mfd: db8500-prcmu: replace deprecated strncpy with strscpy

2023-09-28 Thread Linus Walleij
ings > [1] > Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html > [2] > Link: https://github.com/KSPP/linux/issues/90 > Cc: linux-hardening@vger.kernel.org > Signed-off-by: Justin Stitt Well analyzed, well patched, what can I say! Hats off. Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH RESEND v5 2/8] clk: mmp: Switch to use struct u32_fract instead of custom one

2023-09-29 Thread Linus Walleij
> Signed-off-by: Duje Mihanović Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH RESEND v5 7/8] arm64: dts: Add DTS for Marvell PXA1908 and samsung,coreprimevelte

2023-09-29 Thread Linus Walleij
27;d rather write my own pin controller. But it exists, so I can't say you can't use it. Not my choice. I understand it is convenient. It is possible to switch later, but only if you have a unique pin controller compatible so please add that. Yours, Linus Walleij

Re: [PATCH RESEND v5 7/8] arm64: dts: Add DTS for Marvell PXA1908 and samsung,coreprimevelte

2023-09-30 Thread Linus Walleij
On Sat, Sep 30, 2023 at 10:25 AM Duje Mihanović wrote: > On Saturday, September 30, 2023 12:05:41 AM CEST Linus Walleij wrote: > > But it exists, so I can't say you can't use it. Not my choice. > > I understand it is convenient. > > > > It is possible to

Re: [PATCH] net: dsa: realtek: replace deprecated strncpy with ethtool_sprintf

2023-10-10 Thread Linus Walleij
mib->name, ETH_GSTRING_LEN); > + ethtool_sprintf(&data, "%s", priv->mib_counters[i].name); Not only does it harden the kernel, it also makes it way easier to read! Way to go. Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH] ARM: unwind: Add missing "Call trace:" line

2024-01-10 Thread Linus Walleij
om dump_stack+0x18/0x1c > r7:0042 r6:0008 r5:0008 r4:80fab118 > dump_stack from ubsan_epilogue+0x10/0x3c > ubsan_epilogue from __ubsan_handle_out_of_bounds+0x80/0x84 > ... > > Reported-by: Mark Brown > Cc: Russell King > Cc: A

Re: [PATCH] wifi: brcmfmac: Adjust n_channels usage for __counted_by

2024-01-27 Thread Linus Walleij
t, n_channels needs to be increased _before_ accessing the newly > added array index. Increment it first, then use "i" for the prior index. > Solves this warning in the coming GCC that has __counted_by support: Makes perfect sense. Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH] pinctrl: pinctrl-zynqmp: Use devm_kcalloc() instead of devm_kzalloc()

2024-01-27 Thread Linus Walleij
2 > Signed-off-by: Erick Archer Patch applied! Yours, Linus Walleij

Re: [PATCH v4 8/8] dmaengine: ste_dma40: Use new helpers from overflow.h

2024-02-29 Thread Linus Walleij
de like this. Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH] pinctrl: airoha: Use unsigned long for bit search

2024-11-18 Thread Linus Walleij
-airoha.c: In function > 'airoha_irq_handler': > ../drivers/pinctrl/mediatek/pinctrl-airoha.c:2387:21: note: object 'status' > of size 4 > 2387 | u32 status; > | ^~ > > Signed-off-by: Kees Cook Patch applied, thanks Kees! Yours, Linus Walleij

Re: [PATCH v1 2/7] gpio: 74x164: Simplify code with cleanup helpers

2025-02-10 Thread Linus Walleij
On Mon, Feb 3, 2025 at 1:18 PM Andy Shevchenko wrote: > Use macros defined in linux/cleanup.h to automate resource lifetime > control in the driver. > > Signed-off-by: Andy Shevchenko Clearly this is more readable and less prone to accidental bugs. Reviewed-by: Linus Walleij

Re: [PATCH v1 4/7] gpio: 74x164: Make use of the macros from bits.h

2025-02-10 Thread Linus Walleij
On Mon, Feb 3, 2025 at 1:18 PM Andy Shevchenko wrote: > Make use of BIT() and GENMASK() where it makes sense. > > Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [RFC PATCH v3 08/15] mm: Introduce kernel_pgtables_set_pkey()

2025-02-06 Thread Linus Walleij
er boot, so the whole set should be tagged with __init? Other than that it LGTM. Yours, Linus Walleij

Re: [PATCH v1 6/7] gpio: 74x164: Switch to use dev_err_probe()

2025-02-11 Thread Linus Walleij
On Mon, Feb 3, 2025 at 1:18 PM Andy Shevchenko wrote: > Switch to use dev_err_probe() to simplify the error path and > unify a message template. > > Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH v2 5/6] gpio: max77759: add Maxim MAX77759 gpio driver

2025-02-27 Thread Linus Walleij
arent = &pdev->dev; > + chip->gc.owner = THIS_MODULE; The core already assigns THIS_MODULE so you can leave it unassigned. Yours, Linus Walleij

Re: [PATCH v3 5/6] gpio: max77759: add Maxim MAX77759 gpio driver

2025-03-04 Thread Linus Walleij
GPIO functions using the platform device > registered by the core MFD driver. > > Signed-off-by: André Draszik Reviewed-by: Linus Walleij Yours, Linus Walleij