Re: [PATCH v4 05/11] firmware: qcom: scm: add support for object invocation

2025-05-14 Thread Bartosz Golaszewski
On Wed, 14 May 2025 at 11:37, Sumit Garg wrote: > > Hi Amir, > > I am still unable to get the QCOMTEE driver to work on db845c. As I can > see machine: "qcom,sdm845" is not supported for tzmem based on SHM > brigde here: drivers/firmware/qcom/qcom_tzmem.c +81. I am still seeing > following logs fr

Re: [PATCH v4 4/6] gpio: fix potential out-of-bound write

2025-05-09 Thread Bartosz Golaszewski
On Thu, May 8, 2025 at 3:07 PM Markus Burri wrote: > > Check that the input size does not exceed the buffer size. > If a caller write more characters, count is truncated to the max available > space in "simple_write_to_buffer". > Write a zero termination afterwards. > > Signed-off-by: Markus Burri

Re: [PATCH v4 0/6] Fix potential out-of-bounds error in some drivers

2025-05-09 Thread Bartosz Golaszewski
On Thu, May 8, 2025 at 3:06 PM Markus Burri wrote: > > Several drivers are using debugfs and follow the same pattern. > > A buffer is created on the stack with a limited size to copy the given data > from user space. The copy is performed using simple_write_to_buffer. > This function limits the in

Re: [PATCH] fbdev: via: use new GPIO line value setter callbacks

2025-04-23 Thread Bartosz Golaszewski
On Tue, Apr 8, 2025 at 9:42 AM Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > struct gpio_chip now has callbacks for setting line values that return > an integer, allowing to indicate failures. Convert the driver to using > them. > > Signed-off

[PATCH] fbdev: via: use new GPIO line value setter callbacks

2025-04-08 Thread Bartosz Golaszewski
From: Bartosz Golaszewski struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski --- Commit 98ce1eb1fd87e ("gpiolib: introduce gpio_chip setters that return v

Re: [PATCH v2 0/2] gpiolib: Make code more robust by using for_each_if()

2025-02-17 Thread Bartosz Golaszewski
From: Bartosz Golaszewski On Thu, 13 Feb 2025 20:23:59 +0200, Andy Shevchenko wrote: > Instead of opencoding with long lines, use for_each_if() macro > which makes intention clearer and less error prone. > > In v2: > - moved original for_each_if() implementation to the glob

Re: [PATCH v2 1/2] drm: Move for_each_if() to util_macros.h for wider use

2025-02-13 Thread Bartosz Golaszewski
On Thu, Feb 13, 2025 at 7:25 PM Andy Shevchenko wrote: > > Other subsystem(s) may want to reuse the for_each_if() macro. > Move it to util_macros.h to make it globally available. > > Suggested-by: Bartosz Golaszewski > Signed-off-by: Andy Shevchenko > --- Reviewed-by: Bart

Re: [PATCH v3 3/7] dt-bindings: gpio: brcmstb: permit gpio-line-names property

2024-12-20 Thread Bartosz Golaszewski
On Fri, Dec 20, 2024 at 2:02 PM Dave Stevenson wrote: > > Hi Linus > > On Fri, 20 Dec 2024 at 12:50, Linus Walleij wrote: > > > > On Thu, Dec 12, 2024 at 7:36 PM Dave Stevenson > > wrote: > > > > > gpio-line-names is a generic property that can be supported by any > > > GPIO controller, so permi

Re: (subset) [PATCH v3 0/7] drm/vc4: Fixup DT and DT binding issues from recent patchset

2024-12-16 Thread Bartosz Golaszewski
From: Bartosz Golaszewski On Thu, 12 Dec 2024 18:36:27 +, Dave Stevenson wrote: > I missed the DT errors from the recent patchset[1] (DT patches > in linux-next via Florian, DRM bindings patches on dri-misc-next) > as Rob's bot report got spam filtered, so this is a fixup set

Re: [PATCH v4 08/11] gpio: sim: Remove gpio_sim_dev_match_fwnode()

2024-12-11 Thread Bartosz Golaszewski
On Wed, Dec 11, 2024 at 1:10 AM Zijun Hu wrote: > > From: Zijun Hu > > gpio_sim_dev_match_fwnode() is a simple wrapper of API > device_match_fwnode(). > > Remove the needless wrapper and use the API instead. > > Signed-off-by: Zijun Hu > --- Acked-by: Bartosz Golaszewski

Re: [PATCH v3 08/11] gpio: sim: Remove gpio_sim_dev_match_fwnode()

2024-12-05 Thread Bartosz Golaszewski
On Thu, Dec 5, 2024 at 1:15 AM Zijun Hu wrote: > > From: Zijun Hu > > gpio_sim_dev_match_fwnode() is a simple wrapper of device_match_fwnode() > Remvoe the unnecessary wrapper. > > Signed-off-by: Zijun Hu > --- > drivers/gpio/gpio-sim.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions

[PATCH] fbdev: da8xx: remove the driver

2024-10-14 Thread Bartosz Golaszewski
From: Bartosz Golaszewski This driver is no longer used on any platform. It has been replaced by tilcdc on the two DaVinci boards we still support and can be removed. Signed-off-by: Bartosz Golaszewski --- drivers/video/fbdev/Kconfig| 13 - drivers/video/fbdev/Makefile |1

Re: [PATCH] fbdev/da8xx-fb: unlock on error paths in suspend/resume

2024-10-14 Thread Bartosz Golaszewski
On Mon, Oct 14, 2024 at 9:06 AM Bartosz Golaszewski wrote: > > On Fri, Oct 11, 2024 at 9:42 PM Dan Carpenter > wrote: > > > > Add a missing console_unlock() in the suspend and resume functions on > > the error paths. > > > > Fixes: 611097d5daea (&qu

Re: [PATCH] fbdev/da8xx-fb: unlock on error paths in suspend/resume

2024-10-14 Thread Bartosz Golaszewski
ret = regulator_enable(par->lcd_supply); > - if (ret) > + if (ret) { > + console_unlock(); > return ret; > + } > } > } > > -- > 2.45.2 > Reviewed-by: Bartosz Golaszewski

