Source-Changes-D archive

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

Re: CVS commit: src/sys/external/bsd/drm2/dist/drm/i915



    Date:        Sat, 22 Sep 2018 22:03:56 +0200
    From:        Kamil Rytarowski <n54%gmx.com@localhost>
    Message-ID:  <164fe80f-089f-ea38-1751-e442e6125c43%gmx.com@localhost>


  | I know, but in this case the symbol name (preprocessor symbol) was
  | available in other functions in the same file. I've decided that it will
  | be simpler to just change 1 line of code.

I don't think you understood the point, Christos wasn't suggesting (I don't
think) that you do away with s_max, but rather that the code become
more like...

#define S_MAX 3

        const int s_max = S_MAX, ss_max = 3, eu_max = 8;
        int s, ss;
        u32 fuse2, eu_disable[S_MAX], s_enable, ss_disable;

as, as it is now ...

        const int s_max = 3, ss_max = 3, eu_max = 8;
        int s, ss;
        u32 fuse2, eu_disable[3], s_enable, ss_disable;

it is no longer obvious which of s_max and ss_max (both of which
are 3), if either, is intended to be the same as the array size of eu_disable
(which was obvious in the original, where the dimension of eu_disable
was s_max).

If s_max and ss_max are both intended to always be the same (in which
case I would wonder why they both exist) then making ss_max = S_MAX
in the declaration would be appropriate as well.

kre



Home | Main Index | Thread Index | Old Index