<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 13, 2017 at 11:59 AM, Francisco Jerez <span dir="ltr"><<a href="mailto:currojerez@riseup.net" target="_blank">currojerez@riseup.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>> writes:<br>
<br>
> Cherryview and Broxton are always gt1. So, remove the redundant checks.<br>
><br>
> Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
> ---<br>
> src/intel/common/gen_l3_<wbr>config.c | 10 ++++------<br>
> 1 file changed, 4 insertions(+), 6 deletions(-)<br>
><br>
> diff --git a/src/intel/common/gen_l3_<wbr>config.c b/src/intel/common/gen_l3_<wbr>config.c<br>
> index 4fe3503..0720079 100644<br>
> --- a/src/intel/common/gen_l3_<wbr>config.c<br>
> +++ b/src/intel/common/gen_l3_<wbr>config.c<br>
> @@ -258,13 +258,11 @@ get_l3_way_size(const struct gen_device_info *devinfo)<br>
> if (devinfo->is_baytrail)<br>
> return 2;<br>
><br>
> - else if (devinfo->gt == 1 ||<br>
> - devinfo->is_cherryview ||<br>
> - devinfo->is_broxton)<br>
> - return 4;<br>
> + /* Cherryview and Broxton are always gt1 */<br>
> + if (devinfo->gt == 1)<br>
> + return 4;<br>
><br>
<br>
</span>I don't feel that replacing self-documenting code with equivalent<br>
non-self-documenting code plus a comment containing the same information<br>
as the code you removed actually simplifies anything. That said, this<br>
function *could* be simplified appreciably by using the l3_banks field<br>
you added to gen_device_info to calculate the way size consistently<br>
across all gens up to Gen10. Care to do that instead?<br></blockquote><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">I remember you made this suggestion about l3_banks field in an earlier</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">comment. I've it in my task queue.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> - else<br>
> - return 8 * devinfo->num_slices;<br>
> + return 8 * devinfo->num_slices;<br>
> }<br>
><br>
> /**<br>
> --<br>
> 2.9.3<br>
><br>
</span>> ______________________________<wbr>_________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div></div>