Re: [Nouveau] Off-by-one or bad BIOS image? Apple eMac 800 GeForce 2MX

2022-01-20 Thread Ilia Mirkin
There's a surprisingly long document at https://docs.kernel.org/process/submitting-patches.html But basically make a git commit, make sure the commit message looks like other commit messages in the area (look at "git log drivers/gpu/drm/nouveau" for inspiration). Make sure your Signed-off-by is on

Re: [Nouveau] [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-20 Thread Joe Perches
On Wed, 2022-01-19 at 16:00 -0500, Steven Rostedt wrote: > On Wed, 19 Jan 2022 21:25:08 +0200 > Andy Shevchenko wrote: > > > > I say keep it one line! > > > > > > Reviewed-by: Steven Rostedt (Google) > > > > I believe Sakari strongly follows the 80 rule, which means... > > Checkpatch says "

Re: [Nouveau] Off-by-one or bad BIOS image? Apple eMac 800 GeForce 2MX

2022-01-20 Thread Ilia Mirkin
This stuff is always so confusing. Let's think this through if bios size is 4, and we're trying to read a 4-byte thing starting at address 0, that _ought_ to work, I think. So in my strawman case, bios->size == 4, and size == 4. So we should only error if size > bios->size, not if they're ==. L

Re: [Nouveau] [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-20 Thread David Laight
> > > > +static inline const char *yesno(bool v) { return v ? "yes" : "no"; } > > return "yes\0no" + v * 4; > > :-) except '"no\0\0yes" + v * 4' works a bit better. - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)

Re: [Nouveau] [Intel-gfx] [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-20 Thread Lucas De Marchi
On Wed, Jan 19, 2022 at 10:06:35AM -0500, Steven Rostedt wrote: On Wed, 19 Jan 2022 11:18:59 +0200 Sakari Ailus wrote: On Tue, Jan 18, 2022 at 11:24:48PM -0800, Lucas De Marchi wrote: > @@ -1354,8 +1345,7 @@ static bool tomoyo_print_condition(struct tomoyo_io_buffer *head, >case 3: >

Re: [Nouveau] [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-20 Thread Sakari Ailus
Hi Lucas, On Tue, Jan 18, 2022 at 11:24:48PM -0800, Lucas De Marchi wrote: > @@ -1354,8 +1345,7 @@ static bool tomoyo_print_condition(struct > tomoyo_io_buffer *head, > case 3: > if (cond->grant_log != TOMOYO_GRANTLOG_AUTO) > tomoyo_io_printf(head, " gran

Re: [Nouveau] [PATCH 2/3] lib/string_helpers: Add helpers for enable[d]/disable[d]

2022-01-20 Thread Lucas De Marchi
On Wed, Jan 19, 2022 at 11:20:38AM +0200, Andy Shevchenko wrote: On Wednesday, January 19, 2022, Lucas De Marchi wrote: Follow the yes/no logic and add helpers for enabled/disabled and enable/disable - those are not so common throughout the kernel, but they give a nice way to reuse the strings

[Nouveau] [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

2022-01-20 Thread Lucas De Marchi
There are a few implementations of yesno() in the tree. Consolidate them in include/linux/string_helpers.h. Quite a few users of open coded yesno() could later be converted to the new function: $ git grep '?\s*"yes"\s*' | wc -l 286 $ git grep '?\s*"no"\s*' | wc -l 20 The inlined function should

[Nouveau] [PATCH 2/3] lib/string_helpers: Add helpers for enable[d]/disable[d]

2022-01-20 Thread Lucas De Marchi
Follow the yes/no logic and add helpers for enabled/disabled and enable/disable - those are not so common throughout the kernel, but they give a nice way to reuse the strings to log things as enabled/disabled or enable/disable. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/i915_utils.h

Re: [Nouveau] [RFC PATCH v3 2/3] drm: add support modifiers for drivers whose planes only support linear layout

2022-01-20 Thread Esaki Tomohito
On 2022/01/18 18:53, Andy Shevchenko wrote: On Mon, Jan 17, 2022 at 02:15:48PM +0900, Esaki Tomohito wrote: On 2022/01/14 23:16, Andy Shevchenko wrote: On Fri, Jan 14, 2022 at 07:17:52PM +0900, Tomohito Esaki wrote: The LINEAR modifier is advertised as default if a driver doesn't specify modif

[Nouveau] [PATCH 0/3] lib/string_helpers: Add a few string helpers

2022-01-20 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) https://lor

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

2022-01-20 Thread Lucas De Marchi
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 semantic patch: @@ expression b; @@ - b ? "yes" : "no" + yesno(b) Then the includes were adde

Re: [Nouveau] [Intel-gfx] [PATCH 0/3] lib/string_helpers: Add a few string helpers

2022-01-20 Thread Lucas De Marchi
On Wed, Jan 19, 2022 at 05:15:02PM +0100, Daniel Vetter wrote: On Wed, Jan 19, 2022 at 04:16:12PM +0200, Jani Nikula wrote: On Wed, 19 Jan 2022, Petr Mladek wrote: > On Tue 2022-01-18 23:24:47, Lucas De Marchi wrote: >> Add some helpers under lib/string_helpers.h so they can be used >> througho

Re: [Nouveau] [PATCH 0/3] lib/string_helpers: Add a few string helpers

2022-01-20 Thread Jani Nikula
On Thu, 20 Jan 2022, Petr Mladek wrote: > On Wed 2022-01-19 16:16:12, Jani Nikula wrote: >> On Wed, 19 Jan 2022, Petr Mladek wrote: >> > On Tue 2022-01-18 23:24:47, Lucas De Marchi wrote: >> >> d. This doesn't bring onoff() helper as there are some places in the >> >>kernel with onoff as vari

Re: [Nouveau] [PATCH 0/3] lib/string_helpers: Add a few string helpers

2022-01-20 Thread David Laight
... > Yeah, and I am sorry for bikeshedding. Honestly, I do not know what is > better. This is why I do not want to block this series when others > like this. > > My main motivation is to point out that: > > enabledisable(enable) > > might be, for some people, more eye bleeding than > >