Skip to content

Commit

Permalink
drivers/edac/i3000: document type promotion
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jason Uhlenkott authored and Linus Torvalds committed Feb 7, 2008
1 parent 7ed31e0 commit 870897a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/edac/i3000_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
*/
#define I3000_DEAP_GRAIN (1 << 7)

/*
* Helper functions to decode the DEAP/EDEAP hardware registers.
*
* The type promotion here is deliberate; we're deriving an
* unsigned long pfn and offset from hardware regs which are u8/u32.
*/

static inline unsigned long deap_pfn(u8 edeap, u32 deap)
{
deap >>= PAGE_SHIFT;
Expand Down

0 comments on commit 870897a

Please sign in to comment.