lkml.org 
[lkml]   [2021]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v10] mm: slub: move sysfs slab alloc/free interfaces to debugfs
    Hi Faiyaz,

    Thank you for the patch! Perhaps something to improve:

    [auto build test WARNING on v5.13-rc4]
    [cannot apply to hnaz-linux-mm/master next-20210604]
    [If your patch is applied to the wrong git tree, kindly drop us a note.
    And when submitting patch, we suggest to use '--base' as documented in
    https://git-scm.com/docs/git-format-patch]

    url: https://github.com/0day-ci/linux/commits/Faiyaz-Mohammed/mm-slub-move-sysfs-slab-alloc-free-interfaces-to-debugfs/20210607-001659
    base: 8124c8a6b35386f73523d27eacb71b5364a68c4c
    config: sparc-randconfig-r003-20210606 (attached as .config)
    compiler: sparc64-linux-gcc (GCC) 9.3.0
    reproduce (this is a W=1 build):
    wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
    chmod +x ~/bin/make.cross
    # https://github.com/0day-ci/linux/commit/f7385626eb41e6154132519bd9b836f91eb7f93c
    git remote add linux-review https://github.com/0day-ci/linux
    git fetch --no-tags linux-review Faiyaz-Mohammed/mm-slub-move-sysfs-slab-alloc-free-interfaces-to-debugfs/20210607-001659
    git checkout f7385626eb41e6154132519bd9b836f91eb7f93c
    # save the attached .config to linux build tree
    COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc

    If you fix the issue, kindly add following tag as appropriate
    Reported-by: kernel test robot <lkp@intel.com>

    All warnings (new ones prefixed by >>):

    In file included from include/linux/preempt.h:11,
    from include/linux/spinlock.h:51,
    from include/linux/mmzone.h:8,
    from include/linux/gfp.h:6,
    from include/linux/mm.h:10,
    from mm/slub.c:13:
    mm/slub.c: In function 'slab_debug_trace_open':
    >> include/linux/list.h:628:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    628 | for (pos = list_first_entry(head, typeof(*pos), member); \
    | ^~~
    mm/slub.c:5863:3: note: in expansion of macro 'list_for_each_entry'
    5863 | list_for_each_entry(page, &n->full, slab_list)
    | ^~~~~~~~~~~~~~~~~~~
    mm/slub.c:5865:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    5865 | spin_unlock_irqrestore(&n->list_lock, flags);
    | ^~~~~~~~~~~~~~~~~~~~~~


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

    6d7581e62f8be4 Jiri Pirko 2013-05-29 548
    008208c6b26f21 Oleg Nesterov 2013-11-12 549 /**
    008208c6b26f21 Oleg Nesterov 2013-11-12 550 * list_next_entry - get the next element in list
    008208c6b26f21 Oleg Nesterov 2013-11-12 551 * @pos: the type * to cursor
    3943f42c11896c Andrey Utkin 2014-11-14 552 * @member: the name of the list_head within the struct.
    008208c6b26f21 Oleg Nesterov 2013-11-12 553 */
    008208c6b26f21 Oleg Nesterov 2013-11-12 554 #define list_next_entry(pos, member) \
    008208c6b26f21 Oleg Nesterov 2013-11-12 555 list_entry((pos)->member.next, typeof(*(pos)), member)
    008208c6b26f21 Oleg Nesterov 2013-11-12 556
    008208c6b26f21 Oleg Nesterov 2013-11-12 557 /**
    008208c6b26f21 Oleg Nesterov 2013-11-12 558 * list_prev_entry - get the prev element in list
    008208c6b26f21 Oleg Nesterov 2013-11-12 559 * @pos: the type * to cursor
    3943f42c11896c Andrey Utkin 2014-11-14 560 * @member: the name of the list_head within the struct.
    008208c6b26f21 Oleg Nesterov 2013-11-12 561 */
    008208c6b26f21 Oleg Nesterov 2013-11-12 562 #define list_prev_entry(pos, member) \
    008208c6b26f21 Oleg Nesterov 2013-11-12 563 list_entry((pos)->member.prev, typeof(*(pos)), member)
    008208c6b26f21 Oleg Nesterov 2013-11-12 564
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 565 /**
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 566 * list_for_each - iterate over a list
    8e3a67a99231f9 Randy Dunlap 2006-06-25 567 * @pos: the &struct list_head to use as a loop cursor.
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 568 * @head: the head for your list.
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 569 */
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 570 #define list_for_each(pos, head) \
    e66eed651fd18a Linus Torvalds 2011-05-19 571 for (pos = (head)->next; pos != (head); pos = pos->next)
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 572
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 573 /**
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 574 * list_for_each_continue - continue iteration over a list
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 575 * @pos: the &struct list_head to use as a loop cursor.
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 576 * @head: the head for your list.
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 577 *
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 578 * Continue to iterate over a list, continuing after the current position.
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 579 */
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 580 #define list_for_each_continue(pos, head) \
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 581 for (pos = pos->next; pos != (head); pos = pos->next)
    28ca0d6d39ab1d Pavel Begunkov 2019-11-29 582
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 583 /**
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 584 * list_for_each_prev - iterate over a list backwards
    8e3a67a99231f9 Randy Dunlap 2006-06-25 585 * @pos: the &struct list_head to use as a loop cursor.
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 586 * @head: the head for your list.
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 587 */
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 588 #define list_for_each_prev(pos, head) \
    e66eed651fd18a Linus Torvalds 2011-05-19 589 for (pos = (head)->prev; pos != (head); pos = pos->prev)
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 590
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 591 /**
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 592 * list_for_each_safe - iterate over a list safe against removal of list entry
    8e3a67a99231f9 Randy Dunlap 2006-06-25 593 * @pos: the &struct list_head to use as a loop cursor.
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 594 * @n: another &struct list_head to use as temporary storage
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 595 * @head: the head for your list.
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 596 */
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 597 #define list_for_each_safe(pos, n, head) \
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 598 for (pos = (head)->next, n = pos->next; pos != (head); \
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 599 pos = n, n = pos->next)
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 600
    37c42524d60906 Denis V. Lunev 2007-10-16 601 /**
    8f731f7d83d6c6 Randy Dunlap 2007-10-18 602 * list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry
    37c42524d60906 Denis V. Lunev 2007-10-16 603 * @pos: the &struct list_head to use as a loop cursor.
    37c42524d60906 Denis V. Lunev 2007-10-16 604 * @n: another &struct list_head to use as temporary storage
    37c42524d60906 Denis V. Lunev 2007-10-16 605 * @head: the head for your list.
    37c42524d60906 Denis V. Lunev 2007-10-16 606 */
    37c42524d60906 Denis V. Lunev 2007-10-16 607 #define list_for_each_prev_safe(pos, n, head) \
    37c42524d60906 Denis V. Lunev 2007-10-16 608 for (pos = (head)->prev, n = pos->prev; \
    e66eed651fd18a Linus Torvalds 2011-05-19 609 pos != (head); \
    37c42524d60906 Denis V. Lunev 2007-10-16 610 pos = n, n = pos->prev)
    37c42524d60906 Denis V. Lunev 2007-10-16 611
    e130816164e244 Andy Shevchenko 2020-10-15 612 /**
    e130816164e244 Andy Shevchenko 2020-10-15 613 * list_entry_is_head - test if the entry points to the head of the list
    e130816164e244 Andy Shevchenko 2020-10-15 614 * @pos: the type * to cursor
    e130816164e244 Andy Shevchenko 2020-10-15 615 * @head: the head for your list.
    e130816164e244 Andy Shevchenko 2020-10-15 616 * @member: the name of the list_head within the struct.
    e130816164e244 Andy Shevchenko 2020-10-15 617 */
    e130816164e244 Andy Shevchenko 2020-10-15 618 #define list_entry_is_head(pos, head, member) \
    e130816164e244 Andy Shevchenko 2020-10-15 619 (&pos->member == (head))
    e130816164e244 Andy Shevchenko 2020-10-15 620
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 621 /**
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 622 * list_for_each_entry - iterate over list of given type
    8e3a67a99231f9 Randy Dunlap 2006-06-25 623 * @pos: the type * to use as a loop cursor.
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 624 * @head: the head for your list.
    3943f42c11896c Andrey Utkin 2014-11-14 625 * @member: the name of the list_head within the struct.
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 626 */
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 627 #define list_for_each_entry(pos, head, member) \
    93be3c2eb3371f Oleg Nesterov 2013-11-12 @628 for (pos = list_first_entry(head, typeof(*pos), member); \
    e130816164e244 Andy Shevchenko 2020-10-15 629 !list_entry_is_head(pos, head, member); \
    8120e2e5141a42 Oleg Nesterov 2013-11-12 630 pos = list_next_entry(pos, member))
    ^1da177e4c3f41 Linus Torvalds 2005-04-16 631

    ---
    0-DAY CI Kernel Test Service, Intel Corporation
    https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
    [unhandled content-type:application/gzip]
    \
     
     \ /
      Last update: 2021-06-06 20:46    [W:2.694 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site