* [PATCH] checkpatch: don't require octal permissions for "0" in module_param
@ 2017-12-11 10:48 Bartosz Golaszewski
2017-12-13 13:18 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2017-12-11 10:48 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches, Andy Shevchenko
Cc: linux-kernel, Bartosz Golaszewski
File permissions set to "0" in the module_param family of macros mean
that the parameter should not show up in sysfs. Don't require octal
permissions in this case.
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 040aa79e1d9d..32c37f8bc143 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6303,7 +6303,7 @@ sub process {
if ($stat =~ /$test/) {
my $val = $1;
$val = $6 if ($skip_args ne "");
- if (($val =~ /^$Int$/ && $val !~ /^$Octal$/) ||
+ if (($func =~ /^module_param/ && $val ne "0" && $val =~ /^$Int$/ && $val !~ /^$Octal$/) ||
($val =~ /^$Octal$/ && length($val) ne 4)) {
ERROR("NON_OCTAL_PERMISSIONS",
"Use 4 digit octal (0777) not decimal permissions\n" . "$here\n" . $stat_real);
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] checkpatch: don't require octal permissions for "0" in module_param
2017-12-11 10:48 [PATCH] checkpatch: don't require octal permissions for "0" in module_param Bartosz Golaszewski
@ 2017-12-13 13:18 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2017-12-13 13:18 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches, Andy Shevchenko, Andrew Morton
Cc: Linux Kernel Mailing List, Bartosz Golaszewski
2017-12-11 11:48 GMT+01:00 Bartosz Golaszewski <brgl@bgdev.pl>:
> File permissions set to "0" in the module_param family of macros mean
> that the parameter should not show up in sysfs. Don't require octal
> permissions in this case.
>
> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
> ---
> scripts/checkpatch.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 040aa79e1d9d..32c37f8bc143 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -6303,7 +6303,7 @@ sub process {
> if ($stat =~ /$test/) {
> my $val = $1;
> $val = $6 if ($skip_args ne "");
> - if (($val =~ /^$Int$/ && $val !~ /^$Octal$/) ||
> + if (($func =~ /^module_param/ && $val ne "0" && $val =~ /^$Int$/ && $val !~ /^$Octal$/) ||
> ($val =~ /^$Octal$/ && length($val) ne 4)) {
> ERROR("NON_OCTAL_PERMISSIONS",
> "Use 4 digit octal (0777) not decimal permissions\n" . "$here\n" . $stat_real);
> --
> 2.15.1
>
Cc'ing Andrew Morton since checkpatch patches go through mm tree.
Thanks,
Bartosz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-13 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-11 10:48 [PATCH] checkpatch: don't require octal permissions for "0" in module_param Bartosz Golaszewski
2017-12-13 13:18 ` Bartosz Golaszewski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.