Re: [PATCH] rtc/rtc-spear: remove unnecessary check against rtc_valid_tmand tm2bcd

From: Rajeev kumar
Date: Mon Jun 25 2012 - 04:19:26 EST


On 6/23/2012 5:13 PM, Devendra Naga wrote:
rtc_valid_tm is always return
-EINVAL if the time doesn't represent a valid date and time and 0 if its.

so we can simply do rtc_valid_tm(tm) rather doing rtc_valid_tm(tm) != 0 checking.
and also tm2bcd() does return -EINVAL if the time doesn't represent a valid date and time
and 0 if its.

and also removing err because is_write_complete will return -EIO if our write to the
RTC registers didn't happen and 0 if its.

Signed-off-by: Devendra Naga<devendra.aaru@xxxxxxxxx>

Acked-By: Rajeev Kumar <rajeev-dlh.kumar@xxxxxx>

~Rajeev
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/