<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">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Trying with Christian's Gmail, as he still didn't receive previous emails.</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size: 11pt;"><b>From:</b> Das, Nirmoy <nirmoy.das@amd.com><br>
<b>Sent:</b> Friday, October 8, 2021 2:17 PM<br>
<b>To:</b> Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Cc:</b> dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; intel-gfx@lists.freedesktop.org <intel-gfx@lists.freedesktop.org>; Maarten Lankhorst <maarten.lankhorst@linux.intel.com>; Maxime Ripard <mripard@kernel.org>; Thomas Zimmermann <tzimmermann@suse.de>;
 David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Greg KH <gregkh@linuxfoundation.org>; Jani Nikula <jani.nikula@linux.intel.com><br>
<b>Subject:</b> Re: [Intel-gfx] [PATCH 1/5] dri: cleanup debugfs error handling</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Adding Christian as he didn't receive the full thread yet.<br>
<br>
<br>
On 10/8/2021 1:07 PM, Greg KH wrote:<br>
> On Fri, Oct 08, 2021 at 12:40:47PM +0300, Jani Nikula wrote:<br>
>> On Fri, 08 Oct 2021, Nirmoy Das <nirmoy.das@amd.com> wrote:<br>
>>> Debugfs API returns encoded error instead of NULL.<br>
>>> This patch cleanups drm debugfs error handling to<br>
>>> properly set dri and its minor's root dentry to NULL.<br>
>>><br>
>>> Also do not error out if dri/minor debugfs directory<br>
>>> creation fails as a debugfs error is not a fatal error.<br>
>> Cc: Greg<br>
>><br>
>> I thought this is the opposite of what Greg's been telling everyone to<br>
>> do with debugfs.<br>
> Yes, that is not good.<br>
><br>
> You should never care about the result of a debugfs_create* call.  Just<br>
> take the result, and if it is a directory, save it off to use it for<br>
> creating a file, no need to check anything.<br>
><br>
> And then throw it away, later, when you want to remove the directory,<br>
> look it up with a call to debugfs_lookup() and pass that to<br>
> debugfs_remove() (which does so recursively).<br>
><br>
> There should never be a need to save, or check, the result of any<br>
> debugfs call.  If so, odds are it is being used incorrectly.<br>
><br>
> thanks,<br>
><br>
> greg k-h<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>