From a20cd88e20e59ce11ebca84fac769654193c51e0 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Mon, 13 Oct 2014 15:53:03 -0700 Subject: [PATCH] rtc: max77686: Use ffs() to calculate tm_wday max77686_rtc_calculate_wday() is used to calculate the day of the week to be filled in struct rtc_time but that function only calculates the number of bits shifted. So the ffs() function can be used to find the first bit set instead of a special function. [akpm@linux-foundation.org: add comment clarifying ffs() use] Signed-off-by: Javier Martinez Canillas Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed