# 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/i386-linux/bin/i386-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/i386-linux/bin/i386-linux-ld --version # < git log --format=%s --max-count=1 1c06a6bb5ac88320f5c36c4ac200b4b53f8b3c46 # < make -s -j 48 ARCH=i386 O=/kisskb/build/gustavoars_i386-allnoconfig_i386 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/i386-linux/bin/i386-linux- allnoconfig # make -s -j 48 ARCH=i386 O=/kisskb/build/gustavoars_i386-allnoconfig_i386 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/i386-linux/bin/i386-linux- /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/arch/x86/kernel/e820.c: In function 'e820__setup_pci_gap': /kisskb/src/arch/x86/kernel/e820.c:664:16: warning: 'gapstart' may be used uninitialized in this function [-Wuninitialized] Completed OK # rm -rf /kisskb/build/gustavoars_i386-allnoconfig_i386 # Build took: 0:00:15.948502