Re: [PATCH v5 0/7] treewide cleanup of random integer usage

2022-10-08 Thread Kees Cook
On Fri, Oct 07, 2022 at 11:53:52PM -0600, Jason A. Donenfeld wrote: > This is a five part treewide cleanup of random integer handling. The > rules for random integers are: Reviewing the delta between of my .cocci rules and your v5, everything matches, except for get_random_int() conversions for

Re: [PATCH v3 3/5] treewide: use get_random_u32() when possible

2022-10-08 Thread Jason A. Donenfeld
On Sat, Oct 08, 2022 at 09:53:33PM +, David Laight wrote: > From: Jason A. Donenfeld > > Sent: 07 October 2022 18:56 > ... > > > Given these kinds of less mechanical changes, it may make sense to split > > > these from the "trivial" conversions in a treewide patch. The chance of > > > needing

[PATCH] drm/imx: Kconfig: Remove duplicated 'select DRM_KMS_HELPER' line

2022-10-08 Thread Liu Ying
A duplicated line 'select DRM_KMS_HELPER' was introduced in Kconfig file by commit 09717af7d13d ("drm: Remove CONFIG_DRM_KMS_CMA_HELPER option"), so remove it. Fixes: 09717af7d13d ("drm: Remove CONFIG_DRM_KMS_CMA_HELPER option") Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/Kconfig | 1 - 1

Re: [PATCH] drm/tve200: Use drm_* variants for logging

2022-10-08 Thread Khalid Masum
On Tue, Oct 4, 2022 at 12:54 AM Linus Walleij wrote: > > On Wed, Sep 28, 2022 at 11:31 AM Khalid Masum > wrote: > > > We have routines like drm_info/warn/err for logging. Use them instead > > of dev_* variants to get drm-formatted log messages. > > > > Signed-off-by: Khalid Masum > > So is

Re: [PATCH v4 4/6] treewide: use get_random_u32() when possible

2022-10-08 Thread Jason A. Donenfeld
On Sat, Oct 8, 2022 at 4:37 PM Jason A. Donenfeld wrote: > > On Sat, Oct 08, 2022 at 10:18:45PM +, David Laight wrote: > > From: Jason A. Donenfeld > > > Sent: 07 October 2022 19:01 > > > > > > The prandom_u32() function has been a deprecated inline wrapper around > > > get_random_u32() for

