* drm/amdkfd: bad CONFIG_ prefix for enum entries
@ 2015-06-04 13:44 Valentin Rothberg
2015-06-04 13:48 ` Oded Gabbay
0 siblings, 1 reply; 13+ messages in thread
From: Valentin Rothberg @ 2015-06-04 13:44 UTC (permalink / raw)
To: yair.shachar
Cc: Paul Bolle, Andreas Ruprecht, hengelein Stefan, oded.gabbay,
airlied, linux-kernel, dri-devel
Hi Yair,
your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
module support") has shown up in today's linux-next tree (i.e.,
next-20150604). The commit adds the following lines of code to
drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
+/* CONFIG reg space definition */
+enum {
+ CONFIG_REG_BASE = 0x2000, /* in dwords */
+ CONFIG_REG_END = 0x2B00,
+ CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
+};
There is a problem with the 'CONFIG_' prefix of those entries. This
prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
so that static analysis tools (and readers of the code) may mistakenly
assume that the symbol is defined somewhere in a Kconfig file.
I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
mind renaming those entries to something without the 'CONFIG_' prefix?
I can also take care of it if you wish to.
Kind regards,
Valentin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
2015-06-04 13:44 drm/amdkfd: bad CONFIG_ prefix for enum entries Valentin Rothberg
@ 2015-06-04 13:48 ` Oded Gabbay
2015-06-04 13:59 ` Valentin Rothberg
2015-06-04 14:01 ` Alex Deucher
0 siblings, 2 replies; 13+ messages in thread
From: Oded Gabbay @ 2015-06-04 13:48 UTC (permalink / raw)
To: Valentin Rothberg, yair.shachar
Cc: Paul Bolle, Andreas Ruprecht, dri-devel, linux-kernel, hengelein Stefan
[-- Attachment #1.1: Type: text/plain, Size: 1157 bytes --]
Hi Valentin,
Thanks for catching that.
I would be grateful if you could fix this yourself.
Oded
On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg <valentinrothberg@gmail.com>
wrote:
> Hi Yair,
>
> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
> module support") has shown up in today's linux-next tree (i.e.,
> next-20150604). The commit adds the following lines of code to
> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>
> +/* CONFIG reg space definition */
> +enum {
> + CONFIG_REG_BASE = 0x2000, /* in dwords */
> + CONFIG_REG_END = 0x2B00,
> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
> +};
>
> There is a problem with the 'CONFIG_' prefix of those entries. This
> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
> so that static analysis tools (and readers of the code) may mistakenly
> assume that the symbol is defined somewhere in a Kconfig file.
>
> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
> mind renaming those entries to something without the 'CONFIG_' prefix?
> I can also take care of it if you wish to.
>
> Kind regards,
> Valentin
>
[-- Attachment #1.2: Type: text/html, Size: 1571 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
2015-06-04 13:48 ` Oded Gabbay
@ 2015-06-04 13:59 ` Valentin Rothberg
2015-06-04 14:01 ` Alex Deucher
1 sibling, 0 replies; 13+ messages in thread
From: Valentin Rothberg @ 2015-06-04 13:59 UTC (permalink / raw)
To: Oded Gabbay
Cc: yair.shachar, Paul Bolle, Andreas Ruprecht, hengelein Stefan,
airlied, linux-kernel, dri-devel
Hi Oded,
On Thu, Jun 4, 2015 at 3:48 PM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> Hi Valentin,
> Thanks for catching that.
> I would be grateful if you could fix this yourself.
With pleasure, I am happy if I can help. Do you have any preference
to change the prefix to something else? As there are three other
symbols SH_REG_{BASE,SIZE,END}, I would rename CONFIG_ to CONF_ to
avoid mix-ups.
Kind regards,
Valentin
> Oded
>
> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
> <valentinrothberg@gmail.com> wrote:
>>
>> Hi Yair,
>>
>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>> module support") has shown up in today's linux-next tree (i.e.,
>> next-20150604). The commit adds the following lines of code to
>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>
>> +/* CONFIG reg space definition */
>> +enum {
>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>> + CONFIG_REG_END = 0x2B00,
>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>> +};
>>
>> There is a problem with the 'CONFIG_' prefix of those entries. This
>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>> so that static analysis tools (and readers of the code) may mistakenly
>> assume that the symbol is defined somewhere in a Kconfig file.
>>
>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>> mind renaming those entries to something without the 'CONFIG_' prefix?
>> I can also take care of it if you wish to.
>>
>> Kind regards,
>> Valentin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
2015-06-04 13:48 ` Oded Gabbay
@ 2015-06-04 14:01 ` Alex Deucher
2015-06-04 14:01 ` Alex Deucher
1 sibling, 0 replies; 13+ messages in thread
From: Alex Deucher @ 2015-06-04 14:01 UTC (permalink / raw)
To: Oded Gabbay
Cc: Valentin Rothberg, yair.shachar, Paul Bolle, Andreas Ruprecht,
Maling list - DRI developers, LKML, hengelein Stefan
On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> Hi Valentin,
> Thanks for catching that.
> I would be grateful if you could fix this yourself.
Please try and keep CONFIG in the name since this range of registers
are called CONFIG registers.
Alex
>
> Oded
>
> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
> <valentinrothberg@gmail.com> wrote:
>>
>> Hi Yair,
>>
>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>> module support") has shown up in today's linux-next tree (i.e.,
>> next-20150604). The commit adds the following lines of code to
>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>
>> +/* CONFIG reg space definition */
>> +enum {
>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>> + CONFIG_REG_END = 0x2B00,
>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>> +};
>>
>> There is a problem with the 'CONFIG_' prefix of those entries. This
>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>> so that static analysis tools (and readers of the code) may mistakenly
>> assume that the symbol is defined somewhere in a Kconfig file.
>>
>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>> mind renaming those entries to something without the 'CONFIG_' prefix?
>> I can also take care of it if you wish to.
>>
>> Kind regards,
>> Valentin
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
@ 2015-06-04 14:01 ` Alex Deucher
0 siblings, 0 replies; 13+ messages in thread
From: Alex Deucher @ 2015-06-04 14:01 UTC (permalink / raw)
To: Oded Gabbay
Cc: Paul Bolle, LKML, Maling list - DRI developers, Andreas Ruprecht,
hengelein Stefan, Valentin Rothberg
On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> Hi Valentin,
> Thanks for catching that.
> I would be grateful if you could fix this yourself.
Please try and keep CONFIG in the name since this range of registers
are called CONFIG registers.
Alex
>
> Oded
>
> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
> <valentinrothberg@gmail.com> wrote:
>>
>> Hi Yair,
>>
>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>> module support") has shown up in today's linux-next tree (i.e.,
>> next-20150604). The commit adds the following lines of code to
>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>
>> +/* CONFIG reg space definition */
>> +enum {
>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>> + CONFIG_REG_END = 0x2B00,
>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>> +};
>>
>> There is a problem with the 'CONFIG_' prefix of those entries. This
>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>> so that static analysis tools (and readers of the code) may mistakenly
>> assume that the symbol is defined somewhere in a Kconfig file.
>>
>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>> mind renaming those entries to something without the 'CONFIG_' prefix?
>> I can also take care of it if you wish to.
>>
>> Kind regards,
>> Valentin
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
2015-06-04 14:01 ` Alex Deucher
@ 2015-06-04 14:04 ` Valentin Rothberg
-1 siblings, 0 replies; 13+ messages in thread
From: Valentin Rothberg @ 2015-06-04 14:04 UTC (permalink / raw)
To: Alex Deucher
Cc: Oded Gabbay, yair.shachar, Paul Bolle, Andreas Ruprecht,
Maling list - DRI developers, LKML, hengelein Stefan
Hi Alex,
On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>> Hi Valentin,
>> Thanks for catching that.
>> I would be grateful if you could fix this yourself.
>
> Please try and keep CONFIG in the name since this range of registers
> are called CONFIG registers.
I cannot force changing those symbols, but point out that it's
violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
make clear that it's config registers. Would you be fine with that?
Kind regards,
Valentin
> Alex
>
>>
>> Oded
>>
>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>> <valentinrothberg@gmail.com> wrote:
>>>
>>> Hi Yair,
>>>
>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>> module support") has shown up in today's linux-next tree (i.e.,
>>> next-20150604). The commit adds the following lines of code to
>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>
>>> +/* CONFIG reg space definition */
>>> +enum {
>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>> + CONFIG_REG_END = 0x2B00,
>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>> +};
>>>
>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>> so that static analysis tools (and readers of the code) may mistakenly
>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>
>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>> I can also take care of it if you wish to.
>>>
>>> Kind regards,
>>> Valentin
>>
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
@ 2015-06-04 14:04 ` Valentin Rothberg
0 siblings, 0 replies; 13+ messages in thread
From: Valentin Rothberg @ 2015-06-04 14:04 UTC (permalink / raw)
To: Alex Deucher
Cc: Oded Gabbay, yair.shachar, Paul Bolle, Andreas Ruprecht,
Maling list - DRI developers, LKML, hengelein Stefan
Hi Alex,
On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>> Hi Valentin,
>> Thanks for catching that.
>> I would be grateful if you could fix this yourself.
>
> Please try and keep CONFIG in the name since this range of registers
> are called CONFIG registers.
I cannot force changing those symbols, but point out that it's
violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
make clear that it's config registers. Would you be fine with that?
Kind regards,
Valentin
> Alex
>
>>
>> Oded
>>
>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>> <valentinrothberg@gmail.com> wrote:
>>>
>>> Hi Yair,
>>>
>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>> module support") has shown up in today's linux-next tree (i.e.,
>>> next-20150604). The commit adds the following lines of code to
>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>
>>> +/* CONFIG reg space definition */
>>> +enum {
>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>> + CONFIG_REG_END = 0x2B00,
>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>> +};
>>>
>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>> so that static analysis tools (and readers of the code) may mistakenly
>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>
>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>> I can also take care of it if you wish to.
>>>
>>> Kind regards,
>>> Valentin
>>
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
2015-06-04 14:04 ` Valentin Rothberg
@ 2015-06-04 15:09 ` Alex Deucher
-1 siblings, 0 replies; 13+ messages in thread
From: Alex Deucher @ 2015-06-04 15:09 UTC (permalink / raw)
To: Valentin Rothberg
Cc: Oded Gabbay, yair.shachar, Paul Bolle, Andreas Ruprecht,
Maling list - DRI developers, LKML, hengelein Stefan
On Thu, Jun 4, 2015 at 10:04 AM, Valentin Rothberg
<valentinrothberg@gmail.com> wrote:
> Hi Alex,
>
> On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>>> Hi Valentin,
>>> Thanks for catching that.
>>> I would be grateful if you could fix this yourself.
>>
>> Please try and keep CONFIG in the name since this range of registers
>> are called CONFIG registers.
>
> I cannot force changing those symbols, but point out that it's
> violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
> make clear that it's config registers. Would you be fine with that?
What about something like AMD_CONFIG_REG?
>
> Kind regards,
> Valentin
>
>> Alex
>>
>>>
>>> Oded
>>>
>>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>>> <valentinrothberg@gmail.com> wrote:
>>>>
>>>> Hi Yair,
>>>>
>>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>>> module support") has shown up in today's linux-next tree (i.e.,
>>>> next-20150604). The commit adds the following lines of code to
>>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>>
>>>> +/* CONFIG reg space definition */
>>>> +enum {
>>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>>> + CONFIG_REG_END = 0x2B00,
>>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>>> +};
>>>>
>>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>>> so that static analysis tools (and readers of the code) may mistakenly
>>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>>
>>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>>> I can also take care of it if you wish to.
>>>>
>>>> Kind regards,
>>>> Valentin
>>>
>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
@ 2015-06-04 15:09 ` Alex Deucher
0 siblings, 0 replies; 13+ messages in thread
From: Alex Deucher @ 2015-06-04 15:09 UTC (permalink / raw)
To: Valentin Rothberg
Cc: Paul Bolle, Andreas Ruprecht, Maling list - DRI developers, LKML,
hengelein Stefan
On Thu, Jun 4, 2015 at 10:04 AM, Valentin Rothberg
<valentinrothberg@gmail.com> wrote:
> Hi Alex,
>
> On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>>> Hi Valentin,
>>> Thanks for catching that.
>>> I would be grateful if you could fix this yourself.
>>
>> Please try and keep CONFIG in the name since this range of registers
>> are called CONFIG registers.
>
> I cannot force changing those symbols, but point out that it's
> violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
> make clear that it's config registers. Would you be fine with that?
What about something like AMD_CONFIG_REG?
>
> Kind regards,
> Valentin
>
>> Alex
>>
>>>
>>> Oded
>>>
>>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>>> <valentinrothberg@gmail.com> wrote:
>>>>
>>>> Hi Yair,
>>>>
>>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>>> module support") has shown up in today's linux-next tree (i.e.,
>>>> next-20150604). The commit adds the following lines of code to
>>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>>
>>>> +/* CONFIG reg space definition */
>>>> +enum {
>>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>>> + CONFIG_REG_END = 0x2B00,
>>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>>> +};
>>>>
>>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>>> so that static analysis tools (and readers of the code) may mistakenly
>>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>>
>>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>>> I can also take care of it if you wish to.
>>>>
>>>> Kind regards,
>>>> Valentin
>>>
>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
2015-06-04 15:09 ` Alex Deucher
@ 2015-06-04 16:47 ` Christian König
-1 siblings, 0 replies; 13+ messages in thread
From: Christian König @ 2015-06-04 16:47 UTC (permalink / raw)
To: Alex Deucher, Valentin Rothberg
Cc: Paul Bolle, Andreas Ruprecht, Maling list - DRI developers, LKML,
hengelein Stefan
On 04.06.2015 17:09, Alex Deucher wrote:
> On Thu, Jun 4, 2015 at 10:04 AM, Valentin Rothberg
> <valentinrothberg@gmail.com> wrote:
>> Hi Alex,
>>
>> On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>>>> Hi Valentin,
>>>> Thanks for catching that.
>>>> I would be grateful if you could fix this yourself.
>>> Please try and keep CONFIG in the name since this range of registers
>>> are called CONFIG registers.
>> I cannot force changing those symbols, but point out that it's
>> violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
>> make clear that it's config registers. Would you be fine with that?
> What about something like AMD_CONFIG_REG?
For the background: The register headers will be auto generated in the
future and if the hardware designer named the register CONFIG_* the name
will show up in our headers as such.
Prefixing it with AMD_ sounds like a good solution to me, too.
Regards,
Christian.
>
>> Kind regards,
>> Valentin
>>
>>> Alex
>>>
>>>> Oded
>>>>
>>>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>>>> <valentinrothberg@gmail.com> wrote:
>>>>> Hi Yair,
>>>>>
>>>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>>>> module support") has shown up in today's linux-next tree (i.e.,
>>>>> next-20150604). The commit adds the following lines of code to
>>>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>>>
>>>>> +/* CONFIG reg space definition */
>>>>> +enum {
>>>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>>>> + CONFIG_REG_END = 0x2B00,
>>>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>>>> +};
>>>>>
>>>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>>>> so that static analysis tools (and readers of the code) may mistakenly
>>>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>>>
>>>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>>>> I can also take care of it if you wish to.
>>>>>
>>>>> Kind regards,
>>>>> Valentin
>>>>
>>>> _______________________________________________
>>>> dri-devel mailing list
>>>> dri-devel@lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
@ 2015-06-04 16:47 ` Christian König
0 siblings, 0 replies; 13+ messages in thread
From: Christian König @ 2015-06-04 16:47 UTC (permalink / raw)
To: Alex Deucher, Valentin Rothberg
Cc: Paul Bolle, hengelein Stefan, Andreas Ruprecht,
Maling list - DRI developers, LKML
On 04.06.2015 17:09, Alex Deucher wrote:
> On Thu, Jun 4, 2015 at 10:04 AM, Valentin Rothberg
> <valentinrothberg@gmail.com> wrote:
>> Hi Alex,
>>
>> On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
>>>> Hi Valentin,
>>>> Thanks for catching that.
>>>> I would be grateful if you could fix this yourself.
>>> Please try and keep CONFIG in the name since this range of registers
>>> are called CONFIG registers.
>> I cannot force changing those symbols, but point out that it's
>> violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
>> make clear that it's config registers. Would you be fine with that?
> What about something like AMD_CONFIG_REG?
For the background: The register headers will be auto generated in the
future and if the hardware designer named the register CONFIG_* the name
will show up in our headers as such.
Prefixing it with AMD_ sounds like a good solution to me, too.
Regards,
Christian.
>
>> Kind regards,
>> Valentin
>>
>>> Alex
>>>
>>>> Oded
>>>>
>>>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>>>> <valentinrothberg@gmail.com> wrote:
>>>>> Hi Yair,
>>>>>
>>>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>>>> module support") has shown up in today's linux-next tree (i.e.,
>>>>> next-20150604). The commit adds the following lines of code to
>>>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>>>
>>>>> +/* CONFIG reg space definition */
>>>>> +enum {
>>>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>>>> + CONFIG_REG_END = 0x2B00,
>>>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>>>> +};
>>>>>
>>>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>>>> so that static analysis tools (and readers of the code) may mistakenly
>>>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>>>
>>>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>>>> I can also take care of it if you wish to.
>>>>>
>>>>> Kind regards,
>>>>> Valentin
>>>>
>>>> _______________________________________________
>>>> dri-devel mailing list
>>>> dri-devel@lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
2015-06-04 16:47 ` Christian König
@ 2015-06-04 17:42 ` Valentin Rothberg
-1 siblings, 0 replies; 13+ messages in thread
From: Valentin Rothberg @ 2015-06-04 17:42 UTC (permalink / raw)
To: Christian König
Cc: Alex Deucher, Paul Bolle, Andreas Ruprecht,
Maling list - DRI developers, LKML, hengelein Stefan
Hi Christian,
On Thu, Jun 4, 2015 at 6:47 PM, Christian König <deathsimple@vodafone.de> wrote:
> On 04.06.2015 17:09, Alex Deucher wrote:
>>
>> On Thu, Jun 4, 2015 at 10:04 AM, Valentin Rothberg
>> <valentinrothberg@gmail.com> wrote:
>>>
>>> Hi Alex,
>>>
>>> On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com>
>>> wrote:
>>>>
>>>> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi Valentin,
>>>>> Thanks for catching that.
>>>>> I would be grateful if you could fix this yourself.
>>>>
>>>> Please try and keep CONFIG in the name since this range of registers
>>>> are called CONFIG registers.
>>>
>>> I cannot force changing those symbols, but point out that it's
>>> violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
>>> make clear that it's config registers. Would you be fine with that?
>>
>> What about something like AMD_CONFIG_REG?
>
>
> For the background: The register headers will be auto generated in the
> future and if the hardware designer named the register CONFIG_* the name
> will show up in our headers as such.
>
> Prefixing it with AMD_ sounds like a good solution to me, too.
Okay. I will prepare and send a patch tomorrow.
Kind regards,
Valentin
> Regards,
> Christian.
>
>
>>
>>> Kind regards,
>>> Valentin
>>>
>>>> Alex
>>>>
>>>>> Oded
>>>>>
>>>>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>>>>> <valentinrothberg@gmail.com> wrote:
>>>>>>
>>>>>> Hi Yair,
>>>>>>
>>>>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>>>>> module support") has shown up in today's linux-next tree (i.e.,
>>>>>> next-20150604). The commit adds the following lines of code to
>>>>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>>>>
>>>>>> +/* CONFIG reg space definition */
>>>>>> +enum {
>>>>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>>>>> + CONFIG_REG_END = 0x2B00,
>>>>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>>>>> +};
>>>>>>
>>>>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>>>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>>>>> so that static analysis tools (and readers of the code) may mistakenly
>>>>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>>>>
>>>>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>>>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>>>>> I can also take care of it if you wish to.
>>>>>>
>>>>>> Kind regards,
>>>>>> Valentin
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> dri-devel mailing list
>>>>> dri-devel@lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
On Thu, Jun 4, 2015 at 6:47 PM, Christian König <deathsimple@vodafone.de> wrote:
> On 04.06.2015 17:09, Alex Deucher wrote:
>>
>> On Thu, Jun 4, 2015 at 10:04 AM, Valentin Rothberg
>> <valentinrothberg@gmail.com> wrote:
>>>
>>> Hi Alex,
>>>
>>> On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com>
>>> wrote:
>>>>
>>>> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi Valentin,
>>>>> Thanks for catching that.
>>>>> I would be grateful if you could fix this yourself.
>>>>
>>>> Please try and keep CONFIG in the name since this range of registers
>>>> are called CONFIG registers.
>>>
>>> I cannot force changing those symbols, but point out that it's
>>> violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
>>> make clear that it's config registers. Would you be fine with that?
>>
>> What about something like AMD_CONFIG_REG?
>
>
> For the background: The register headers will be auto generated in the
> future and if the hardware designer named the register CONFIG_* the name
> will show up in our headers as such.
>
> Prefixing it with AMD_ sounds like a good solution to me, too.
>
> Regards,
> Christian.
>
>
>>
>>> Kind regards,
>>> Valentin
>>>
>>>> Alex
>>>>
>>>>> Oded
>>>>>
>>>>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>>>>> <valentinrothberg@gmail.com> wrote:
>>>>>>
>>>>>> Hi Yair,
>>>>>>
>>>>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>>>>> module support") has shown up in today's linux-next tree (i.e.,
>>>>>> next-20150604). The commit adds the following lines of code to
>>>>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>>>>
>>>>>> +/* CONFIG reg space definition */
>>>>>> +enum {
>>>>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>>>>> + CONFIG_REG_END = 0x2B00,
>>>>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>>>>> +};
>>>>>>
>>>>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>>>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>>>>> so that static analysis tools (and readers of the code) may mistakenly
>>>>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>>>>
>>>>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>>>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>>>>> I can also take care of it if you wish to.
>>>>>>
>>>>>> Kind regards,
>>>>>> Valentin
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> dri-devel mailing list
>>>>> dri-devel@lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/amdkfd: bad CONFIG_ prefix for enum entries
@ 2015-06-04 17:42 ` Valentin Rothberg
0 siblings, 0 replies; 13+ messages in thread
From: Valentin Rothberg @ 2015-06-04 17:42 UTC (permalink / raw)
To: Christian König
Cc: Alex Deucher, Paul Bolle, Andreas Ruprecht,
Maling list - DRI developers, LKML, hengelein Stefan
Hi Christian,
On Thu, Jun 4, 2015 at 6:47 PM, Christian König <deathsimple@vodafone.de> wrote:
> On 04.06.2015 17:09, Alex Deucher wrote:
>>
>> On Thu, Jun 4, 2015 at 10:04 AM, Valentin Rothberg
>> <valentinrothberg@gmail.com> wrote:
>>>
>>> Hi Alex,
>>>
>>> On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com>
>>> wrote:
>>>>
>>>> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi Valentin,
>>>>> Thanks for catching that.
>>>>> I would be grateful if you could fix this yourself.
>>>>
>>>> Please try and keep CONFIG in the name since this range of registers
>>>> are called CONFIG registers.
>>>
>>> I cannot force changing those symbols, but point out that it's
>>> violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
>>> make clear that it's config registers. Would you be fine with that?
>>
>> What about something like AMD_CONFIG_REG?
>
>
> For the background: The register headers will be auto generated in the
> future and if the hardware designer named the register CONFIG_* the name
> will show up in our headers as such.
>
> Prefixing it with AMD_ sounds like a good solution to me, too.
Okay. I will prepare and send a patch tomorrow.
Kind regards,
Valentin
> Regards,
> Christian.
>
>
>>
>>> Kind regards,
>>> Valentin
>>>
>>>> Alex
>>>>
>>>>> Oded
>>>>>
>>>>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>>>>> <valentinrothberg@gmail.com> wrote:
>>>>>>
>>>>>> Hi Yair,
>>>>>>
>>>>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>>>>> module support") has shown up in today's linux-next tree (i.e.,
>>>>>> next-20150604). The commit adds the following lines of code to
>>>>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>>>>
>>>>>> +/* CONFIG reg space definition */
>>>>>> +enum {
>>>>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>>>>> + CONFIG_REG_END = 0x2B00,
>>>>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>>>>> +};
>>>>>>
>>>>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>>>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>>>>> so that static analysis tools (and readers of the code) may mistakenly
>>>>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>>>>
>>>>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>>>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>>>>> I can also take care of it if you wish to.
>>>>>>
>>>>>> Kind regards,
>>>>>> Valentin
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> dri-devel mailing list
>>>>> dri-devel@lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
On Thu, Jun 4, 2015 at 6:47 PM, Christian König <deathsimple@vodafone.de> wrote:
> On 04.06.2015 17:09, Alex Deucher wrote:
>>
>> On Thu, Jun 4, 2015 at 10:04 AM, Valentin Rothberg
>> <valentinrothberg@gmail.com> wrote:
>>>
>>> Hi Alex,
>>>
>>> On Thu, Jun 4, 2015 at 4:01 PM, Alex Deucher <alexdeucher@gmail.com>
>>> wrote:
>>>>
>>>> On Thu, Jun 4, 2015 at 9:48 AM, Oded Gabbay <oded.gabbay@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi Valentin,
>>>>> Thanks for catching that.
>>>>> I would be grateful if you could fix this yourself.
>>>>
>>>> Please try and keep CONFIG in the name since this range of registers
>>>> are called CONFIG registers.
>>>
>>> I cannot force changing those symbols, but point out that it's
>>> violating naming conventions. I would suggest to s/CONFIG_/CONF_/ to
>>> make clear that it's config registers. Would you be fine with that?
>>
>> What about something like AMD_CONFIG_REG?
>
>
> For the background: The register headers will be auto generated in the
> future and if the hardware designer named the register CONFIG_* the name
> will show up in our headers as such.
>
> Prefixing it with AMD_ sounds like a good solution to me, too.
>
> Regards,
> Christian.
>
>
>>
>>> Kind regards,
>>> Valentin
>>>
>>>> Alex
>>>>
>>>>> Oded
>>>>>
>>>>> On Thu, Jun 4, 2015 at 4:45 PM Valentin Rothberg
>>>>> <valentinrothberg@gmail.com> wrote:
>>>>>>
>>>>>> Hi Yair,
>>>>>>
>>>>>> your commit fbeb661bfa89 ("drm/amdkfd: Add skeleton H/W debugger
>>>>>> module support") has shown up in today's linux-next tree (i.e.,
>>>>>> next-20150604). The commit adds the following lines of code to
>>>>>> drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h:
>>>>>>
>>>>>> +/* CONFIG reg space definition */
>>>>>> +enum {
>>>>>> + CONFIG_REG_BASE = 0x2000, /* in dwords */
>>>>>> + CONFIG_REG_END = 0x2B00,
>>>>>> + CONFIG_REG_SIZE = CONFIG_REG_END - CONFIG_REG_BASE
>>>>>> +};
>>>>>>
>>>>>> There is a problem with the 'CONFIG_' prefix of those entries. This
>>>>>> prefix is reserved for Kconfig options in Make/Kbuild and CPP syntax,
>>>>>> so that static analysis tools (and readers of the code) may mistakenly
>>>>>> assume that the symbol is defined somewhere in a Kconfig file.
>>>>>>
>>>>>> I detected the issue with ./scripts/checkkconfigsymbols.py. Would you
>>>>>> mind renaming those entries to something without the 'CONFIG_' prefix?
>>>>>> I can also take care of it if you wish to.
>>>>>>
>>>>>> Kind regards,
>>>>>> Valentin
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> dri-devel mailing list
>>>>> dri-devel@lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-06-04 17:43 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04 13:44 drm/amdkfd: bad CONFIG_ prefix for enum entries Valentin Rothberg
2015-06-04 13:48 ` Oded Gabbay
2015-06-04 13:59 ` Valentin Rothberg
2015-06-04 14:01 ` Alex Deucher
2015-06-04 14:01 ` Alex Deucher
2015-06-04 14:04 ` Valentin Rothberg
2015-06-04 14:04 ` Valentin Rothberg
2015-06-04 15:09 ` Alex Deucher
2015-06-04 15:09 ` Alex Deucher
2015-06-04 16:47 ` Christian König
2015-06-04 16:47 ` Christian König
2015-06-04 17:42 ` Valentin Rothberg
2015-06-04 17:42 ` Valentin Rothberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.