<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">
      <blockquote type="cite">
        <div>Has a [1] array at the tail which is then kzalloc'ed with
          N-1 entries.  Shouldn't that just be a [0] with N entries
          allocated for clarity?</div>
      </blockquote>
      Actually the starting address of a dynamic array should be
      manually calculated instead of using [1] or [0].<br>
      <br>
      We had tons of problems with that because some gcc versions get
      this wrong and the atombios code used this as well.<br>
      <br>
      Alex how did we resolved such issues?<br>
      <br>
      Regards,<br>
      Christian.<br>
      <br>
      Am 18.08.2016 um 16:26 schrieb StDenis, Tom:<br>
    </div>
    <blockquote
cite="mid:DM5PR12MB1132F1D9FF8F44E09BE37EF4F7150@DM5PR12MB1132.namprd12.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <p>Tidying up cz_hwmgr.c I noted a couple of things but first
          is </p>
        <p><br>
        </p>
        <div><span style="font-family: "Courier New",
            monospace;">static bool cz_dpm_check_smu_features(struct
            pp_hwmgr *hwmgr,</span></div>
        <div><span class="Apple-tab-span" style="white-space: pre; font-family: "Courier New", monospace;"></span><span
            style="font-family: "Courier New", monospace;">unsigned
            long check_feature);</span></div>
        <div><br>
        </div>
        <div>Which will return "true" if the smu call fails <b>or</b> the
          feature is set.  </div>
        <div><br>
        </div>
        <div>The structure </div>
        <div><br>
        </div>
        <div>
          <div><span style="font-family: "Courier New",
              monospace;">struct phm_clock_voltage_dependency_table;</span></div>
        </div>
        <div><br>
        </div>
        <div>Has a [1] array at the tail which is then kzalloc'ed with
          N-1 entries.  Shouldn't that just be a [0] with N entries
          allocated for clarity?</div>
        <div><br>
        </div>
        <div>Tom</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
amd-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>