• Desmond Cheong Zhi Xi's avatar
    drm: clean up unused kerneldoc in drm_lease.c · 676f11b5
    Desmond Cheong Zhi Xi authored
    The kerneldoc in drm_lease.c is unused because none of the functions
    are driver interfaces as the symbols are not exported.
    
    Since they aren't used and much of the existing comments don't provide
    any insights (e.g. they just repeat the function name or list out the
    function parameters), they should be removed to make them easier to
    maintain and to make useful info more obvious.
    
    As a note, many of the comments mention whether idr_mutex should be
    held, but these are mostly redundant in cases where the function
    contains lockdep assertions or grabs the mutex.
    
    To simplify review, here's the reasoning behind each update.
    
    drm_lease_owner:
    function name is self-descriptive
    
    _drm_find_lessee:
    function name is self-descriptive
    
    _drm_lease_held_master:
    function name and signature are self-descriptive
    
    _drm_has_leased:
    kerneldoc is summarized into a comment because the function name could
    be interpreted ambiguously (check if the object has been leased VS
    check if the master has a lease on the object)
    
    _drm_lease_held:
    Retain the idr_mutex comment because the function does not directly
    grab the mutex or use a lockdep assertion.
    Otherwise, the function name is self-descriptive.
    
    drm_lease_held:
    function name is self-descriptive
    
    drm_lease_filter_crtcs:
    Kerneldoc is summarized into a comment because the function name could
    be interpreted ambiguously (filter leases based on crtcs mask VS
    filter crtcs mask based on leases)
    
    drm_lease_create:
    Kerneldoc removed.
    Useful function details such as atomic leasing are retained.
    Errno interpretations are useful and retained.
    
    drm_lease_destroy:
    function name is self-descriptive. Additional information is also
    removed as they're already present as comments inside the function.
    
    _drm_lease_revoke:
    function name is self-descriptive
    
    drm_lease_revoke:
    function name is self-descriptive
    
    drm_mode_create_lease_ioctl:
    Kerneldoc removed, but useful function details retained.
    
    drm_mode_list_lessees_ioctl:
    function name is self-descriptive. Additional details restate what the
    code does.
    
    drm_mode_get_lease_ioctl:
    Function summary retained to clarify that it's the leased objects that
    are returned, not the lease structure.
    
    drm_mode_revoke_lease_ioctl:
    Kerneldoc removed, but useful function details retained.
    Signed-off-by: default avatarDesmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210730051759.1570630-1-desmondcheongzx@gmail.com
    676f11b5
drm_lease.c 19.5 KB