<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 style="margin-top:0;margin-bottom:0"></p>
<div>v1: replace casting to unsigned long with div64_ul</div>
<div><br>
</div>
<div>Change-Id: Ia48671ed0756bb73c7b4760a800bcb6f600cbef2</div>
<div>Signed-off-by: Slava Abramov <slava.abramov@amd.com></div>
<div>---</div>
<div> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++--</div>
<div> 1 file changed, 2 insertions(+), 2 deletions(-)</div>
<div><br>
</div>
<div>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c</div>
<div>index da1dc40b9b14..d5719b0fb82c 100644</div>
<div>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c</div>
<div>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c</div>
<div>@@ -764,8 +764,8 @@ static ssize_t amdgpu_ras_sysfs_badpages_read(struct file *f,</div>
<div> <span style="white-space:pre"> </span>struct amdgpu_device *adev = con->adev;</div>
<div> <span style="white-space:pre"> </span>const unsigned int element_size =</div>
<div> <span style="white-space:pre"> </span>sizeof("0xabcdabcd : 0x12345678 : R\n") - 1;</div>
<div>-<span style="white-space:pre"> </span>unsigned int start = (ppos + element_size - 1) / element_size;</div>
<div>-<span style="white-space:pre"> </span>unsigned int end = (ppos + count - 1) / element_size;</div>
<div>+<span style="white-space:pre"> </span>unsigned int start = div64_ul(ppos + element_size - 1, element_size);</div>
<div>+<span style="white-space:pre"> </span>unsigned int end = div64_ul(ppos + count - 1, element_size);</div>
<div> <span style="white-space:pre"> </span>ssize_t s = 0;</div>
<div> <span style="white-space:pre"> </span>struct ras_badpage *bps = NULL;</div>
<div> <span style="white-space:pre"> </span>unsigned int bps_count = 0;</div>
<div>-- </div>
<div>2.17.1</div>
<div><br>
</div>
<br>
<p></p>
</div>
</body>
</html>