summaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-04-14 12:10:50 -0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-04-22 11:36:11 +0200
commit01b2bafe57b19d9119413f138765ef57990921ce (patch)
tree67b559d6fe8ddc7b5547c3dd22121da545d30ec3 /include/crypto
parentae83d0b416db002fe95601e7f97f64b59514d936 (diff)
pnp: Use list_for_each_entry() instead of open coding
Aside from good practice, this avoids a warning from gcc 10: ./include/linux/kernel.h:997:3: warning: array subscript -31 is outside array bounds of ‘struct list_head[1]’ [-Warray-bounds] 997 | ((type *)(__mptr - offsetof(type, member))); }) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/list.h:493:2: note: in expansion of macro ‘container_of’ 493 | container_of(ptr, type, member) | ^~~~~~~~~~~~ ./include/linux/pnp.h:275:30: note: in expansion of macro ‘list_entry’ 275 | #define global_to_pnp_dev(n) list_entry(n, struct pnp_dev, global_list) | ^~~~~~~~~~ ./include/linux/pnp.h:281:11: note: in expansion of macro ‘global_to_pnp_dev’ 281 | (dev) != global_to_pnp_dev(&pnp_global); \ | ^~~~~~~~~~~~~~~~~ arch/x86/kernel/rtc.c:189:2: note: in expansion of macro ‘pnp_for_each_dev’ 189 | pnp_for_each_dev(dev) { Because the common code doesn't cast the starting list_head to the containing struct. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> [ rjw: Whitespace adjustments ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/crypto')
0 files changed, 0 insertions, 0 deletions