[PATCH] drm/rockchip: use struct_size() in vop2_bind

2023-02-22 Thread Jacob Keller
Use the overflow-protected struct_size() helper macro to compute the allocation size of the vop2 data structure. Signed-off-by: Jacob Keller Cc: Sandy Huang Cc: Heiko Stübner Cc: David Airlie --- I found this while developing a coccinelle script to detect potential places where struct_size

Re: [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-17 Thread Jacob Keller
On 9/9/2020 1:55 PM, Keith Busch wrote: > On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: >> diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c >> index eea0f453cfb6..8aac5bc60f4c 100644 >> --- a/crypto/tcrypt.c >> +++ b/crypto/tcrypt.c >> @@ -2464,7 +2464,7 @@ static int do_test(const

Re: [PATCH net-next v8 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver

2024-04-09 Thread Jacob Keller
r supports are NOT implemented. > > Besides, the page pool memory model is used to get better performance. > > Signed-off-by: Julien Panis > --- Reviewed-by: Jacob Keller > Changes in v8: > - Fix some warnings reported by patchwork. > - Link to v7: > https://lore.kernel.org/

Re: [PATCH net-next v9 2/3] net: ethernet: ti: Add desc_infos member to struct k3_cppi_desc_pool

2024-04-12 Thread Jacob Keller
gt; - pool = devm_kzalloc(dev, sizeof(*pool), GFP_KERNEL); > + pool = kzalloc(sizeof(*pool), GFP_KERNEL); You could refactor pool to use the new __free cleanup annotations along with return_no_free() to automatically handle cleanup of the pool when the function exits on an error

Re: [PATCH net-next v9 3/3] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-04-12 Thread Jacob Keller
(actually 610 Mbits/sec, with a 5 Mbits/sec > loss due to extra processing in the hot path to handle XDP). > > Signed-off-by: Julien Panis Reviewed-by: Jacob Keller

Re: [PATCH v3 01/16] bitops: Change parity8() return type to bool

2025-03-12 Thread Jacob Keller
On 3/7/2025 11:36 AM, David Laight wrote: > On Fri, 7 Mar 2025 12:42:41 +0100 > Jiri Slaby wrote: > >> On 07. 03. 25, 12:38, Ingo Molnar wrote: >>> >>> * Jiri Slaby wrote: >>> On 06. 03. 25, 17:25, Kuan-Wei Chiu wrote: > Change return type to bool for better clarity. Update the

Re: [PATCH v3 01/16] bitops: Change parity8() return type to bool

2025-03-13 Thread Jacob Keller
On 3/13/2025 9:36 AM, H. Peter Anvin wrote: > On March 13, 2025 9:24:38 AM PDT, Yury Norov wrote: >> On Wed, Mar 12, 2025 at 05:09:16PM -0700, H. Peter Anvin wrote: >>> On March 12, 2025 4:56:31 PM PDT, Jacob Keller >>> wrote: >> >> [...] >>

[PATCH] drm/nouveau/bl: Use kasprintf for interface name

2025-06-04 Thread Jacob Keller
44be47a8f ("drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name()") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312050324.0kv4pnfz-...@intel.com/ Signed-off-by: Jacob Keller --- This could also be fixed by simply increasing BL_

Re: [PATCH] drm/nouveau/bl: Use kasprintf for interface name

2025-06-04 Thread Jacob Keller
On 6/4/2025 3:01 PM, Timur Tabi wrote: > On Wed, 2025-06-04 at 14:03 -0700, Jacob Keller wrote: >> This could also be fixed by simply increasing BL_NAME_SIZE to 24, making it >> large enough to fit any size integer into its format string, or by checking >> the return valu

Re: [PATCH] drm/nouveau/bl: Use kasprintf for interface name

2025-06-04 Thread Jacob Keller
On 6/4/2025 3:40 PM, Timur Tabi wrote: > On Wed, 2025-06-04 at 15:16 -0700, Jacob Keller wrote: >> Fair enough. Another alternative which saves the stack and macro would >> be to add a new version of backlight_register_device which can pass the >> integer number itself i

[PATCH v2] drm/nouveau/bl: increase buffer size to avoid truncate warning

2025-06-10 Thread Jacob Keller
n nouveau_get_backlight_name()") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312050324.0kv4pnfz-...@intel.com/ Suggested-by: Timur Tabi Signed-off-by: Jacob Keller --- Changes in v2: - Just increase the buffer size - Link to v1: https://lore.kernel.