Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1649452 > unrolled thread

Re: [PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()

Started byIan Abbott <abbotti@mev.co.uk>
First post2017-05-24 12:50 +0200
Last post2017-05-24 21:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v4 2/2] kernel.h: handle pointers to arrays better in  container_of() Ian Abbott <abbotti@mev.co.uk> - 2017-05-24 12:50 +0200
    Re: [PATCH v4 2/2] kernel.h: handle pointers to arrays better in  container_of() Andrew Morton <akpm@linux-foundation.org> - 2017-05-24 21:10 +0200

#1649452 — Re: [PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()

FromIan Abbott <abbotti@mev.co.uk>
Date2017-05-24 12:50 +0200
SubjectRe: [PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()
Message-ID<tKC1A-1db-7@gated-at.bofh.it>
On 24/05/17 01:54, kbuild test robot wrote:
> Hi Ian,
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.12-rc2 next-20170523]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url:    https://github.com/0day-ci/linux/commits/Ian-Abbott/asm-generic-bug-h-declare-struct-pt_regs-before-function-prototype/20170524-070310
> config: i386-allmodconfig (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386
>
> All error/warnings (new ones prefixed by >>):
>
>    In file included from include/linux/kernel.h:14:0,
>                     from include/asm-generic/bug.h:15,
>                     from arch/x86/include/asm/bug.h:81,
>                     from drivers/block/drbd/drbd_interval.c:1:
>>> include/linux/bug.h:103:47: warning: 'struct bug_entry' declared inside parameter list will not be visible outside of this definition or declaration
>     static inline int is_warning_bug(const struct bug_entry *bug)
>                                                   ^~~~~~~~~
>    include/linux/bug.h: In function 'is_warning_bug':
>>> include/linux/bug.h:105:12: error: dereferencing pointer to incomplete type 'const struct bug_entry'
>      return bug->flags & BUGFLAG_WARNING;
>                ^~
>
> vim +105 include/linux/bug.h
>
> ff20c2e0 Kirill A. Shutemov  2016-03-01   97
> 35edd910 Paul Gortmaker      2011-11-16   98  #endif	/* __CHECKER__ */
> 35edd910 Paul Gortmaker      2011-11-16   99
> 7664c5a1 Jeremy Fitzhardinge 2006-12-08  100  #ifdef CONFIG_GENERIC_BUG
> 7664c5a1 Jeremy Fitzhardinge 2006-12-08  101  #include <asm-generic/bug.h>
> 7664c5a1 Jeremy Fitzhardinge 2006-12-08  102
> 7664c5a1 Jeremy Fitzhardinge 2006-12-08 @103  static inline int is_warning_bug(const struct bug_entry *bug)
> 7664c5a1 Jeremy Fitzhardinge 2006-12-08  104  {
> 7664c5a1 Jeremy Fitzhardinge 2006-12-08 @105  	return bug->flags & BUGFLAG_WARNING;
> 7664c5a1 Jeremy Fitzhardinge 2006-12-08  106  }
> 7664c5a1 Jeremy Fitzhardinge 2006-12-08  107
> 19d43626 Peter Zijlstra      2017-02-25  108  struct bug_entry *find_bug(unsigned long bugaddr);
>
> :::::: The code at line 105 was first introduced by commit
> :::::: 7664c5a1da4711bb6383117f51b94c8dc8f3f1cd [PATCH] Generic BUG implementation
>
> :::::: TO: Jeremy Fitzhardinge <jeremy@goop.org>
> :::::: CC: Linus Torvalds <torvalds@woody.osdl.org>

This breakage occurs when <asm-generic/bug.h> is included before 
<include/linux.h> due to a circular dependancy I introduced with this 
commit.

It can be fixed by replacing the `#include <linux/kernel.h>` with 
`#include <linux/types.h>` in "include/asm-generic/bug.h".  I can send a 
patch to fix that, but ideally, it should be committed before this 
commit to avoid breakage during git bisect builds.  So my question is, 
should I send a single patch to fix this breakage, or resend the series 
of patches to incorporate this fix before the current commit?

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

[toc] | [next] | [standalone]


#1649869

FromAndrew Morton <akpm@linux-foundation.org>
Date2017-05-24 21:10 +0200
Message-ID<tKJPr-6hN-15@gated-at.bofh.it>
In reply to#1649452
On Wed, 24 May 2017 11:46:17 +0100 Ian Abbott <abbotti@mev.co.uk> wrote:

> This breakage occurs when <asm-generic/bug.h> is included before 
> <include/linux.h> due to a circular dependancy I introduced with this 
> commit.
> 
> It can be fixed by replacing the `#include <linux/kernel.h>` with 
> `#include <linux/types.h>` in "include/asm-generic/bug.h".  I can send a 
> patch to fix that, but ideally, it should be committed before this 
> commit to avoid breakage during git bisect builds.  So my question is, 
> should I send a single patch to fix this breakage, or resend the series 
> of patches to incorporate this fix before the current commit?

I expect a full resend would be best - that way the test robot should
be able to parse and retest it in the usual fashion.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web