Re: [PATCH 1/2] dt-bindings: misc: qcom, fastrpc: document new domain ID

2024-08-16 Thread Bartosz Golaszewski
On Fri, Aug 16, 2024 at 1:21 PM Krzysztof Kozlowski wrote: > > On 16/08/2024 12:23, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Add "cdsp1" as the new supported label for the CDSP1 fastrpc domain. > > > > Signed-off-by: B

[PATCH 1/2] dt-bindings: misc: qcom,fastrpc: document new domain ID

2024-08-16 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add "cdsp1" as the new supported label for the CDSP1 fastrpc domain. Signed-off-by: Bartosz Golaszewski --- Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings

[PATCH 2/2] arm64: dts: qcom: sa8775p: fix the fastrpc label

2024-08-16 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The fastrpc driver uses the label to determine the domain ID and create the device nodes. It should be "cdsp1" as this is the engine we use here. Fixes: df54dcb34ff2 ("arm64: dts: qcom: sa8775p: add ADSP, CDSP and GPDSP nodes") Reported-by: Ekansh

[PATCH v4 6/6] arm64: dts: qcom: sa8775p-ride: enable remoteprocs

2024-08-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Enable all remoteproc nodes on the sa8775p-ride board and point to the appropriate firmware files. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 25 + 1 file changed, 25

[PATCH v4 4/6] misc: fastrpc: Add support for cdsp1 remoteproc

2024-08-05 Thread Bartosz Golaszewski
From: Ling Xu The fastrpc supports 4 remoteproc. There are some products which support cdsp1 remoteproc. Add changes to support cdsp1 remoteproc. Signed-off-by: Ling Xu [Bartosz: ported to mainline] Signed-off-by: Bartosz Golaszewski --- drivers/misc/fastrpc.c | 10 ++ 1 file changed

[PATCH v4 2/6] dt-bindings: mailbox: qcom-ipcc: Add GPDSP0 and GPDSP1 clients

