Re: [PATCH 01/12] drm/i915: Indicate which pipe failed the fastset check overall

2024-02-28 Thread Rasmus Villemoes
On 27/02/2024 19.32, Ville Syrjälä wrote: > On Tue, Feb 27, 2024 at 10:38:10AM +0100, Rasmus Villemoes wrote: >> On 26/02/2024 15.57, Jani Nikula wrote: >> >>> Personally I suck at remembering even the standard printf conversion >>> specifiers, let alone all the ke

Re: [PATCH 01/12] drm/i915: Indicate which pipe failed the fastset check overall

2024-02-27 Thread Rasmus Villemoes
On 26/02/2024 15.57, Jani Nikula wrote: > Personally I suck at remembering even the standard printf conversion > specifiers, let alone all the kernel extensions. I basically have to > look them up every time. I'd really love some %{name} format for named > pointer things. And indeed preferrably

Re: [Intel-gfx] [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-11-04 Thread Rasmus Villemoes
On 24/10/2022 22.11, Gwan-gyeong Mun wrote: > From: Kees Cook > > Implement a robust overflows_type() macro to test if a variable or > constant value would overflow another variable or type. This can be > used as a constant expression for static_assert() (which requires a > constant

Re: [Intel-gfx] [PATCH v10 3/9] compiler_types.h: Add assert_type to catch type mis-match while compiling

2022-09-12 Thread Rasmus Villemoes
On 11/09/2022 13.04, Andi Shyti wrote: > Hi Gwan-gyeong, > > On Fri, Sep 09, 2022 at 07:59:07PM +0900, Gwan-gyeong Mun wrote: >> It adds assert_type and assert_typable macros to catch type mis-match while > > /Add/It adds/, please use the imperative form. > >> compiling. The existing

Re: [Intel-gfx] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-02 Thread Rasmus Villemoes
On 02/03/2022 00.55, Linus Torvalds wrote: > On Tue, Mar 1, 2022 at 3:19 PM David Laight wrote: >> > With the "don't use iterator outside the loop" approach, the exact > same code works in both the old world order and the new world order, > and you don't have the semantic confusion. And *if* you

Re: [Intel-gfx] [PATCH v2] kernel: Expose SYS_kcmp by default

2021-02-05 Thread Rasmus Villemoes
On 05/02/2021 22.06, Chris Wilson wrote: > Userspace has discovered the functionality offered by SYS_kcmp and has > started to depend upon it. In particular, Mesa uses SYS_kcmp for > os_same_file_description() in order to identify when two fd (e.g. device > or dmabuf) point to the same struct

Re: [Intel-gfx] [PATCH v4] string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers

2019-10-24 Thread Rasmus Villemoes
On 24/10/2019 09.40, Rasmus Villemoes wrote: > column. Maybe your compiler doesn't do string literal merging (since the > linker does it anyway), so your .rodata.str1.1 might contain several > copies of "yes" and "no", but they shouldn't really be counted. Sor

Re: [Intel-gfx] [PATCH v4] string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers

2019-10-24 Thread Rasmus Villemoes
On 24/10/2019 00.56, Andrew Morton wrote: > On Wed, 23 Oct 2019 16:13:08 +0300 Jani Nikula wrote: > >> + >> +static inline const char *yesno(bool v) >> +{ >> +return v ? "yes" : "no"; >> +} >> + >> +static inline const char *onoff(bool v) >> +{ >> +return v ? "on" : "off"; >> +} >> + >>

Re: [Intel-gfx] [PATCH v4] string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers

2019-10-23 Thread Rasmus Villemoes
out space savings to make it less fluffy > based on Rasmus' feedback. Thanks, it looks good to me. FWIW, Acked-by: Rasmus Villemoes ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v3] string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers

2019-10-02 Thread Rasmus Villemoes
On 02/10/2019 12.11, Jani Nikula wrote: > On Tue, 01 Oct 2019, Jani Nikula wrote: >> While the main goal here is to abstract recurring patterns, and slightly >> clean up the code base by not open coding the ternary operators, there >> are also some space savings to be had via better string

Re: [PATCH v2] lib/string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers

2019-09-30 Thread Rasmus Villemoes
On 30/09/2019 16.18, Jani Nikula wrote: > The kernel has plenty of ternary operators to choose between constant > strings, such as condition ? "yes" : "no", as well as value == 1 ? "" : > "s": > > > --- > > v2: add string-choice.[ch] to not clutter kernel.h and to actually save > space on

Re: [Intel-gfx] [PATCH] Make is_signed_type() simpler

2019-09-30 Thread Rasmus Villemoes
On 29/09/2019 23.09, Alexey Dobriyan wrote: > On Sun, Sep 29, 2019 at 10:21:48PM +0200, Rasmus Villemoes wrote: >> On 29/09/2019 22.06, Alexey Dobriyan wrote: >>> * Simply compare -1 with 0, >>> * Drop unnecessary parenthesis sets >>> >>> -#define is_si

Re: [PATCH] Make is_signed_type() simpler

2019-09-29 Thread Rasmus Villemoes
On 29/09/2019 22.06, Alexey Dobriyan wrote: > * Simply compare -1 with 0, > * Drop unnecessary parenthesis sets > > -#define is_signed_type(type) (((type)(-1)) < (type)1) > +#define is_signed_type(type) ((type)-1 < 0) NAK. I wrote it that way to avoid -Wtautological-compare when type

Re: [PATCH 1/2] linux/kernel.h: add yesno(), onoff(), enableddisabled(), plural() helpers

2019-09-04 Thread Rasmus Villemoes
On 03/09/2019 15.37, Jani Nikula wrote: > While the main goal here is to abstract recurring patterns, and slightly > clean up the code base by not open coding the ternary operators, there > are also some space savings to be had via better string constant > pooling. Eh, no? The linker does that

[Intel-gfx] [PATCH 0/5] pre-decrement in error paths considered harmful

2016-02-09 Thread Rasmus Villemoes
le background info. Rasmus Villemoes (5): drm/gma500: fix error path in gma_intel_setup_gmbus() drm/i915: fix error path in intel_setup_gmbus() net/mlx4: fix some error handling in mlx4_multi_func_init() net: sxgbe: fix error paths in sxgbe_platform_probe() mm/backing-dev.c: fix error pa

[Intel-gfx] [PATCH 2/5] drm/i915: fix error path in intel_setup_gmbus()

2016-02-09 Thread Rasmus Villemoes
This fails to undo the setup for pin==0; moreover, something interesting happens if the setup failed already at pin==0. Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk> --- drivers/gpu/drm/i915/intel_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[Intel-gfx] [PATCH] drm/i915: Fix comparison bug

2015-09-30 Thread Rasmus Villemoes
an int), but 440fd5283a87 ("drm/mm: Support 4 GiB and larger ranges") strongly suggests that's not the case. Signed-off-by: Rasmus Villemoes <li...@rasmusvillemoes.dk> --- drivers/gpu/drm/i915/i915_debugfs.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git