[Linux-kernel-mentees] [PATCH] staging: rtl8723bs: replace symbolic permission with octal permission

Greg KH gregkh at linuxfoundation.org
Sat Jun 22 05:34:15 UTC 2019


On Fri, Jun 21, 2019 at 10:37:35PM +0530, Sushma Unnibhavi wrote:
> Resolved following checkpatch issue:
> WARNING: symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
> 
> Signed-off-by: Sushma Unnibhavi <sushmaunnibhavi425 at gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/rtw_proc.c b/drivers/staging/rtl8723bs/os_dep/rtw_proc.c
> index 5f950fda48ea..fd9dfb953ada 100644
> --- a/drivers/staging/rtl8723bs/os_dep/rtw_proc.c
> +++ b/drivers/staging/rtl8723bs/os_dep/rtw_proc.c
> @@ -21,7 +21,7 @@ inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_
>  {
>  	struct proc_dir_entry *entry;
>  
> -	entry = proc_mkdir_data(name, S_IRUGO|S_IXUGO, parent, data);
> +	entry = proc_mkdir_data(name, 0444|S_IXUGO, parent, data);

Don't mix/match these, either use symbolic permissions or octal
permissions, never both :)

thanks,

greg k-h


More information about the Linux-kernel-mentees mailing list