2024-08-05 Thread Bartosz Golaszewski
From: Tengfei Fan Add GPDSP0 and GPDSP1 clients for SA8775p platform. Signed-off-by: Tengfei Fan Acked-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski --- include/dt-bindings/mailbox/qcom-ipcc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-bindings/mailbox

[PATCH v4 5/6] arm64: dts: qcom: sa8775p: add ADSP, CDSP and GPDSP nodes

2024-08-05 Thread Bartosz Golaszewski
: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 548 ++ 1 file changed, 548 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi index ad8e567575e5..50ec4712e39f

[PATCH v4 3/6] remoteproc: qcom_q6v5_pas: Add support for SA8775p ADSP, CDSP and GPDSP

2024-08-05 Thread Bartosz Golaszewski
From: Tengfei Fan Add support for PIL loading on ADSP, CDSP0, CDSP1, GPDSP0 and GPDSP1 on SA8775p SoCs. Signed-off-by: Tengfei Fan Co-developed-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski --- drivers/remoteproc/qcom_q6v5_pas.c | 92 ++ 1

[PATCH v4 1/6] dt-bindings: misc: qcom,fastrpc: increase the max number of iommus

2024-08-05 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The fastrpc components on the SA8775P SoC can require up to 10 IOMMU entries. Bump the maxItems. Signed-off-by: Bartosz Golaszewski --- Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v4 0/6] arm64: qcom: sa8775p: enable remoteprocs - ADSP, CDSP and GPDSP

2024-08-05 Thread Bartosz Golaszewski
-...@vger.kernel.org Cc: linux-remotep...@vger.kernel.org Cc: devicet...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-off-by: Bartosz Golaszewski Changes in v4: - add the fastrpc nodes and relevant driver and DT bindings changes - Link to v3: https://lore.kernel.org/r/20240605-topic-sa8775p

Re: [PATCH 09/22] gpio: virtio: drop owner assignment

2024-03-29 Thread Bartosz Golaszewski
On Fri, Mar 29, 2024 at 12:35 PM Krzysztof Kozlowski wrote: > > On 29/03/2024 11:27, Bartosz Golaszewski wrote: > > On Wed, Mar 27, 2024 at 1:45 PM Krzysztof Kozlowski > > wrote: > >> > >> virtio core already sets the .owner, so driver does not need to

Re: [PATCH 09/22] gpio: virtio: drop owner assignment

2024-03-29 Thread Bartosz Golaszewski
On Wed, Mar 27, 2024 at 1:45 PM Krzysztof Kozlowski wrote: > > virtio core already sets the .owner, so driver does not need to. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Depends on the first patch. > --- > drivers/gpio/gpio-virtio.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH 1/2] devm-helpers: Add resource managed version of mutex init

2024-02-22 Thread Bartosz Golaszewski
adding managed version of mutex initialization. > > Use the new function devm_mutex_init() in the following drivers: > drivers/gpio/gpio-pisosr.c > drivers/gpio/gpio-sim.c Yes, please! For GPIO part: Acked-by: Bartosz Golaszewski

Re: [PATCH v4] backlight: gpio_backlight: Drop output GPIO direction check for initial power state

2023-07-21 Thread Bartosz Golaszewski
gpiod_get_value_cansleep(gbl->gpiod) == 0) > + else if (gpiod_get_value_cansleep(gbl->gpiod) == 0) > bl->props.power = FB_BLANK_POWERDOWN; > else > bl->props.power = FB_BLANK_UNBLANK; > -- > 2.37.1 > Acked-by: Bartosz Golaszewski

Re: [PATCH] backlight: gpio_backlight: Drop output gpio direction check for initial power state

2023-07-20 Thread Bartosz Golaszewski
On Thu, Jul 20, 2023 at 3:10 PM Daniel Thompson wrote: > > On Thu, Jul 20, 2023 at 02:56:32PM +0200, Bartosz Golaszewski wrote: > > On Thu, Jul 20, 2023 at 1:27 PM Daniel Thompson > > wrote: > > > > > > On Thu, Jul 20, 2023 at 06:06:27AM +, Ying Liu wrot

Re: [PATCH] backlight: gpio_backlight: Drop output gpio direction check for initial power state

2023-07-20 Thread Bartosz Golaszewski
On Thu, Jul 20, 2023 at 1:27 PM Daniel Thompson wrote: > > On Thu, Jul 20, 2023 at 06:06:27AM +, Ying Liu wrote: > > Bootloader may leave gpio direction as input and gpio value as logical low. > > It hints that initial backlight power state should be FB_BLANK_POWERDOWN > > since the gpio value

Re: [PATCH] dt-bindings: Fix SPI and I2C bus node names in examples

2023-03-06 Thread Bartosz Golaszewski
lay/panel/nec,nl8048hl11.yaml| 2 +- > .../bindings/display/solomon,ssd1307fb.yaml | 4 ++-- > .../devicetree/bindings/eeprom/at25.yaml | 2 +- > .../bindings/extcon/extcon-usbc-cros-ec.yaml | 2 +- > .../bindings/extcon/extcon-usbc-tusb320.yaml | 2 +- > .../devicetree/bindings/gpio/gpio-pca9570.yaml| 2 +- > .../devicetree/bindings/gpio/gpio-pca95xx.yaml| 8 Acked-by: Bartosz Golaszewski

Re: [PATCH] dt-bindings: Add missing (unevaluated|additional)Properties on child node schemas

2023-01-25 Thread Bartosz Golaszewski
ers,axp209-gpio.yaml > @@ -35,6 +35,7 @@ properties: > patternProperties: >"^.*-pins?$": > $ref: /schemas/pinctrl/pinmux-node.yaml# > + additionalProperties: false > > properties: >pins: Acked-by: Bartosz Golaszewski [...]

Re: [PATCH] dt-bindings: Fix properties without any type

2022-05-22 Thread Bartosz Golaszewski
/bindings/serial/8250.yaml| 1 + > .../devicetree/bindings/sound/audio-graph-card2.yaml | 3 +++ > .../devicetree/bindings/sound/imx-audio-hdmi.yaml | 3 +++ > Documentation/devicetree/bindings/usb/smsc,usb3503.yaml | 1 + > 25 files changed, 55 insertions(+), 8 deletions(-) > For GPIO: Acked-by: Bartosz Golaszewski

Re: [PATCH] dt-bindings: Add missing array size constraints

2021-01-06 Thread Bartosz Golaszewski
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml > @@ -81,6 +81,7 @@ properties: > const: 2 > >reset-gpios: > +maxItems: 1 > description: >GPIO specification for the RESET input. This is an active low signal to >

[PATCH v3 6/9] edac: ghes: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Borislav Petkov --- drivers/edac/ghes_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v3 8/9] hwtracing: intel: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v3 7/9] drm: atomic: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Vetter --- drivers/gpu/drm/drm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v3 5/9] pinctrl: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 9/9] dma-buf: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Christian König --- drivers/dma-buf/sync_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v3 4/9] vhost: vringh: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Michael S. Tsirkin --- drivers/vhost/vringh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v3 2/9] mm: slab: provide krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski When allocating an array of elements, users should check for multiplication overflow or preferably use one of the provided helpers like: kmalloc_array(). There's no krealloc_array() counterpart but there are many users who use regular krealloc() to reallocate a

