Re: Re: Re: [PATCH v2] treewide: const qualify ctl_tables where applicable

2025-01-27 Thread Jani Nikula
able. >> >> Global data structures marked 'const' will be moved into an ELF >> section that is typically mapped read-only in its entirely, and so the >> data cannot be modified by writing to it directly. No such protection >> is possible for the stack, and so the constness there is only enforced >> at compile time. > I completely agree with you. No reason to use const within those > functions. But why define those ctl_tables in function to begin with. > Can't you just use the ones that are defined outside the functions? You could have static const within functions too. You get the rodata protection and function local scope, best of both worlds? BR, Jani. -- Jani Nikula, Intel

Re: [PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Jani Nikula
&i915_perf_stream_paranoid, For i915, Acked-by: Jani Nikula -- Jani Nikula, Intel

Re: [PATCH v2 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE

2024-12-12 Thread Jani Nikula
In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over. If kconfig warned about selecting symbols with dependencies it would be painful for a while but eventually I think life would be easier. BR, Jani. -- Jani Nikula, Intel

Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()

2024-06-04 Thread Jani Nikula
_match_string() isn't a great argument alone, because this adds three times the number of __match_string() calls than there are __sysfs_match_string() calls. It's not a good model to follow. Arguably both should be renamed. BR, Jani. -- Jani Nikula, Intel

Re: [Intel-gfx] [PATCH v5 0/7] Introduce __xchg, non-atomic xchg

2024-04-05 Thread Jani Nikula
ke it I will be happy. > > OK, I'll go queue it in tip/locking/core after -rc1. Thanks! Is this where the series fell between the cracks, or was there some follow-up that I missed? I think this would still be useful. Andrzej, would you mind rebasing and resending if there are no objections? BR, Jani. -- Jani Nikula, Intel

Re: [PATCH v2 3/3] arch/powerpc: Remove from backlight code

2024-03-05 Thread Jani Nikula
o functional changes. *are Reviewed-by: Jani Nikula > > Signed-off-by: Thomas Zimmermann > --- > arch/powerpc/include/asm/backlight.h| 5 ++-- > arch/powerpc/platforms/powermac/backlight.c | 26 - > 2 files changed, 2 insertions(+), 29 deletions(-)

Re: [PATCH v2 2/3] macintosh/via-pmu-backlight: Include

2024-03-05 Thread Jani Nikula
; Closes: > https://lore.kernel.org/dri-devel/ca+g9fysak5tbqqxfc2w4ohlga0cbthmxbeq8qayfxtu75yi...@mail.gmail.com/ > Signed-off-by: Thomas Zimmermann > Fixes: 11b4eedfc87d ("fbdev: Do not include in header") > Cc: Thomas Zimmermann > Cc: Jani Nikula > Cc: Helge Deller

Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h

2024-03-05 Thread Jani Nikula
On Tue, 05 Mar 2024, Michael Ellerman wrote: > I prefer Thomas' patch, but I'm fine with either to go in via drm. Thanks! -- Jani Nikula, Intel

Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h

2024-03-04 Thread Jani Nikula
On Mon, 04 Mar 2024, Jani Nikula wrote: > Removal of the backlight include from fb.h uncovered an implicit > dependency in powerpc asm/backlight.h. Add the explicit include. > > Reported-by: Naresh Kamboju > Closes: > https://lore.kernel.org/r/ca+g9fysak5tbqqxfc2w4ohlga0cbt

[PATCH] powerpc: include linux/backlight.h from asm/backlight.h

2024-03-04 Thread Jani Nikula
o not include in header") Cc: Thomas Zimmermann Cc: Helge Deller Cc: linux-fb...@vger.kernel.org Signed-off-by: Jani Nikula --- Not even compile tested! --- arch/powerpc/include/asm/backlight.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/asm/backlight.h b/ar

Re: [PATCH v2 2/4] eventfd: simplify eventfd_signal()

2023-11-22 Thread Jani Nikula
nal(struct eventfd_ctx *ctx) > { > - return eventfd_signal_mask(ctx, n, 0); > + return eventfd_signal_mask(ctx, 1, 0); > } > EXPORT_SYMBOL_GPL(eventfd_signal); > -- Jani Nikula, Intel

Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-21 Thread Jani Nikula
On Wed, 21 Jun 2023, Joel Granados wrote: > On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: >> On Wed, 21 Jun 2023, Joel Granados wrote: >> > Remove the empty end element from all the arrays that are passed to the >> > register sysctl calls. In some fi

Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays

2023-06-21 Thread Jani Nikula
.mode = 0644, > + .proc_handler = proc_dointvec_minmax, > + .extra1 = SYSCTL_ZERO, > + .extra2 = &oa_sample_rate_hard_limit, > + } > }; The existing indentation is off, but fixing it doesn't really belong in this patch. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center

