Re: [B.A.T.M.A.N.] [PATCH 1086/1285] Replace numeric parameter like 0444 with macro
From: Sven Eckelmann
Date: Tue Aug 02 2016 - 09:48:27 EST
On Dienstag, 2. August 2016 20:15:13 CEST Baole Ni wrote:
[...]
> diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
> index 5f2974b..25759b9 100644
> --- a/net/batman-adv/main.c
> +++ b/net/batman-adv/main.c
> @@ -1313,7 +1313,7 @@ static struct kparam_string batadv_param_string_ra = {
> };
>
> module_param_cb(routing_algo, &batadv_param_ops_ra, &batadv_param_string_ra,
> - 0644);
> + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
> module_init(batadv_init);
> module_exit(batadv_exit);
Doesn't seem to apply on current net-next:
$ git am -3 16577.patch
Applying: Replace numeric parameter like 0444 with macro
Using index info to reconstruct a base tree...
M net/batman-adv/main.c
Falling back to patching base and 3-way merge...
Auto-merging net/batman-adv/main.c
CONFLICT (content): Merge conflict in net/batman-adv/main.c
error: Failed to merge in the changes.
Patch failed at 0001 Replace numeric parameter like 0444 with macro
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
The code for it can now be found at net/batman-adv/bat_algo.c
Also the prefix "batman-adv: " is missing in the subject and you should
include <linux/stat.h> in net/batman-adv/bat_algo.c to make sure that these
macros are actually defined before you use them.
So you would end up with something more like:
--- a/net/batman-adv/bat_algo.c
+++ b/net/batman-adv/bat_algo.c
@@ -22,6 +22,7 @@
#include <linux/moduleparam.h>
#include <linux/printk.h>
#include <linux/seq_file.h>
+#include <linux/stat.h>
#include <linux/stddef.h>
#include <linux/string.h>
@@ -137,4 +138,4 @@ static struct kparam_string batadv_param_string_ra = {
};
module_param_cb(routing_algo, &batadv_param_ops_ra, &batadv_param_string_ra,
- 0644);
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
Kind regards,
SvenAttachment:
signature.asc
Description: This is a digitally signed message part.