[PATCH v3 3/9] ALSA: pcm: use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Takashi Iwai --- sound/core/pcm_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 1/9] mm: slab: clarify krealloc()'s behavior with __GFP_ZERO

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski __GFP_ZERO is ignored by krealloc() (unless we fall-back to kmalloc() path, in which case it's honored). Point that out in the kerneldoc. Signed-off-by: Bartosz Golaszewski --- mm/slab_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --

[PATCH v3 0/9] slab: provide and use krealloc_array()

2020-11-10 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Andy brought to my attention the fact that users allocating an array of equally sized elements should check if the size multiplication doesn't overflow. This is why we have helpers like kmalloc_array(). However we don't have krealloc_array() equivalent and

Re: [PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-04 Thread Bartosz Golaszewski
On Tue, Nov 3, 2020 at 5:14 AM Joe Perches wrote: > > On Mon, 2020-11-02 at 16:20 +0100, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Andy brought to my attention the fact that users allocating an array of > > equally sized elements should ch

Re: [PATCH v2 1/8] mm: slab: provide krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
On Mon, Nov 2, 2020 at 4:41 PM Matthew Wilcox wrote: > > On Mon, Nov 02, 2020 at 04:20:30PM +0100, Bartosz Golaszewski wrote: > > +Chunks allocated with `kmalloc` can be resized with `krealloc`. Similarly > > +to `kmalloc_array`: a helper for resising arrays is provi

[PATCH v2 6/8] drm: atomic: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Vetter --- drivers/gpu/drm/drm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v2 8/8] dma-buf: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Christian König --- drivers/dma-buf/sync_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v2 2/8] ALSA: pcm: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Takashi Iwai --- sound/core/pcm_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 4/8] pinctrl: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/pinctrl/pinctrl-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 0/8] slab: provide and use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Andy brought to my attention the fact that users allocating an array of equally sized elements should check if the size multiplication doesn't overflow. This is why we have helpers like kmalloc_array(). However we don't have krealloc_array() equivalent and

[PATCH v2 7/8] hwtracing: intel: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 5/8] edac: ghes: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Borislav Petkov --- drivers/edac/ghes_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v2 1/8] mm: slab: provide krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski When allocating an array of elements, users should check for multiplication overflow or preferably use one of the provided helpers like: kmalloc_array(). There's no krealloc_array() counterpart but there are many users who use regular krealloc() to reallocate a

[PATCH v2 3/8] vhost: vringh: use krealloc_array()

2020-11-03 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski Acked-by: Michael S. Tsirkin --- drivers/vhost/vringh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 2/8] ALSA: pcm: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- sound/core/pcm_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/core/pcm_lib.c b

[PATCH 0/8] slab: provide and use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Andy brought to my attention the fact that users allocating an array of equally sized elements should check if the size multiplication doesn't overflow. This is why we have helpers like kmalloc_array(). However we don't have krealloc_array() equivalent and

Re: [PATCH 3/8] vhost: vringh: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
On Tue, Oct 27, 2020 at 6:08 PM Joe Perches wrote: > > On Tue, 2020-10-27 at 17:58 +0100, Bartosz Golaszewski wrote: > > On Tue, Oct 27, 2020 at 5:50 PM Joe Perches wrote: > > > > > > On Tue, 2020-10-27 at 11:28 -0400, Michael S. Tsirkin wrote: > > > >

[PATCH 1/8] mm: slab: provide krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski When allocating an array of elements, users should check for multiplication overflow or preferably use one of the provided helpers like: kmalloc_array(). There's no krealloc_array() counterpart but there are many users who use regular krealloc() to reallocate a

[PATCH 8/8] dma-buf: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/dma-buf/sync_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma-buf

[PATCH 5/8] edac: ghes: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/edac/ghes_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac

[PATCH 7/8] hwtracing: intel: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/hwtracing/intel_th/msu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 4/8] pinctrl: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/pinctrl/pinctrl-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl

Re: [PATCH 3/8] vhost: vringh: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
On Tue, Oct 27, 2020 at 5:50 PM Joe Perches wrote: > > On Tue, 2020-10-27 at 11:28 -0400, Michael S. Tsirkin wrote: > > On Tue, Oct 27, 2020 at 01:17:20PM +0100, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > > > Use the helper that che

[PATCH 3/8] vhost: vringh: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/vhost/vringh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vringh.c b

[PATCH 6/8] drm: atomic: use krealloc_array()

2020-10-28 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Use the helper that checks for overflows internally instead of manually calculating the size of the new array. Signed-off-by: Bartosz Golaszewski --- drivers/gpu/drm/drm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

