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

2025-03-04 Thread Bartosz Golaszewski
the GPIO functions using the platform device > registered by the core MFD driver. > > Signed-off-by: André Draszik > Acked-by: Bartosz Golaszewski

Re: [PATCH v2 0/7] gpio: 74x164: Refactor and clean up the driver

2025-02-11 Thread Bartosz Golaszewski
From: Bartosz Golaszewski On Fri, 07 Feb 2025 17:17:07 +0200, Andy Shevchenko wrote: > Seems like I have had a cleanup series for 74x164, but forgot to send it > last year, here it is. > > Changelog v2: > - remove ->remove() leftover (Bart) > - collected

Re: [PATCH v2 7/7] gpio: 74x164: Utilise temporary variable for struct device

2025-02-07 Thread Bartosz Golaszewski
On Fri, Feb 7, 2025 at 4:42 PM Andy Shevchenko wrote: > > On Fri, Feb 07, 2025 at 05:17:14PM +0200, Andy Shevchenko wrote: > > We have a temporary variable to keep a pointer to struct device. > > Utilise it where it makes sense. > > Urgh, this seems incomplete... > There are more lines to convert,

Re: [PATCH v1 5/7] gpio: 74x164: Fully convert to use managed resources

2025-02-07 Thread Bartosz Golaszewski
On Mon, Feb 3, 2025 at 1:18 PM Andy Shevchenko wrote: > > Convert the driver probe stage to use managed resources. > > Signed-off-by: Andy Shevchenko > --- > drivers/gpio/gpio-74x164.c | 20 > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpio/gpi

Re: [PATCH v1 1/7] gpio: 74x164: Remove unneeded dependency to OF_GPIO

2025-02-07 Thread Bartosz Golaszewski
On Mon, Feb 3, 2025 at 1:18 PM Andy Shevchenko wrote: > > Remove unneeded dependency to OF_GPIO which driver does not use. > > Fixes: 3c7469514dbe ("gpio: 74x164: Make use of device properties") > Signed-off-by: Andy Shevchenko > --- > drivers/gpio/Kconfig | 1 - > 1 file changed, 1 deletion(-)

Re: [PATCH] drivers: gpio: gpio-ljca: Initialize num before accessing item in ljca_gpio_config

2024-12-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski On Tue, 03 Dec 2024 22:14:51 +0800, Haoyu Li wrote: > With the new __counted_by annocation in ljca_gpio_packet, the "num" > struct member must be set before accessing the "item" array. Failing to > do so will trigger a runtime warning when

[PATCH v2] lib: string_helpers: silence snprintf() output truncation warning

2024-11-01 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The output of ".%03u" with the unsigned int in range [0, 4294966295] may get truncated if the target buffer is not 12 bytes. This can't really happen here as the 'remainder' variable cannot exceed 999 but the compiler doesn't know it. To m

Re: [PATCH] lib: string_helpers: fix potential snprintf() output truncation

2024-10-22 Thread Bartosz Golaszewski
On Tue, Oct 22, 2024 at 9:15 AM Jiri Slaby wrote: > > On 21. 10. 24, 12:04, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > The output of ".%03u" with the unsigned int in range [0, 4294966295] may > > get truncated if the target buf

Re: [PATCH] lib: string_helpers: fix potential snprintf() output truncation

2024-10-21 Thread Bartosz Golaszewski
On Mon, Oct 21, 2024 at 12:04 PM Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > The output of ".%03u" with the unsigned int in range [0, 4294966295] may > get truncated if the target buffer is not 12 bytes. > > Fixes: 3c9f3681d0b4 ("[SCSI] li

[PATCH] lib: string_helpers: fix potential snprintf() output truncation

2024-10-21 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The output of ".%03u" with the unsigned int in range [0, 4294966295] may get truncated if the target buffer is not 12 bytes. Fixes: 3c9f3681d0b4 ("[SCSI] lib: add generic helper to print sizes rounded to the correct SI range") Cc: sta...@vger.ke

Re: [PATCH] lib: string_helpers: fix potential snprintf() output truncation

2024-10-21 Thread Bartosz Golaszewski
On Mon, Oct 21, 2024 at 11:34 AM Greg KH wrote: > > On Mon, Oct 21, 2024 at 11:14:17AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > The output of ".%03u" with the unsigned int in range [0, 4294966295] may > > get trunca

[PATCH] lib: string_helpers: fix potential snprintf() output truncation

2024-10-21 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The output of ".%03u" with the unsigned int in range [0, 4294966295] may get truncated if the target buffer is not 12 bytes. Fixes: 3c9f3681d0b4 ("[SCSI] lib: add generic helper to print sizes rounded to the correct SI range") Signed-off-by:

Re: [PATCH RESEND v5 1/8] gpio: pxa: disable pinctrl calls for MMP_GPIO

2023-10-02 Thread Bartosz Golaszewski
On Fri, Sep 29, 2023 at 5:42 PM Duje Mihanović wrote: > > Similarly to PXA3xx and MMP2, pinctrl-single isn't capable of setting > pin direction on MMP either. > > Fixes: a770d946371e ("gpio: pxa: add pin control gpio direction and request") > Signed-off-by: Duje Mihanović > Reviewed-by: Andy Shev

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

2023-09-25 Thread Bartosz Golaszewski
initialization 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 > --- Applied, thanks! Bart

Re: [PATCH] eeprom: at24: Annotate struct at24_data with __counted_by

2023-09-25 Thread Bartosz Golaszewski
> (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family > functions). > > As found with Coccinelle[1], add __counted_by for struct at24_data. > > [1] > https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Bartosz Golas