Re: [PATCH 0/8] pwm: Add support for character devices

2024-04-13 Thread Uwe Kleine-König
Hello, On Sun, Mar 17, 2024 at 11:40:31AM +0100, Uwe Kleine-König wrote: > After the necessary changes to the lowlevel drivers got in for v6.9-rc1 > here come some changes to the core to implement /dev/pwmchipX character > devices. > > In my tests on an ARM STM32MP1 programming

[PATCH 0/8] pwm: Add support for character devices

2024-03-17 Thread Uwe Kleine-König
river goes away. I look forward to feedback, Uwe Uwe Kleine-König (8): pwm: Ensure that pwm_chips are allocated using pwmchip_alloc() pwm: Give some sysfs related variables and functions better names pwm: Move contents of sysfs.c into core.c pwm: Ensure a struct pwm has the same lifetime a

[PATCH 4/8] pwm: Ensure a struct pwm has the same lifetime as its pwm_chip

2024-03-17 Thread Uwe Kleine-König
ough. This happens with the following commits. Note this is a breaking change for all pwm drivers that don't use pwmchip_alloc(). Reviewed-by: Gustavo A. R. Silva # for struct_size() and __counted_by() Signed-off-by: Uwe Kleine-König --- drivers/pwm/core.c | 27 ++-

[PATCH v6 162/164] pwm: Ensure a struct pwm has the same lifetime as its pwm_chip

2024-02-14 Thread Uwe Kleine-König
ough. This happens with the following commits. Note this is a breaking change for all pwm drivers that don't use pwmchip_alloc(). Reviewed-by: Gustavo A. R. Silva # for struct_size() and __counted_by() Signed-off-by: Uwe Kleine-König --- drivers/pwm/core.c | 27 ++-

Re: [PATCH v2] mtd: rawnand: Prefer struct_size over open coded arithmetic

2024-02-11 Thread Uwe Kleine-König
ze" in the > devm_kzalloc() function. > > This way, the code is more readable and safer. > > Link: > https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments > [1] > Link: https://github.com/KSPP/linux/issues/160 [2] &

Re: [PATCH] mtd: rawnand: Prefer struct_size over open coded arithmetic

2024-02-10 Thread Uwe Kleine-König
ze" in the > devm_kzalloc() function. > > This way, the code is more readable and more safer. Unless you intend this non-English comparative: s/more safer/safer/ Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutio

[PATCH v5 108/111] pwm: Ensure a struct pwm has the same lifetime as its pwm_chip

2024-01-25 Thread Uwe Kleine-König
ough. This happens with the following commits. Note this is a breaking change for all pwm drivers that don't use pwmchip_alloc(). Reviewed-by: Gustavo A. R. Silva # for struct_size() and __counted_by() Signed-off-by: Uwe Kleine-König --- drivers/pwm/core.c | 27 ++-

Re: [PATCH] clk: hisilicon: Use devm_kcalloc() instead of devm_kzalloc()

2024-01-21 Thread Uwe Kleine-König
eof(*p_clk) * nums, GFP_KERNEL); > - > + p_clk = devm_kcalloc(dev, nums, sizeof(*p_clk), GFP_KERNEL); > if (!p_clk) > return; Looks good, Reviewed-by: Uwe Kleine-König My first impulse was to ask why hisi_clk_register_pll doesn't return an error i

[PATCH v4 111/115] pwm: Ensure a struct pwm has the same lifetime as its pwm_chip

2023-12-06 Thread Uwe Kleine-König
ough. This happens with the following commits. Note this is a breaking change for all pwm drivers that don't use pwmchip_alloc(). Reviewed-by: Gustavo A. R. Silva # for struct_size() and __counted_by() Signed-off-by: Uwe Kleine-König --- drivers/pwm/core.c | 27 ++-

[PATCH v3 105/108] pwm: Ensure a struct pwm has the same lifetime as its pwm_chip

2023-11-21 Thread Uwe Kleine-König
ough. This happens with the following commits. Note this is a breaking change for all pwm drivers that don't use pwmchip_alloc(). Signed-off-by: Uwe Kleine-König --- drivers/pwm/core.c | 26 ++ include/linux/pwm.h | 2 +- 2 files changed, 11 insertions(+), 17 del