Re: [PATCH] backlight: pwm_bl: Switch to full GPIO descriptor

2019-12-06 Thread Bartosz Golaszewski
t; and things should work smoothly with the new API. > > Cc: Krzysztof Kozlowski > Cc: Robert Jarzmik > Cc: Guan Xuetao > Cc: Bartosz Golaszewski > Signed-off-by: Linus Walleij > --- > arch/arm/mach-pxa/cm-x300.c | 1 - > arch/arm/mach-pxa/colibri-pxa270-i

Re: [PATCH v7 0/9] backlight: gpio: simplify the driver

2019-11-10 Thread Bartosz Golaszewski
pon., 4 lis 2019 o 10:22 Bartosz Golaszewski napisał(a): > > pt., 1 lis 2019 o 16:39 Jacopo Mondi napisał(a): > > > > Hello, > > as promised... > > > > On Fri, Nov 01, 2019 at 08:58:03AM +, Lee Jones wrote: > > > On Thu, 24 Oct

Re: [PATCH v7 0/9] backlight: gpio: simplify the driver

2019-11-04 Thread Bartosz Golaszewski
47:26AM +0100, Lee Jones wrote: > > > > On Wed, 23 Oct 2019, Daniel Thompson wrote: > > > > > > > > > On Tue, Oct 22, 2019 at 11:29:54AM +0200, Bartosz Golaszewski wrote: > > > > > > wt., 22 paź 2019 o 10:36 Bartosz Golaszewski > > &g

[PATCH v7 9/9] backlight: gpio: pull gpio_backlight_initial_power_state() into probe

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The probe function in the gpio-backlight driver is quite short. If we pull gpio_backlight_initial_power_state() into probe we can drop two more fields from struct gpio_backlight and shrink the driver code. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Thompson

dri-devel@lists.freedesktop.org

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c

[PATCH v7 7/9] backlight: gpio: remove unused fields from platform data

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v7 2/9] backlight: gpio: remove stray newline

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove a double newline from the driver. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Daniel Thompson --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/backlight

[PATCH v7 3/9] backlight: gpio: explicitly set the direction of the GPIO

2019-10-23 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The GPIO backlight driver currently requests the line 'as is', without acively setting its direction. This can lead to problems: if the line is in input mode by default, we won't be able to drive it later when updating the status and also reading it

Re: [PATCH v7 0/9] backlight: gpio: simplify the driver

2019-10-22 Thread Bartosz Golaszewski
wt., 22 paź 2019 o 10:36 Bartosz Golaszewski napisał(a): > > From: Bartosz Golaszewski > > While working on my other series related to gpio-backlight[1] I noticed > that we could simplify the driver if we made the only user of platform > data use GPIO lookups and device prope

[PATCH v7 0/9] backlight: gpio: simplify the driver

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. First two patches contain minor fixes. Third patch

[PATCH v7 5/9] backlight: gpio: simplify the platform data handling

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

[PATCH v7 1/9] backlight: gpio: remove unneeded include

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We no longer use any symbols from of_gpio.h. Remove this include. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion

[PATCH v7 6/9] sh: ecovec24: don't set unused fields in platform data

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions

[PATCH v7 4/9] sh: ecovec24: add additional properties to the backlight device

2019-10-22 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

Re: [PATCH v6 3/9] backlight: gpio: explicitly set the direction of the GPIO

2019-10-21 Thread Bartosz Golaszewski
pon., 21 paź 2019 o 12:45 Daniel Thompson napisał(a): > > On Sat, Oct 19, 2019 at 10:35:50AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > The GPIO backlight driver currently requests the line 'as is', without > > acively setting

[PATCH v6 4/9] sh: ecovec24: add additional properties to the backlight device

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

[PATCH v6 3/9] backlight: gpio: explicitly set the direction of the GPIO

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The GPIO backlight driver currently requests the line 'as is', without acively setting its direction. This can lead to problems: if the line is in input mode by default, we won't be able to drive it later when updating the status and also reading it

[PATCH v6 0/9] backlight: gpio: simplify the driver

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. First two patches contain minor fixes. Third patch

