Re: [PATCH v2 2/3] drm/i915/utils: do not depend on config being defined

2021-09-30 Thread Lucas De Marchi
On Thu, Sep 30, 2021 at 11:00:06AM +0100, Steven Price wrote: On 29/09/2021 19:33, Lucas De Marchi wrote: Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to return the right thing when the config is not defined rather than a build error, with the limitation that it can't be us

Re: [PATCH v2 2/3] drm/i915/utils: do not depend on config being defined

2021-09-30 Thread Steven Price
On 29/09/2021 19:33, Lucas De Marchi wrote: > Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to > return the right thing when the config is not defined rather than a > build error, with the limitation that it can't be used on preprocessor > context. > > The trick here is that m

Re: [PATCH v2 2/3] drm/i915/utils: do not depend on config being defined

2021-09-30 Thread Andrzej Hajda
W dniu 30.09.2021 o 00:54, Lucas De Marchi pisze: > On Wed, Sep 29, 2021 at 11:08:18PM +0200, Andrzej Hajda wrote: >> >> W dniu 29.09.2021 o 20:33, Lucas De Marchi pisze: >>> Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to >>> return the right thing when the config is not de

Re: [PATCH v2 2/3] drm/i915/utils: do not depend on config being defined

2021-09-29 Thread Lucas De Marchi
On Wed, Sep 29, 2021 at 11:08:18PM +0200, Andrzej Hajda wrote: W dniu 29.09.2021 o 20:33, Lucas De Marchi pisze: Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to return the right thing when the config is not defined rather than a build error, with the limitation that it can

Re: [PATCH v2 2/3] drm/i915/utils: do not depend on config being defined

2021-09-29 Thread Andrzej Hajda
W dniu 29.09.2021 o 20:33, Lucas De Marchi pisze: > Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to > return the right thing when the config is not defined rather than a > build error, with the limitation that it can't be used on preprocessor > context. > > The trick here is

[PATCH v2 2/3] drm/i915/utils: do not depend on config being defined

2021-09-29 Thread Lucas De Marchi
Like the IS_ENABLED() counterpart, we can make IS_CONFIG_NONZERO() to return the right thing when the config is not defined rather than a build error, with the limitation that it can't be used on preprocessor context. The trick here is that macro names can't start with a number or dash, so we stri