Re: [PATCH v6 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification

2022-10-08 Thread Dmitry Osipenko
On 9/28/22 22:15, Dmitry Osipenko wrote: > Prepare InfiniBand drivers to the common dynamic dma-buf locking > convention by starting to use the unlocked versions of dma-buf API > functions. > > Acked-by: Christian König > Signed-off-by: Dmitry Osipenko > --- >

Re: [PATCH v4 4/6] treewide: use get_random_u32() when possible

2022-10-08 Thread Jason A. Donenfeld
On Sat, Oct 08, 2022 at 10:18:45PM +, David Laight wrote: > From: Jason A. Donenfeld > > Sent: 07 October 2022 19:01 > > > > The prandom_u32() function has been a deprecated inline wrapper around > > get_random_u32() for several releases now, and compiles down to the > > exact same code.

Re: [PATCH v4 2/6] treewide: use prandom_u32_max() when possible

2022-10-08 Thread Jason A. Donenfeld
On Sat, Oct 08, 2022 at 10:08:03PM +, David Laight wrote: > From: Jason A. Donenfeld > > Sent: 07 October 2022 19:01 > > > > Rather than incurring a division or requesting too many random bytes for > > the given range, use the prandom_u32_max() function, which only takes > > the minimum

RE: [PATCH v4 4/6] treewide: use get_random_u32() when possible

2022-10-08 Thread David Laight
From: Jason A. Donenfeld > Sent: 07 October 2022 19:01 > > The prandom_u32() function has been a deprecated inline wrapper around > get_random_u32() for several releases now, and compiles down to the > exact same code. Replace the deprecated wrapper with a direct call to > the real function. The

RE: [PATCH v4 2/6] treewide: use prandom_u32_max() when possible

2022-10-08 Thread David Laight
From: Jason A. Donenfeld > Sent: 07 October 2022 19:01 > > Rather than incurring a division or requesting too many random bytes for > the given range, use the prandom_u32_max() function, which only takes > the minimum required bytes from the RNG and avoids divisions. > ... > ---

RE: [PATCH v3 3/5] treewide: use get_random_u32() when possible

2022-10-08 Thread David Laight
From: Jason A. Donenfeld > Sent: 07 October 2022 18:56 ... > > Given these kinds of less mechanical changes, it may make sense to split > > these from the "trivial" conversions in a treewide patch. The chance of > > needing a revert from the simple 1:1 conversions is much lower than the > > need

Re: [PATCH v5 0/7] treewide cleanup of random integer usage

2022-10-08 Thread Yury Norov
On Fri, Oct 07, 2022 at 11:53:52PM -0600, Jason A. Donenfeld wrote: > Changes v4->v5: > - Coccinelle is now used for as much mechanical aspects as possible, > with mechanical parts split off from non-mechanical parts. This should > drastically reduce the amount of code that needs to be

Re: [PATCH v4 2/6] treewide: use prandom_u32_max() when possible

2022-10-08 Thread Andy Shevchenko
On Fri, Oct 07, 2022 at 08:50:43PM -0700, Kees Cook wrote: > On October 7, 2022 7:21:28 PM PDT, "Jason A. Donenfeld" > wrote: > >On Fri, Oct 07, 2022 at 03:47:44PM -0700, Kees Cook wrote: > >> On Fri, Oct 07, 2022 at 12:01:03PM -0600, Jason A. Donenfeld wrote: ... > >> These are more fun, but

Re: [DNM RFC PATCH] drm/msm: Use lowercase hex for !defines

2022-10-08 Thread Konrad Dybcio
On 8.10.2022 19:43, Konrad Dybcio wrote: > drm/msm capitalizes hex numbers rather randomly. Try to unify it. > > Generated with: > > grep -rEl "\s0x\w*[A-Z]+*\w*" drivers/gpu/drm/msm | \ > xargs sed -i '/define/! s/\s0x\w*[A-Z]+*\w*/\L&/g' > --- > I could not find any strict hex

[DNM RFC PATCH] drm/msm: Use lowercase hex for !defines

2022-10-08 Thread Konrad Dybcio
drm/msm capitalizes hex numbers rather randomly. Try to unify it. Generated with: grep -rEl "\s0x\w*[A-Z]+*\w*" drivers/gpu/drm/msm | \ xargs sed -i '/define/! s/\s0x\w*[A-Z]+*\w*/\L&/g' --- I could not find any strict hex capitalization rules for Linux, so I'm sending this very loosely, without

Re: [PATCH v5 0/7] treewide cleanup of random integer usage

2022-10-08 Thread Greg Kroah-Hartman
On Fri, Oct 07, 2022 at 11:53:52PM -0600, Jason A. Donenfeld wrote: > Changes v4->v5: > - Coccinelle is now used for as much mechanical aspects as possible, > with mechanical parts split off from non-mechanical parts. This should > drastically reduce the amount of code that needs to be

[PATCH v3 2/2] drivers: gpu: drm: remove support for sofef00 driver on s6e3fc2x01 panel

2022-10-08 Thread Nia Espera
Removes functionality from sofef00 panel driver which allowed it to drive the s6e3fc2x01 panel Signed-off-by: Nia Espera Reviewed-by: Caleb Connolly --- drivers/gpu/drm/panel/Kconfig | 6 +++--- drivers/gpu/drm/panel/panel-samsung-sofef00.c | 18 -- 2 files

[PATCH v3 1/2] drivers: gpu: drm: add driver for samsung s6e3fc2x01 cmd mode panel

2022-10-08 Thread Nia Espera
Adds a dedicated driver for the Samsung s6e3fc2x01 panel used in OnePlus 6T smartphones which was previously driven by the sofef00 panel driver Signed-off-by: Nia Espera Reviewed-by: Caleb Connolly --- MAINTAINERS | 5 + drivers/gpu/drm/panel/Kconfig

[PATCH v3 0/2] Samsung s6e3fc2x01 panel driver for OnePlus 6T

2022-10-08 Thread Nia Espera
This patch series adds proper support for the panel used in OnePlus 6T smartphones (s6e3fc2x01). Previously, the panel relied on the driver used by the sofef00 panel which failed to properly initialise it after a reset. Nia Espera (2): drivers: gpu: drm: add driver for samsung s6e3fc2x01 cmd

Re: [PATCH] video: fbdev: mb862xx: Replace NO_IRQ by 0

2022-10-08 Thread Helge Deller
On 10/6/22 07:33, Christophe Leroy wrote: NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by:

Re: [PATCH -next] video: fbdev: add missing MODULE_DEVICE_TABLE

2022-10-08 Thread Helge Deller
On 9/28/22 17:17, Zeng Heng wrote: This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Signed-off-by: Zeng Heng applied. Thanks! Helge drivers/video/fbdev/vga16fb.c | 1 +

Re: [PATCH] drm/i915/perf: remove redundant variable 'taken'

2022-10-08 Thread Christophe JAILLET
Le 07/10/2022 à 21:53, Colin Ian King a écrit : The assignment to variable taken is redundant and so it can be removed as well as the variable too. Cleans up clang-scan build warnings: warning: Although the value stored to 'taken' is used in the enclosing expression, the value is never actually

Difference GART/GTT and related questions

2022-10-08 Thread Peter Maucher
Hi dri-devel, what is the difference between GTT and GART for AMD GPUs? From what I gathered when looking through the mailing list archives and the freedesktop docs [1] as well as wikipedia [2], these terms seem to be synonymous, but that can not be the whole truth (different sizes in dmesg

Re: [PATCH v4 2/6] treewide: use prandom_u32_max() when possible

2022-10-08 Thread Julia Lawall
> >> @minus_one@ > >> expression FULL; > >> @@ > >> > >> - (get_random_int() & ((FULL) - 1) > >> + prandom_u32_max(FULL) > > > >Ahh, well, okay, this is the example I mentioned above. Only works if > >FULL is saturated. Any clever way to get coccinelle to prove that? Can > >it look at the value of