All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] x86/jump_label: Fix old-style declaration
@ 2019-12-25 11:45 YueHaibing
  2020-01-02  9:36 ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2019-12-25 11:45 UTC (permalink / raw)
  To: tglx, mingo, bp, hpa, x86; +Cc: linux-kernel, YueHaibing

Fix gcc warning:

arch/x86/kernel/jump_label.c:61:1: warning:
 inline is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 arch/x86/kernel/jump_label.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
index 9c4498e..5ba8477 100644
--- a/arch/x86/kernel/jump_label.c
+++ b/arch/x86/kernel/jump_label.c
@@ -58,7 +58,7 @@ __jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type,
 	return code;
 }
 
-static void inline __jump_label_transform(struct jump_entry *entry,
+static inline void __jump_label_transform(struct jump_entry *entry,
 					  enum jump_label_type type,
 					  int init)
 {
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] x86/jump_label: Fix old-style declaration
  2019-12-25 11:45 [PATCH -next] x86/jump_label: Fix old-style declaration YueHaibing
@ 2020-01-02  9:36 ` Borislav Petkov
  2020-02-27  5:45   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2020-01-02  9:36 UTC (permalink / raw)
  To: YueHaibing; +Cc: tglx, mingo, hpa, x86, linux-kernel

On Wed, Dec 25, 2019 at 07:45:00PM +0800, YueHaibing wrote:
> Fix gcc warning:
> 
> arch/x86/kernel/jump_label.c:61:1: warning:
>  inline is not at beginning of declaration [-Wold-style-declaration]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  arch/x86/kernel/jump_label.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
> index 9c4498e..5ba8477 100644
> --- a/arch/x86/kernel/jump_label.c
> +++ b/arch/x86/kernel/jump_label.c
> @@ -58,7 +58,7 @@ __jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type,
>  	return code;
>  }
>  
> -static void inline __jump_label_transform(struct jump_entry *entry,
> +static inline void __jump_label_transform(struct jump_entry *entry,
>  					  enum jump_label_type type,
>  					  int init)
>  {
> -- 

Looks not needed anymore:

$ test-apply.sh /tmp/yuehaibing.01
checking file arch/x86/kernel/jump_label.c
Hunk #1 FAILED at 58.
1 out of 1 hunk FAILED
Apply? (y/n) n
--merge? (y/n) y
patching file arch/x86/kernel/jump_label.c
Hunk #1 NOT MERGED at 67-71.
$ git diff
diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
index c1a8b9e71408..0a9e1dc65a3f 100644
--- a/arch/x86/kernel/jump_label.c
+++ b/arch/x86/kernel/jump_label.c
@@ -64,7 +64,11 @@ static void __jump_label_set_jump_code(struct jump_entry *entry,
                memcpy(code, ideal_nop, JUMP_LABEL_NOP_SIZE);
 }
 
+<<<<<<<
 static void __ref __jump_label_transform(struct jump_entry *entry,
+=======
+static inline void __jump_label_transform(struct jump_entry *entry,
+>>>>>>>
                                         enum jump_label_type type,
                                         int init)
 {

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] x86/jump_label: Fix old-style declaration
  2020-01-02  9:36 ` Borislav Petkov
@ 2020-02-27  5:45   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2020-02-27  5:45 UTC (permalink / raw)
  To: Borislav Petkov, YueHaibing; +Cc: tglx, mingo, hpa, x86, linux-kernel

On 1/2/20 1:36 AM, Borislav Petkov wrote:
> On Wed, Dec 25, 2019 at 07:45:00PM +0800, YueHaibing wrote:
>> Fix gcc warning:
>>
>> arch/x86/kernel/jump_label.c:61:1: warning:
>>  inline is not at beginning of declaration [-Wold-style-declaration]
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  arch/x86/kernel/jump_label.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
>> index 9c4498e..5ba8477 100644
>> --- a/arch/x86/kernel/jump_label.c
>> +++ b/arch/x86/kernel/jump_label.c
>> @@ -58,7 +58,7 @@ __jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type,
>>  	return code;
>>  }
>>  
>> -static void inline __jump_label_transform(struct jump_entry *entry,
>> +static inline void __jump_label_transform(struct jump_entry *entry,
>>  					  enum jump_label_type type,
>>  					  int init)
>>  {
>> -- 
> 
> Looks not needed anymore:

I still see the warning.
Also I wonder what tree you tested the patch against?
Please see below.

> $ test-apply.sh /tmp/yuehaibing.01
> checking file arch/x86/kernel/jump_label.c
> Hunk #1 FAILED at 58.
> 1 out of 1 hunk FAILED
> Apply? (y/n) n
> --merge? (y/n) y
> patching file arch/x86/kernel/jump_label.c
> Hunk #1 NOT MERGED at 67-71.
> $ git diff
> diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
> index c1a8b9e71408..0a9e1dc65a3f 100644
> --- a/arch/x86/kernel/jump_label.c
> +++ b/arch/x86/kernel/jump_label.c
> @@ -64,7 +64,11 @@ static void __jump_label_set_jump_code(struct jump_entry *entry,
>                 memcpy(code, ideal_nop, JUMP_LABEL_NOP_SIZE);
>  }
>  
> +<<<<<<<
>  static void __ref __jump_label_transform(struct jump_entry *entry,

What tree has __ref in it?  I don't see that in linux-next or in tip.


> +=======
> +static inline void __jump_label_transform(struct jump_entry *entry,
> +>>>>>>>
>                                          enum jump_label_type type,
>                                          int init)
>  {
> 

thanks.
-- 
~Randy


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-27  5:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25 11:45 [PATCH -next] x86/jump_label: Fix old-style declaration YueHaibing
2020-01-02  9:36 ` Borislav Petkov
2020-02-27  5:45   ` Randy Dunlap

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.