<div dir="ltr">David<div><br></div><div>I am having trouble getting the reference to "drm_global_mutex" to link correctly in drm/udl. The error is</div><div><br></div><div><div>ERROR: "drm_global_mutex" [drivers/gpu/drm/udl/udl.ko] undefined!</div><div>make[1]: *** [__modpost] Error 1</div><div>make: *** [modules] Error 2</div></div><div><br></div><div>This seems to be only accessed in the common drm code. Do you have a suggestion how to get around it?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 1:35 PM, David Herrmann <span dir="ltr"><<a href="mailto:dh.herrmann@gmail.com" target="_blank">dh.herrmann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<span class=""><br>
On Wed, Feb 10, 2016 at 9:51 PM, Haixia Shi <<a href="mailto:hshi@chromium.org">hshi@chromium.org</a>> wrote:<br>
>> This should rather be:<br>
>><br>
>>         drm_release(inode, filp);<br>
>>         mutex_lock(&drm_global_mutex);<br>
>>         if (!dev->open_count && udl_device_is_unplugged(dev))<br>
>>                 drm_put_dev(dev);<br>
>>         mutex_unlock(&drm_global_mutex);<br>
>><br>
>>         return 0;<br>
>><br>
>> There is no reason to look at the return code of drm_release(), ever.<br>
><br>
> But drm_release() does return a retcode. It would still make sense to return<br>
> that as-is in case any existing code relies on it.<br>
<br>
</span>Nobody should ever return error codes from fops.release(). It is<br>
completely bogus. You rather confuse generic user-space that calls<br>
close(), than getting any benefit out of it.<br>
<br>
But TBH, I don't care. Feel free to forward the return value. But<br>
still, please change the order of the calls as I did.<br>
<br>
Thanks<br>
<span class="HOEnZb"><font color="#888888">David<br>
</font></span></blockquote></div><br></div>