# git rev-parse -q --verify 1c06a6bb5ac88320f5c36c4ac200b4b53f8b3c46^{commit} 1c06a6bb5ac88320f5c36c4ac200b4b53f8b3c46 already have revision, skipping fetch # git checkout -q -f -B kisskb 1c06a6bb5ac88320f5c36c4ac200b4b53f8b3c46 # git clean -qxdf # < git log -1 # commit 1c06a6bb5ac88320f5c36c4ac200b4b53f8b3c46 # Author: Gustavo A. R. Silva # Date: Mon Jun 10 16:00:38 2019 -0500 # # libnvdimm, region: Use struct_size() helper in kzalloc() # # One of the more common cases of allocation size calculations is finding # the size of a structure that has a zero-sized array at the end, along # with memory for some number of elements for that array. For example: # # struct nd_region { # ... # struct nd_mapping mapping[0]; # }; # # instance = kzalloc(sizeof(struct nd_region) + sizeof(struct nd_mapping) * # count, GFP_KERNEL); # # Instead of leaving these open-coded and prone to type mistakes, we can # now use the new struct_size() helper: # # instance = kzalloc(struct_size(instance, mapping, ndr_desc->num_mappings), # GFP_KERNEL); # # This code was detected with the help of Coccinelle. # # Signed-off-by: Gustavo A. R. Silva # < /opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ld --version # < git log --format=%s --max-count=1 1c06a6bb5ac88320f5c36c4ac200b4b53f8b3c46 # < make -s -j 120 ARCH=arm O=/kisskb/build/gustavoars_versatile_defconfig_arm CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- versatile_defconfig # make -s -j 120 ARCH=arm O=/kisskb/build/gustavoars_versatile_defconfig_arm CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:338:21: note: 'pdeo' was declared here /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:194:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2591:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1852:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] Completed OK # rm -rf /kisskb/build/gustavoars_versatile_defconfig_arm # Build took: 0:00:23.447404