<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Reviewed-by: Alex Xie <<span class="highlight" id="0.433518398008889" name="searchHitInReadingPane">AlexBin.Xie@amd.com</span>><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font color="#000000" face="Calibri, sans-serif" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Alex Deucher <alexdeucher@gmail.com><br>
<b>Sent:</b> Thursday, August 17, 2017 4:44 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Deucher, Alexander<br>
<b>Subject:</b> [PATCH] drm/amdgpu: fix a bogus warning</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Don't validate the default value. Prevents a needless<br>
warning. Also fix a spelling typo in the warning message.<br>
<br>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--<br>
1 file changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index 2554ddf..1a459ac 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -1077,8 +1077,9 @@ static void amdgpu_check_arguments(struct amdgpu_device *adev)<br>
}<br>
<br>
/* valid range is between 4 and 9 inclusive */<br>
- if (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4) {<br>
- dev_warn(adev->dev, "valid rang is between 4 and 9\n");<br>
+ if (amdgpu_vm_fragment_size != -1 &&<br>
+ (amdgpu_vm_fragment_size > 9 || amdgpu_vm_fragment_size < 4)) {<br>
+ dev_warn(adev->dev, "valid range is between 4 and 9\n");<br>
amdgpu_vm_fragment_size = -1;<br>
}<br>
<br>
-- <br>
2.5.5<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a id="LPlnk419353" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div id="LPBorder_GT_15030037728530.5153393889696549" style="width: 100%; text-indent: 0px; overflow: auto; margin-bottom: 20px;">
<table id="LPContainer_15030037728430.2494249700643958" role="presentation" style="width: 90%; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top-color: rgb(200, 200, 200); border-bottom-color: rgb(200, 200, 200); border-top-width: 1px; border-bottom-width: 1px; border-top-style: dotted; border-bottom-style: dotted; position: relative; background-color: rgb(255, 255, 255);" cellspacing="0">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15030037728460.275720586653841" style="padding: 0px; vertical-align: top; display: table-cell; position: relative;" colspan="2">
<div id="LPRemovePreviewContainer_15030037728460.2127731179166057"></div>
<div id="LPTitle_15030037728460.6198405029115783" style="top: 0px; color: rgb(0, 120, 215); line-height: 21px; font-family: "wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 21px; font-weight: 400;">
<a id="LPUrlAnchor_15030037728490.6208476016845332" style="text-decoration: none;" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank">amd-gfx Info Page - freedesktop.org</a></div>
<div id="LPMetadata_15030037728490.9838872304113444" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); line-height: 14px; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; font-weight: 400;">
lists.freedesktop.org</div>
<div id="LPDescription_15030037728510.22017633024383798" style="color: rgb(102, 102, 102); line-height: 20px; overflow: hidden; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; font-weight: 400; display: block; max-height: 100px;">
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>