Commit 870897a5ab60a6afeba0a7eff42d21faf79edf33
Committed by
Linus Torvalds
1 parent
7ed31e0fa0
Exists in
master
and in
7 other branches
drivers/edac/i3000: document type promotion
By popular request, add a comment documenting the implicit type promotion here. Signed-off-by: Jason Uhlenkott <juhlenko@akamai.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff
drivers/edac/i3000_edac.c
... | ... | @@ -44,6 +44,13 @@ |
44 | 44 | */ |
45 | 45 | #define I3000_DEAP_GRAIN (1 << 7) |
46 | 46 | |
47 | +/* | |
48 | + * Helper functions to decode the DEAP/EDEAP hardware registers. | |
49 | + * | |
50 | + * The type promotion here is deliberate; we're deriving an | |
51 | + * unsigned long pfn and offset from hardware regs which are u8/u32. | |
52 | + */ | |
53 | + | |
47 | 54 | static inline unsigned long deap_pfn(u8 edeap, u32 deap) |
48 | 55 | { |
49 | 56 | deap >>= PAGE_SHIFT; |