Re: WARN_ON(): proc_dir_entry 'rtc' already registered

From: David Brownell
Date: Tue Feb 12 2008 - 13:29:21 EST


On Tuesday 12 February 2008, Pavel Machek wrote:
> I'm getting this during bootup:
>
> PM: Adding info for No Bus:event6
> PM: Adding info for No Bus:uinput
> PM: Adding info for No Bus:rtc0
> proc_dir_entry 'rtc' already registered
> Pid: 1, comm: swapper Not tainted 2.6.25-rc1 #125
> ... deletia
> =======================
> rtc_cmos 00:07: rtc core: registered rtc_cmos as rtc0
> rtc0: alarms up to one month, y3k
> PM: Adding info for platform:coretemp.0
> PM: Adding info for No Bus:hwmon1
>
> ... .config attached.

Which shows:

CONFIG_GEN_RTC=y
CONFIG_GEN_RTC_X=y

Disable that, then those warnings will vanish. (I'm told that
having proc_register() return a fault code is off the table,
much like impeachment.)

How to fix ... how about: instead of just warning folk
off such legacy RTC drivers [1] we just wrap them with
an "if RTC_LIB != n" so this mistake won't be possible.

- Dave

[1] http://marc.info/?l=linux-kernel&m=120267619306747&w=2
--
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/