[Nouveau] [PATCH v2 06/11] drm/i915: Use str_on_off()

2022-01-26 Thread Lucas De Marchi
Remove the local onoff() implementation and adopt the str_on_off() from linux/string_helpers.h. Signed-off-by: Lucas De Marchi Acked-by: Daniel Vetter Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/g4x_dp.c | 6 -- drivers/gpu/drm/i915/display/intel_display.c |

[Nouveau] [PATCH v2 05/11] drm/i915: Use str_enabled_disabled()

2022-01-26 Thread Lucas De Marchi
Remove the local enableddisabled() implementation and adopt the str_enabled_disabled() from linux/string_helpers.h. Signed-off-by: Lucas De Marchi Acked-by: Daniel Vetter Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_backlight.c | 3 ++-

[Nouveau] [PATCH v2 09/11] drm: Convert open-coded yes/no strings to yesno()

2022-01-26 Thread Lucas De Marchi
linux/string_helpers.h provides a helper to return "yes"/"no" strings. Replace the open coded versions with str_yes_no(). The places were identified with the following semantic patch: @@ expression b; @@ - b ? "yes" : "no" + str_yes_no(b) Then the

[Nouveau] [PATCH v2 11/11] cxgb4: Use str_yes_no()

2022-01-26 Thread Lucas De Marchi
Remove the local yesno() implementation and adopt the str_yes_no() from linux/string_helpers.h. Signed-off-by: Lucas De Marchi --- .../ethernet/chelsio/cxgb4/cxgb4_debugfs.c| 249 ++ 1 file changed, 137 insertions(+), 112 deletions(-) diff --git

[Nouveau] [PATCH v2 01/11] lib/string_helpers: Consolidate string helpers implementation

2022-01-26 Thread Lucas De Marchi
There are a few implementations of string helpers in the tree like yesno() that just returns "yes" or "no" depending on a boolean argument. Those are helpful to output strings to the user or log. In order to consolidate them, prefix all of them str_ prefix to make it clear what they are about and

Re: [Nouveau] [RFC PATCH v3 1/3] drm: introduce fb_modifiers_not_supported flag in mode_config

2022-01-26 Thread Esaki Tomohito
Hello Laurent-san Thank you for your reviews and advices. I'll fix this patch series following your advice. Thanks, Esaki On 2022/01/24 7:50, Laurent Pinchart wrote: Hello Esaki-san, On Fri, Jan 14, 2022 at 07:17:51PM +0900, Tomohito Esaki wrote: If only linear modifier is advertised,

Re: [Nouveau] [PATCH 3/3] drm: Convert open yes/no strings to yesno()

2022-01-26 Thread Lucas De Marchi
On Wed, Jan 19, 2022 at 09:30:47PM +0200, Andy Shevchenko wrote: On Tue, Jan 18, 2022 at 11:24:50PM -0800, Lucas De Marchi wrote: linux/string_helpers.h provides a helper to return "yes"/"no" strings. Replace the open coded versions with yesno(). The places were identified with the following

[Nouveau] [PATCH v2 08/11] drm/gem: Sort includes alphabetically

2022-01-26 Thread Lucas De Marchi
Sort includes alphabetically so it's easier to add/remove includes and know when that is needed. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/drm_gem.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c

Re: [Nouveau] [Intel-gfx] [PATCH v2 09/11] drm: Convert open-coded yes/no strings to yesno()

2022-01-26 Thread Lucas De Marchi
On Wed, Jan 26, 2022 at 12:12:50PM +0200, Andy Shevchenko wrote: On Wed, Jan 26, 2022 at 11:39 AM Lucas De Marchi wrote: linux/string_helpers.h provides a helper to return "yes"/"no" strings. Replace the open coded versions with str_yes_no(). The places were oops, I replaced yesno() here

[Nouveau] [PATCH v2 04/11] drm/i915: Use str_enable_disable()

2022-01-26 Thread Lucas De Marchi
Remove the local enabledisable() implementation and adopt the str_enable_disable() from linux/string_helpers.h. Signed-off-by: Lucas De Marchi Acked-by: Daniel Vetter Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_ddi.c | 4 +++-

[Nouveau] [PATCH v2 10/11] tomoyo: Use str_yes_no()

2022-01-26 Thread Lucas De Marchi
Remove the local yesno() implementation and adopt the str_yes_no() from linux/string_helpers.h. Signed-off-by: Lucas De Marchi Reviewed-by: Sakari Ailus --- security/tomoyo/audit.c | 2 +- security/tomoyo/common.c | 19 +-- security/tomoyo/common.h | 1 - 3 files changed, 6

