[linux-stable-rc:linux-3.18.y 2411/2632] include/linux/list.h:447:2: warning: this 'for' clause does not guard...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-3.18.y
head:   b5076139991c6b12c62346d9880eec1d4227d99f
commit: 677fa15cd6d5b0843e7b9c58409f67d656b1ec2f [2411/2632] compiler-gcc: integrate the various compiler-gcc[345].h files
config: i386-randconfig-s0-201625 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        git checkout 677fa15cd6d5b0843e7b9c58409f67d656b1ec2f
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/mutex.h:14:0,
                    from include/linux/seq_file.h:7,
                    from drivers/gpu/drm/i915/i915_debugfs.c:29:
   drivers/gpu/drm/i915/i915_debugfs.c: In function 'describe_obj':
>> include/linux/list.h:447:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for (pos = list_first_entry(head, typeof(*pos), member); \
     ^
>> drivers/gpu/drm/i915/i915_debugfs.c:144:2: note: in expansion of macro 'list_for_each_entry'
     list_for_each_entry(vma, &obj->vma_list, vma_link)
     ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/i915_debugfs.c:147:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
      seq_printf(m, " (pinned x %d)", pin_count);
      ^~~~~~~~~~
--
   drivers/video/fbdev/s3fb.c: In function 's3_pci_probe':
>> drivers/video/fbdev/s3fb.c:1185:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     par->state.vgabase = (void __iomem *) vga_res.start;
                          ^
--
   drivers/video/fbdev/arkfb.c: In function 'ark_pci_probe':
>> drivers/video/fbdev/arkfb.c:1019:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     par->state.vgabase = (void __iomem *) vga_res.start;
                          ^
--
>> net/core/sysctl_net_core.c:26:12: warning: 'one' defined but not used [-Wunused-variable]
    static int one = 1;
               ^~~

vim +/for +447 include/linux/list.h

37c42524 Denis V. Lunev 2007-10-16  431   * @pos:	the &struct list_head to use as a loop cursor.
37c42524 Denis V. Lunev 2007-10-16  432   * @n:		another &struct list_head to use as temporary storage
37c42524 Denis V. Lunev 2007-10-16  433   * @head:	the head for your list.
37c42524 Denis V. Lunev 2007-10-16  434   */
37c42524 Denis V. Lunev 2007-10-16  435  #define list_for_each_prev_safe(pos, n, head) \
37c42524 Denis V. Lunev 2007-10-16  436  	for (pos = (head)->prev, n = pos->prev; \
e66eed65 Linus Torvalds 2011-05-19  437  	     pos != (head); \
37c42524 Denis V. Lunev 2007-10-16  438  	     pos = n, n = pos->prev)
37c42524 Denis V. Lunev 2007-10-16  439  
37c42524 Denis V. Lunev 2007-10-16  440  /**
^1da177e Linus Torvalds 2005-04-16  441   * list_for_each_entry	-	iterate over list of given type
8e3a67a9 Randy Dunlap   2006-06-25  442   * @pos:	the type * to use as a loop cursor.
^1da177e Linus Torvalds 2005-04-16  443   * @head:	the head for your list.
^1da177e Linus Torvalds 2005-04-16  444   * @member:	the name of the list_struct within the struct.
^1da177e Linus Torvalds 2005-04-16  445   */
^1da177e Linus Torvalds 2005-04-16  446  #define list_for_each_entry(pos, head, member)				\
93be3c2e Oleg Nesterov  2013-11-12 @447  	for (pos = list_first_entry(head, typeof(*pos), member);	\
e66eed65 Linus Torvalds 2011-05-19  448  	     &pos->member != (head);					\
8120e2e5 Oleg Nesterov  2013-11-12  449  	     pos = list_next_entry(pos, member))
^1da177e Linus Torvalds 2005-04-16  450  
^1da177e Linus Torvalds 2005-04-16  451  /**
^1da177e Linus Torvalds 2005-04-16  452   * list_for_each_entry_reverse - iterate backwards over list of given type.
8e3a67a9 Randy Dunlap   2006-06-25  453   * @pos:	the type * to use as a loop cursor.
^1da177e Linus Torvalds 2005-04-16  454   * @head:	the head for your list.
^1da177e Linus Torvalds 2005-04-16  455   * @member:	the name of the list_struct within the struct.

:::::: The code at line 447 was first introduced by commit
:::::: 93be3c2eb3371f022ad88acf1ab6bee8e3c38378 list: introduce list_last_entry(), use list_{first,last}_entry()

:::::: TO: Oleg Nesterov <oleg@xxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]