From: Jason Uhlenkott Date: Thu, 7 Feb 2008 08:15:05 +0000 (-0800) Subject: drivers/edac/i3000: document type promotion X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=870897a5ab60a6afeba0a7eff42d21faf79edf33;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drivers/edac/i3000: document type promotion By popular request, add a comment documenting the implicit type promotion here. Signed-off-by: Jason Uhlenkott Signed-off-by: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c index b813f356b390..5d4292811c14 100644 --- a/drivers/edac/i3000_edac.c +++ b/drivers/edac/i3000_edac.c @@ -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;