[Nouveau] [PATCH v2 00/11] lib/string_helpers: Add a few string helpers

2022-01-26 Thread Lucas De Marchi
Add some helpers under lib/string_helpers.h so they can be used throughout the kernel. When I started doing this there were 2 other previous attempts I know of, not counting the iterations each of them had: 1) https://lore.kernel.org/all/20191023131308.9420-1-jani.nik...@intel.com/ 2)

[Nouveau] [PATCH v2 03/11] drm/i915: Use str_yes_no()

2022-01-26 Thread Lucas De Marchi
Remove the local yesno() implementation and adopt the str_yes_no() from linux/string_helpers.h. Signed-off-by: Lucas De Marchi Acked-by: Daniel Vetter Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 23 +++ .../drm/i915/display/intel_display_debugfs.c | 66

[Nouveau] [PATCH v2 02/11] drm/i915: Fix trailing semicolon

2022-01-26 Thread Lucas De Marchi
Remove the trailing semicolon, as correctly warned by checkpatch: -:1189: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon #1189: FILE: drivers/gpu/drm/i915/intel_device_info.c:119: +#define PRINT_FLAG(name) drm_printf(p, "%s: %s\n", #name,

[Nouveau] [PATCH v2 07/11] drm/amd/display: Use str_yes_no()

2022-01-26 Thread Lucas De Marchi
Remove the local yesno() implementation and adopt the str_yes_no() from linux/string_helpers.h. Signed-off-by: Lucas De Marchi --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git

Re: [Nouveau] [PATCH v2 09/11] drm: Convert open-coded yes/no strings to yesno()

2022-01-26 Thread Jani Nikula
On Wed, 26 Jan 2022, Lucas De Marchi wrote: > linux/string_helpers.h provides a helper to return "yes"/"no" strings. > Replace the open coded versions with str_yes_no(). The places were > identified with the following semantic patch: > > @@ > expression b; > @@ > > - b ?

Re: [Nouveau] [PATCH v2 08/11] drm/gem: Sort includes alphabetically

2022-01-26 Thread Jani Nikula
On Wed, 26 Jan 2022, Lucas De Marchi wrote: > Sort includes alphabetically so it's easier to add/remove includes and > know when that is needed. > > Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/drm_gem.c | 20 ++-- > 1 file changed, 10

Re: [Nouveau] [PATCH v2 02/11] drm/i915: Fix trailing semicolon

2022-01-26 Thread Jani Nikula
On Wed, 26 Jan 2022, Lucas De Marchi wrote: > Remove the trailing semicolon, as correctly warned by checkpatch: > > -:1189: WARNING:TRAILING_SEMICOLON: macros should not use a trailing > semicolon > #1189: FILE: drivers/gpu/drm/i915/intel_device_info.c:119: > +#define

Re: [Nouveau] [Intel-gfx] [PATCH v2 09/11] drm: Convert open-coded yes/no strings to yesno()

2022-01-26 Thread Andy Shevchenko
On Wed, Jan 26, 2022 at 02:43:45AM -0800, Lucas De Marchi wrote: > On Wed, Jan 26, 2022 at 12:12:50PM +0200, Andy Shevchenko wrote: > > On Wed, Jan 26, 2022 at 11:39 AM Lucas De Marchi > > wrote: ... > > > 411986 104906176 428652 68a6c drm.ko.old > > > 411986 104906176 428652

Re: [Nouveau] [PATCH v2 00/11] lib/string_helpers: Add a few string helpers

2022-01-26 Thread Andy Shevchenko
On Wed, Jan 26, 2022 at 11:39 AM Lucas De Marchi wrote: > > Add some helpers under lib/string_helpers.h so they can be used > throughout the kernel. When I started doing this there were 2 other > previous attempts I know of, not counting the iterations each of them > had: > > 1)

Re: [Nouveau] [PATCH v2 09/11] drm: Convert open-coded yes/no strings to yesno()

2022-01-26 Thread Andy Shevchenko
On Wed, Jan 26, 2022 at 11:39 AM Lucas De Marchi wrote: > > linux/string_helpers.h provides a helper to return "yes"/"no" strings. > Replace the open coded versions with str_yes_no(). The places were > identified with the following semantic patch: > > @@ > expression b; >