/* Don't try to provide a year that's before 1998, please !  */
static int compute_wday(efi_time_t *eft)
/* Don't try to provide a year that's before 1998, please !  */
static int compute_wday(efi_time_t *eft)
{
	int y;
	int ndays = 0;
	if (eft->year < 1998) {
		printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n");
		return -1;
	}
	for (y = EFI_RTC_EPOCH; y < eft->year; y++)
		ndays += 365 + (is_leap_year(y) ? 1 : 0);
	ndays += compute_yday(eft);
	return (ndays + 4) % 7;
}