Re: [PATCH 01/15] video: fbdev: atmel_lcdfb: Rework backlight handling

2023-01-09 Thread Jani Nikula
; if (sinfo->backlight) > return; > > @@ -173,7 +156,6 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo) > sinfo->backlight = bl; > > bl->props.power = FB_BLANK_UNBLANK; > - bl->props.fb_blank = FB_BLANK_UNBLANK; > bl->props.brightness = atmel_bl_get_brightness(bl); > } -- Jani Nikula, Intel Open Source Graphics Center

Re: [PATCH v2 2/8] i915: simplify subdirectory registration with register_sysctl()

2021-11-25 Thread Jani Nikula
On Tue, 23 Nov 2021, Luis Chamberlain wrote: > There is no need to user boiler plate code to specify a set of base > directories we're going to stuff sysctls under. Simplify this by using > register_sysctl() and specifying the directory path directly. \o/ Acked-by: Jani Nikula

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

2020-09-15 Thread Jani Nikula
alse; > - fallthrough; > + break; > case DRM_FORMAT_MOD_LINEAR: > case I915_FORMAT_MOD_X_TILED: > case I915_FORMAT_MOD_Y_TILED: Acked-by: Jani Nikula for merging via whichever tree seems best. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center

Re: [PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

2020-05-29 Thread Jani Nikula
ppears to be using static tables for this. It's far from obvious. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center

Re: [PATCH v2 0/2] Don't generate thousands of new warnings when building docs

2020-04-16 Thread Jani Nikula
, other instance in Documentation/gpu/i915.rst However there is no "layout" label in i915.rst. The one being warned about I can dig into based on the line number, but not the second one. You have to resort to grepping the source. And avoiding duplicate subsection headings in completely

Re: [PATCH v3 2/7] uaccess: Tell user_access_begin() if it's for a write or not

2020-01-23 Thread Jani Nikula
rranted. Nobody needs to know or care it's specifically an unsigned long. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center

Re: [PATCH] fix double ;;s in code

2018-02-20 Thread Jani Nikula
one conflict down the line because it touches the kernel all over the place, then IMO it already wasn't worth it. Merge conflicts are inevitable, but there's no reason to make life harder just to cater for a cleanup patch. It's not that important. Had it been split up, the d

Re: [-next PATCH 0/4] sysfs and DEVICE_ATTR_

2017-12-19 Thread Jani Nikula
On Tue, 19 Dec 2017, Joe Perches wrote: > drivers/gpu/drm/i915/i915_sysfs.c | 12 ++-- For i915, Acked-by: Jani Nikula -- Jani Nikula, Intel Open Source Technology Center

Re: [PATCH] drivers: depend on instead of select BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO

2014-10-29 Thread Jani Nikula
thing. The FOO || FOO=n allows for all options, but forbids it being a module when the option depending on it is built-in. Obviously something that's built-in can't depend on something built as a module. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center _

Re: [PATCH] drivers: depend on instead of select BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO

2014-10-27 Thread Jani Nikula
On Wed, 22 Oct 2014, Tomi Valkeinen wrote: > On 18/10/14 00:13, Jani Nikula wrote: >> Documentation/kbuild/kconfig-language.txt warns to use select with care, >> and in general use select only for non-visible symbols and for symbols >> with no dependencies, because select wil

[PATCH] drivers: depend on instead of select BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO

2014-10-17 Thread Jani Nikula
+lxcqh15vsu_d9wpftlh...@mail.gmail.com Reported-by: Jim Davis Cc: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: Darren Hart Cc: Laurent Pinchart Cc: Benjamin Herrenschmidt Cc: Jens Frederich Cc: Daniel Drake Cc: Jon Nettleton Cc: Jean-Christophe Plagniol-Villard Cc: