linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] tools/lib/lockdep: fixes for v4.15
@ 2017-12-07 16:11 alexander.levin
  2017-12-07 16:11 ` [PATCH 1/2] tools/lib/lockdep: Add missing declaration of 'pr_cont()' alexander.levin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: alexander.levin @ 2017-12-07 16:11 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

The following changes since commit dabe589657ad0f9a0d6f4101e2171574f74b00bf:

  Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2017-12-06 15:20:51 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux.git liblockdep-fixes

for you to fetch changes up to 97897d4c145c1e8431de28dc707dc0eda2e77037:

  tools/lib/lockdep: add empty declaration for early_param (2017-12-06 22:37:52 -0500)

----------------------------------------------------------------
Mengting Zhang (1):
      tools/lib/lockdep: Add missing declaration of 'pr_cont()'

Sasha Levin (1):
      tools/lib/lockdep: add empty declaration for early_param

 tools/include/linux/kernel.h  | 2 ++
 tools/include/linux/lockdep.h | 1 +
 2 files changed, 3 insertions(+)

Mengting Zhang (1):
  tools/lib/lockdep: Add missing declaration of 'pr_cont()'

Sasha Levin (1):
  tools/lib/lockdep: add empty declaration for early_param

 tools/include/linux/kernel.h  | 2 ++
 tools/include/linux/lockdep.h | 1 +
 2 files changed, 3 insertions(+)

-- 
2.11.0

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

* [PATCH 1/2] tools/lib/lockdep: Add missing declaration of 'pr_cont()'
  2017-12-07 16:11 [PATCH 0/2] tools/lib/lockdep: fixes for v4.15 alexander.levin
@ 2017-12-07 16:11 ` alexander.levin
  2017-12-08  6:19   ` Ingo Molnar
  2017-12-07 16:11 ` [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param alexander.levin
  2017-12-08  6:07 ` [PATCH 0/2] tools/lib/lockdep: fixes for v4.15 Ingo Molnar
  2 siblings, 1 reply; 10+ messages in thread
From: alexander.levin @ 2017-12-07 16:11 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

From: Mengting Zhang <zhangmengting@huawei.com>

An annoying compile warning due to missing declaration is shown below:
In file included from lockdep.c:27:0:
../../../kernel/locking/lockdep.c: In function 'print_unlock_imbalance_bug' :
../../../kernel/locking/lockdep.c:3544:2: warning: implicit declaration of function 'pr_cont' [-Wimplicit-function-declaration]
  pr_cont(") at:\n");
  ^
Adding the declaration of 'pr_cont' fixes the problem.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Mengting Zhang <zhangmengting@huawei.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 tools/include/linux/lockdep.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/include/linux/lockdep.h b/tools/include/linux/lockdep.h
index 940c1b075659..6b0c36a58fcb 100644
--- a/tools/include/linux/lockdep.h
+++ b/tools/include/linux/lockdep.h
@@ -48,6 +48,7 @@ static inline int debug_locks_off(void)
 #define printk(...) dprintf(STDOUT_FILENO, __VA_ARGS__)
 #define pr_err(format, ...) fprintf (stderr, format, ## __VA_ARGS__)
 #define pr_warn pr_err
+#define pr_cont pr_err
 
 #define list_del_rcu list_del
 
-- 
2.11.0

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

* [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param
  2017-12-07 16:11 [PATCH 0/2] tools/lib/lockdep: fixes for v4.15 alexander.levin
  2017-12-07 16:11 ` [PATCH 1/2] tools/lib/lockdep: Add missing declaration of 'pr_cont()' alexander.levin
@ 2017-12-07 16:11 ` alexander.levin
  2017-12-08  6:09   ` Ingo Molnar
  2017-12-08  6:07 ` [PATCH 0/2] tools/lib/lockdep: fixes for v4.15 Ingo Molnar
  2 siblings, 1 reply; 10+ messages in thread
From: alexander.levin @ 2017-12-07 16:11 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel

Fixes a compilation error:

  CC       lockdep.o
In file included from lockdep.c:28:0:
../../../kernel/locking/lockdep.c:89:13: error: expected declaration specifiers or ‘...’ before string constant
 early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
             ^~~~~~~~~~~~~~~~~~~~~~~~
../../../kernel/locking/lockdep.c:89:39: error: expected declaration specifiers or ‘...’ before ‘allow_crossrelease_fullstack’
 early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 tools/include/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
index 0ad884452c5c..2bd8c1fc4a03 100644
--- a/tools/include/linux/kernel.h
+++ b/tools/include/linux/kernel.h
@@ -117,4 +117,6 @@ int scnprintf(char * buf, size_t size, const char * fmt, ...);
 #define current_gfp_context(k) 0
 #define synchronize_sched()
 
+#define early_param(str, fn)
+
 #endif
-- 
2.11.0

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

* Re: [PATCH 0/2] tools/lib/lockdep: fixes for v4.15
  2017-12-07 16:11 [PATCH 0/2] tools/lib/lockdep: fixes for v4.15 alexander.levin
  2017-12-07 16:11 ` [PATCH 1/2] tools/lib/lockdep: Add missing declaration of 'pr_cont()' alexander.levin
  2017-12-07 16:11 ` [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param alexander.levin
@ 2017-12-08  6:07 ` Ingo Molnar
  2 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2017-12-08  6:07 UTC (permalink / raw)
  To: alexander.levin; +Cc: linux-kernel, Peter Zijlstra


* alexander.levin@verizon.com <alexander.levin@verizon.com> wrote:

> The following changes since commit dabe589657ad0f9a0d6f4101e2171574f74b00bf:
> 
>   Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2017-12-06 15:20:51 -0800)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux.git liblockdep-fixes
> 
> for you to fetch changes up to 97897d4c145c1e8431de28dc707dc0eda2e77037:
> 
>   tools/lib/lockdep: add empty declaration for early_param (2017-12-06 22:37:52 -0500)
> 
> ----------------------------------------------------------------
> Mengting Zhang (1):
>       tools/lib/lockdep: Add missing declaration of 'pr_cont()'
> 
> Sasha Levin (1):
>       tools/lib/lockdep: add empty declaration for early_param
> 
>  tools/include/linux/kernel.h  | 2 ++
>  tools/include/linux/lockdep.h | 1 +
>  2 files changed, 3 insertions(+)
> 
> Mengting Zhang (1):
>   tools/lib/lockdep: Add missing declaration of 'pr_cont()'
> 
> Sasha Levin (1):
>   tools/lib/lockdep: add empty declaration for early_param
> 
>  tools/include/linux/kernel.h  | 2 ++
>  tools/include/linux/lockdep.h | 1 +
>  2 files changed, 3 insertions(+)

