From: Jeremy Kerr Date: Fri, 19 Oct 2012 07:16:45 +0000 (+0800) Subject: efi: Clarify GUID length calculations X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~16^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=310ad75448329f167af3c4a10e4a9de4d80058ff;p=pandora-kernel.git efi: Clarify GUID length calculations At present, the handling of GUIDs in efivar file names isn't consistent. We use GUID_LEN in some places, and 38 in others (GUID_LEN plus separator), and implicitly use the presence of the trailing NUL. This change removes the trailing NUL from GUID_LEN, so that we're explicitly adding it when required. We also replace magic numbers with GUID_LEN, and clarify the comments where appropriate. We also fix the allocation size in efivar_create_sysfs_entry, where we're allocating one byte too much, due to counting the trailing NUL twice - once when calculating short_name_size, and once in the kzalloc. Signed-off-by: Jeremy Kerr Signed-off-by: Matt Fleming --- Reading git-diff-tree failed