lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da7e44fac65b2c73c9f1000a2c1d9c75d931a9d7.camel@vmware.com>
Date:   Wed, 6 Sep 2023 21:13:49 +0000
From:   Zack Rusin <zackr@...are.com>
To:     "daniel@...ll.ch" <daniel@...ll.ch>,
        "maarten.lankhorst@...ux.intel.com" 
        <maarten.lankhorst@...ux.intel.com>,
        "mripard@...nel.org" <mripard@...nel.org>,
        "juntong.deng@...look.com" <juntong.deng@...look.com>,
        "airlied@...il.com" <airlied@...il.com>,
        "tzimmermann@...e.de" <tzimmermann@...e.de>,
        Linux-graphics-maintainer <Linux-graphics-maintainer@...are.com>
CC:     "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel-mentees@...ts.linuxfoundation.org" 
        <linux-kernel-mentees@...ts.linuxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm: Rename drm_ioctl_flags() to eliminate duplicate
 declaration warning

On Thu, 2023-09-07 at 00:45 +0800, Juntong Deng wrote:
> There are 'enum drm_ioctl_flags' and 'bool drm_ioctl_flags(...)' with the
> same name, which is not a problem in C, but it can lead to
> 'WARNING: Duplicate C declaration' when generating documentation.
> 
> According to the purpose of the function, rename 'drm_ioctl_flags(...)' to
> 'drm_check_ioctl_flags(...)' to eliminate the warning.
> 
> Signed-off-by: Juntong Deng <juntong.deng@...look.com>
> ---
>  drivers/gpu/drm/drm_ioctl.c         | 6 +++---
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +-
>  include/drm/drm_ioctl.h             | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index f03ffbacfe9b..30699a0a10bc 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -911,7 +911,7 @@ long drm_ioctl(struct file *filp,
>  EXPORT_SYMBOL(drm_ioctl);
>  
>  /**
> - * drm_ioctl_flags - Check for core ioctl and return ioctl permission flags
> + * drm_check_ioctl_flags - Check for core ioctl and return ioctl permission flags
>   * @nr: ioctl number
>   * @flags: where to return the ioctl permission flags
>   *
> @@ -922,7 +922,7 @@ EXPORT_SYMBOL(drm_ioctl);
>   * Returns:
>   * True if the @nr corresponds to a DRM core ioctl number, false otherwise.
>   */
> -bool drm_ioctl_flags(unsigned int nr, unsigned int *flags)
> +bool drm_check_ioctl_flags(unsigned int nr, unsigned int *flags)
>  {

Can we follow the namespace_action naming convention here? i.e.
drm_ioctl_flags_check instead. I find it a lot easier to look up/memorise the api if
naming is consistent.

z

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