There's this build warning as well:

 triton:~/tip/tools/lib/lockdep> make
   CC       common.o
   CC       lockdep.o
 In file included from lockdep.c:28:0:
 ../../../kernel/locking/lockdep.c:83:19: warning: ‘allow_crossrelease_fullstack’  defined but not used [-Wunused-function]
  static int __init allow_crossrelease_fullstack(char *str)
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

GCC 7.2.0.

Thanks,

	Ingo

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

* Re: [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param
  2017-12-07 16:11 ` [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param alexander.levin
@ 2017-12-08  6:09   ` Ingo Molnar
  2017-12-08  6:20     ` Ingo Molnar
  0 siblings, 1 reply; 10+ messages in thread
From: Ingo Molnar @ 2017-12-08  6:09 UTC (permalink / raw)
  To: alexander.levin; +Cc: linux-kernel, Peter Zijlstra


* alexander.levin@verizon.com <alexander.levin@verizon.com> wrote:

> Fixes a compilation error:
> 
>   CC       lockdep.o
> In file included from lockdep.c:28:0:
> ../../../kernel/locking/lockdep.c:89:13: error: expected declaration specifiers or ‘...’ before string constant
>  early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
>              ^~~~~~~~~~~~~~~~~~~~~~~~
> ../../../kernel/locking/lockdep.c:89:39: error: expected declaration specifiers or ‘...’ before ‘allow_crossrelease_fullstack’
>  early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
>                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ugh, this changelog was in DOS format (had extra \r's) - how did that happen?

Fixed it up.

Thanks,

	Ingo

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

* Re: [PATCH 1/2] tools/lib/lockdep: Add missing declaration of 'pr_cont()'
  2017-12-07 16:11 ` [PATCH 1/2] tools/lib/lockdep: Add missing declaration of 'pr_cont()' alexander.levin
@ 2017-12-08  6:19   ` Ingo Molnar
  0 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2017-12-08  6:19 UTC (permalink / raw)
  To: alexander.levin; +Cc: linux-kernel


* alexander.levin@verizon.com <alexander.levin@verizon.com> wrote:

> From: Mengting Zhang <zhangmengting@huawei.com>
> 
> An annoying compile warning due to missing declaration is shown below:
> In file included from lockdep.c:27:0:
> ../../../kernel/locking/lockdep.c: In function 'print_unlock_imbalance_bug' :
> ../../../kernel/locking/lockdep.c:3544:2: warning: implicit declaration of function 'pr_cont' [-Wimplicit-function-declaration]
>   pr_cont(") at:\n");
>   ^

All build warnings are annoying, please formulate this in a more neutral fashion.

Also, please separate the compiler splat from the changelog text with an empty 
line, and align it vertically as well so that it seprates more.

Please do this for the second patch as well, and try to harmonize the style of the 
changelogs.

This is an example of a clean changelog that fixes a build warning:

commit 1b3b5219abfd6a214e99018747e9fe98514b43ca
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date:   Mon Nov 27 12:18:23 2017 -0300

    tools headers: Syncronize mman.h ABI header
    
    To add support for the MAP_SYNC flag introduced in:
    
      b6fb293f2497 ("mm: Define MAP_SYNC and VM_SYNC flags")
    
    Update tools/perf/trace/beauty/mmap.c to support that flag.
    
    This silences this perf build warning:
    
      Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman.h' differs from latest version at 'include/uapi/asm-generic/mman.h'
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: https://lkml.kernel.org/n/tip-14zyk3iywrj37c7g1eagmzbo@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Thanks,

	Ingo

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

* Re: [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param
  2017-12-08  6:09   ` Ingo Molnar
@ 2017-12-08  6:20     ` Ingo Molnar
  2017-12-08 14:03       ` alexander.levin
  0 siblings, 1 reply; 10+ messages in thread
From: Ingo Molnar @ 2017-12-08  6:20 UTC (permalink / raw)
  To: alexander.levin; +Cc: linux-kernel, Peter Zijlstra


* Ingo Molnar <mingo@kernel.org> wrote:

> 
> * alexander.levin@verizon.com <alexander.levin@verizon.com> wrote:
> 
> > Fixes a compilation error:
> > 
> >   CC       lockdep.o
> > In file included from lockdep.c:28:0:
> > ../../../kernel/locking/lockdep.c:89:13: error: expected declaration specifiers or ‘...’ before string constant
> >  early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
> >              ^~~~~~~~~~~~~~~~~~~~~~~~
> > ../../../kernel/locking/lockdep.c:89:39: error: expected declaration specifiers or ‘...’ before ‘allow_crossrelease_fullstack’
> >  early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
> >                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Ugh, this changelog was in DOS format (had extra \r's) - how did that happen?

Hm, so it's because the second patch email was sent as as a base64 encoded email:

  Content-Transfer-Encoding: base64

totally not recommended and git-send-email will not do that - what happened?

> 
> Fixed it up.

Actually, could you please resend the whole series, with a fix for the other 
warning I reported added, with the changelogs fixed, and not MIME encoded?

Thanks,

	Ingo

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

* Re: [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param
  2017-12-08  6:20     ` Ingo Molnar
@ 2017-12-08 14:03       ` alexander.levin
  2017-12-11 14:45         ` Ingo Molnar
  0 siblings, 1 reply; 10+ messages in thread
From: alexander.levin @ 2017-12-08 14:03 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Peter Zijlstra

On Fri, Dec 08, 2017 at 07:20:10AM +0100, Ingo Molnar wrote:
>
>* Ingo Molnar <mingo@kernel.org> wrote:
>
>>
>> * alexander.levin@verizon.com <alexander.levin@verizon.com> wrote:
>>
>> > Fixes a compilation error:
>> >
>> >   CC       lockdep.o
>> > In file included from lockdep.c:28:0:
>> > ../../../kernel/locking/lockdep.c:89:13: error: expected declaration specifiers or ‘...’ before string constant
>> >  early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
>> >              ^~~~~~~~~~~~~~~~~~~~~~~~
>> > ../../../kernel/locking/lockdep.c:89:39: error: expected declaration specifiers or ‘...’ before ‘allow_crossrelease_fullstack’
>> >  early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
>> >                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Ugh, this changelog was in DOS format (had extra \r's) - how did that happen?
>
>Hm, so it's because the second patch email was sent as as a base64 encoded email:
>
>  Content-Transfer-Encoding: base64
>
>totally not recommended and git-send-email will not do that - what happened?

I'm not sure, this was sent using git-send-email...

>>
>> Fixed it up.
>
>Actually, could you please resend the whole series, with a fix for the other
>warning I reported added, with the changelogs fixed, and not MIME encoded?

Sure!

-- 

Thanks,
Sasha

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

* Re: [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param
  2017-12-08 14:03       ` alexander.levin
@ 2017-12-11 14:45         ` Ingo Molnar
  0 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2017-12-11 14:45 UTC (permalink / raw)
  To: alexander.levin; +Cc: linux-kernel, Peter Zijlstra


* alexander.levin@verizon.com <alexander.levin@verizon.com> wrote:

> On Fri, Dec 08, 2017 at 07:20:10AM +0100, Ingo Molnar wrote:
> >
> >* Ingo Molnar <mingo@kernel.org> wrote:
> >
> >>
> >> * alexander.levin@verizon.com <alexander.levin@verizon.com> wrote:
> >>
> >> > Fixes a compilation error:
> >> >
> >> >   CC       lockdep.o
> >> > In file included from lockdep.c:28:0:
> >> > ../../../kernel/locking/lockdep.c:89:13: error: expected declaration specifiers or ‘...’ before string constant
> >> >  early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
> >> >              ^~~~~~~~~~~~~~~~~~~~~~~~
> >> > ../../../kernel/locking/lockdep.c:89:39: error: expected declaration specifiers or ‘...’ before ‘allow_crossrelease_fullstack’
> >> >  early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
> >> >                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>
> >> Ugh, this changelog was in DOS format (had extra \r's) - how did that happen?
> >
> >Hm, so it's because the second patch email was sent as as a base64 encoded email:
> >
> >  Content-Transfer-Encoding: base64
> >
> >totally not recommended and git-send-email will not do that - what happened?
> 
> I'm not sure, this was sent using git-send-email...

Weird - will let you know if it happens again.

Thanks,

	Ingo

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

* [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param
  2017-12-12 18:16 [GIT PULL " alexander.levin
@ 2017-12-12 18:16 ` alexander.levin
  0 siblings, 0 replies; 10+ messages in thread
From: alexander.levin @ 2017-12-12 18:16 UTC (permalink / raw)
  To: mingo; +Cc: a.p.zijlstra, linux-kernel

Commit d141babe4244 ("locking/lockdep: Add a boot parameter allowing
unwind in cross-release and disable it by default") has added a boot
time param to allow recording full stack traces in cross-release.

However, the commit used early_param() which wasn't wrapped in the
userspace headers, causing the following compilation error:

	../../../kernel/locking/lockdep.c:89:13: error: expected declaration specifiers or ‘...’ before string constant

Fix it by creating a dummy declaration that uses the function pointer
to avoid declared but not used warnings.

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 tools/include/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h
index 0ad884452c5c..6d61a1a6c1d2 100644
--- a/tools/include/linux/kernel.h
+++ b/tools/include/linux/kernel.h
@@ -117,4 +117,6 @@ int scnprintf(char * buf, size_t size, const char * fmt, ...);
 #define current_gfp_context(k) 0
 #define synchronize_sched()
 
+#define early_param(str, fn) void __used *dummy##fn = fn;
+
 #endif
-- 
2.11.0

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

end of thread, other threads:[~2017-12-12 18:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 16:11 [PATCH 0/2] tools/lib/lockdep: fixes for v4.15 alexander.levin
2017-12-07 16:11 ` [PATCH 1/2] tools/lib/lockdep: Add missing declaration of 'pr_cont()' alexander.levin
2017-12-08  6:19   ` Ingo Molnar
2017-12-07 16:11 ` [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param alexander.levin
2017-12-08  6:09   ` Ingo Molnar
2017-12-08  6:20     ` Ingo Molnar
2017-12-08 14:03       ` alexander.levin
2017-12-11 14:45         ` Ingo Molnar
2017-12-08  6:07 ` [PATCH 0/2] tools/lib/lockdep: fixes for v4.15 Ingo Molnar
2017-12-12 18:16 [GIT PULL " alexander.levin
2017-12-12 18:16 ` [PATCH 2/2] tools/lib/lockdep: add empty declaration for early_param alexander.levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).