Re: [PATCH 05/45] drm/amdgpu: add vangogh_reg_base_init function for van gogh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 29, 2020 at 2:59 PM Luben Tuikov <luben.tuikov@xxxxxxx> wrote:
>
> On 2020-09-29 10:57 a.m., Alex Deucher wrote:
> >>> +#ifndef __VANGOGH_IP_OFFSET_H__
> >>> +#define __VANGOGH_IP_OFFSET_H__
> >>> +
> >>> +#define MAX_INSTANCE                                        8
> >>> +#define MAX_SEGMENT                                         6
> >> No. No "max". Use "num" instead, as:
> >>
> >> #define NUM_INSTANCE   8
> >> #define NUM_SEGMENT    6
> >>
> >> To mean, the _number_ of instances and the _number_ of
> >> segments. (Their count is a number.)
> >>
> >> A "maximum" (similarly "minimum") value is an _attainable_ value,
> >> i.e. something you can get, use, etc. But array indices are 0 to arraysize-1,
> >> and thus max instance can never be attained.
> >>
> >> It is the count, the number of instances (segments, wlg),
> >> not the maximum instance. The maximum instance is 7,
> >> the minimum instance is 0. Similarly for segments.
> > Valid point, but this file is shared across components so I'd like to
> > minimize the differences.
> >
>
> Is it possible to educate the organization?
>
> Is it possible for knowledge to flow backwards,
> i.e. from the Linux team back in?
>
> As a mathematician, this really, really bothers me.
>
> It leaves traces of badly named objects and new people reading
> it would pick this bad naming up, and experienced people would
> either be confused or find it incorrect.
>
> Let's fix this at the source.

We can take it up with the internal teams that generate these files.

Alex
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux