From: Linus Torvalds Date: Sat, 18 Apr 2015 15:10:49 +0000 (-0400) Subject: Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6 X-Git-Tag: v5.15~15938 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6a24d0640d609138a4e40a4ce9fd9fe7859e24c;p=platform%2Fkernel%2Flinux-starfive.git Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6 Pull documentation updates from Jonathan Corbet: "Numerous fixes, the overdue removal of the i2o docs, some new Chinese translations, and, hopefully, the README fix that will end the flow of identical patches to that file" * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6: (34 commits) Documentation/memcg: update memcg/kmem status Documentation: blackfin: Makefile: Typo building issue Documentation/vm/pagemap.txt: correct location of page-types tool Documentation/memory-barriers.txt: typo fix doc: Add guest_nice column to example output of `cat /proc/stat' Documentation/kernel-parameters: Move "eagerfpu" to its right place Documentation: gpio: Update ACPI part of the document to mention _DSD docs/completion.txt: Various tweaks and corrections doc: completion: context, scope and language fixes Documentation:Update Documentation/zh_CN/arm64/memory.txt Documentation:Update Documentation/zh_CN/arm64/booting.txt Documentation: Chinese translation of arm64/legacy_instructions.txt DocBook media: fix broken EIA hyperlink Documentation: tweak the maintainers entry README: Change gzip/bzip2 to xz compression format README: Update version number reference doc:pci: Fix typo in Documentation/PCI Documentation: drm: Use '->' when describing access through pointers. Documentation: Remove mentioning of block barriers Documentation/email-clients.txt: Fix one grammar mistake, add extra info about TB ... --- d6a24d0640d609138a4e40a4ce9fd9fe7859e24c diff --cc Documentation/CodingStyle index 4d4f06d,e55accf..f4b78ea --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@@ -656,22 -659,9 +659,22 @@@ bite you if somebody e.g. turns FOO int must enclose the expression in parentheses. Beware of similar issues with macros using parameters. - #define CONSTANT 0x4000 - #define CONSTEXP (CONSTANT | 3) + #define CONSTANT 0x4000 + #define CONSTEXP (CONSTANT | 3) +5) namespace collisions when defining local variables in macros resembling +functions: + +#define FOO(x) \ +({ \ + typeof(x) ret; \ + ret = calc_ret(x); \ + (ret); \ +)} + +ret is a common name for a local variable - __foo_ret is less likely +to collide with an existing variable. + The cpp manual deals with macros exhaustively. The gcc internals manual also covers RTL which is used frequently with assembly language in the kernel. diff --cc Documentation/printk-formats.txt index cb6a596,87f1042..2216eb1 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt @@@ -228,11 -204,9 +228,11 @@@ UUID/GUID addresses lower ('l') or upper case ('L') hex characters - and big endian order in lower ('b') or upper case ('B') hex characters. - Where no additional specifiers are used the default little endian + Where no additional specifiers are used the default big endian order with lower case hex characters will be printed. + Passed by reference. + dentry names: %pd{,2,3,4} %pD{,2,3,4} @@@ -259,20 -231,32 +259,30 @@@ struct va_format Do not use this feature without some mechanism to verify the correctness of the format string and va_list arguments. -u64 SHOULD be printed with %llu/%llx: + Passed by reference. + +struct clk: - printk("%llu", u64_var); + %pC pll1 + %pCn pll1 + %pCr 1560000000 -s64 SHOULD be printed with %lld/%llx: + For printing struct clk structures. '%pC' and '%pCn' print the name + (Common Clock Framework) or address (legacy clock framework) of the + structure; '%pCr' prints the current clock rate. - printk("%lld", s64_var); + Passed by reference. + bitmap and its derivatives such as cpumask and nodemask: + + %*pb 0779 + %*pbl 0,3-6,8-10 + + For printing bitmap and its derivatives such as cpumask and nodemask, + %*pb output the bitmap with field width as the number of bits and %*pbl + output the bitmap as range list with field width as the number of bits. + -If is dependent on a config option for its size (e.g., sector_t, -blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a -format specifier of its largest possible type and explicitly cast to it. -Example: - - printk("test: sector number/total blocks: %llu/%llu\n", - (unsigned long long)sector, (unsigned long long)blockcount); - -Reminder: sizeof() result is of type size_t. ++ Passed by reference. Thank you for your cooperation and attention.