[PATCH v6 2/9] backlight: gpio: remove stray newline

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove a double newline from the driver. Signed-off-by: Bartosz Golaszewski --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index

[PATCH v6 1/9] backlight: gpio: remove unneeded include

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski We no longer use any symbols from of_gpio.h. Remove this include. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c | 1 - 1 file changed, 1 deletion

[PATCH v6 9/9] backlight: gpio: pull gpio_backlight_initial_power_state() into probe

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The probe function in the gpio-backlight driver is quite short. If we pull gpio_backlight_initial_power_state() into probe we can drop two more fields from struct gpio_backlight and shrink the driver code. Signed-off-by: Bartosz Golaszewski Acked-by: Daniel Thompson

[PATCH v6 7/9] backlight: gpio: remove unused fields from platform data

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v6 6/9] sh: ecovec24: don't set unused fields in platform data

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions

[PATCH v6 5/9] backlight: gpio: simplify the platform data handling

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

dri-devel@lists.freedesktop.org

2019-10-19 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c

Re: [PATCH v5 0/7] backlight: gpio: simplify the driver

2019-10-18 Thread Bartosz Golaszewski
pt., 18 paź 2019 o 17:02 Jacopo Mondi napisał(a): > > Hi, > > On Thu, Oct 17, 2019 at 08:25:50AM +0100, Lee Jones wrote: > > On Wed, 16 Oct 2019, Jacopo Mondi wrote: > > > > > Hi, sorry for not having replied earlier > > > > > > On Wed, Oct 16, 2019 at 02:56:57PM +0200, Linus Walleij wrote: > > >

Re: [PATCH v5 0/7] backlight: gpio: simplify the driver

2019-10-14 Thread Bartosz Golaszewski
pon., 14 paź 2019 o 10:12 Lee Jones napisał(a): > > On Mon, 07 Oct 2019, Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > While working on my other series related to gpio-backlight[1] I noticed > > that we could simplify the driver if we made t

[PATCH v5 7/7] backlight: gpio: pull gpio_backlight_initial_power_state() into probe

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski The probe function in the gpio-backlight driver is quite short. If we pull gpio_backlight_initial_power_state() into probe we can drop two more fields from struct gpio_backlight and shrink the driver code. Signed-off-by: Bartosz Golaszewski --- drivers/video

[PATCH v5 3/7] backlight: gpio: simplify the platform data handling

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that the last user of platform data (sh ecovec24) defines a proper GPIO lookup and sets the 'default-on' device property, we can drop the platform_data-specific GPIO handling and unify a big chunk of code. The only field used from the platform data is now

[PATCH v5 4/7] sh: ecovec24: don't set unused fields in platform data

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Platform data fields other than fbdev are no longer used by the backlight driver. Remove them. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij --- arch/sh/boards/mach-ecovec24/setup.c | 3 --- 1 file changed, 3 deletions

[PATCH v5 5/7] backlight: gpio: remove unused fields from platform data

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Remove the platform data fields that nobody uses. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson --- include/linux/platform_data/gpio_backlight.h | 3 --- 1 file changed, 3 deletions(-) diff

dri-devel@lists.freedesktop.org

2019-10-07 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Instead of dereferencing pdev each time, use a helper variable for the associated device pointer. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- drivers/video/backlight/gpio_backlight.c

[PATCH v5 2/7] sh: ecovec24: add additional properties to the backlight device

2019-10-06 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Add a GPIO lookup entry and a device property for GPIO backlight to the board file. Tie them to the platform device which is now registered using platform_device_register_full() because of the properties. These changes are inactive now but will be used once the gpio

[PATCH v5 0/7] backlight: gpio: simplify the driver

2019-10-06 Thread Bartosz Golaszewski
From: Bartosz Golaszewski While working on my other series related to gpio-backlight[1] I noticed that we could simplify the driver if we made the only user of platform data use GPIO lookups and device properties. This series tries to do that. The first patch adds all necessary data structures

  1   2   3   4   >