* Re: [PATCH] create_proc_read_entry in arch/ppc/iSeries/rtc.c
[not found] <Pine.LNX.4.44.0211181909260.15091-200000@top.qwarx.com>
@ 2002-12-02 4:47 ` Rusty Russell
0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2002-12-02 4:47 UTC (permalink / raw)
To: Chris Wilson; +Cc: mikejc, Linux Kernel Janitors, linux-kernel, torvalds
In message <Pine.LNX.4.44.0211181909260.15091-200000@top.qwarx.com> you write:
> This message is in MIME format. The first part should be readable text,
> while the remaining parts are likely unreadable without MIME-aware tools.
> Send mail to mime@docserver.cac.washington.edu for more info.
>
> ---1044231485-1031583466-1037559336=:16702
> Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
> Content-ID: <Pine.LNX.4.44.0211171855531.16702@top.qwarx.com>
>
> Dear Sir,
>
> As part of the Linux Kernel Janitors audit of misc_register usage,
> I would like to submit my related patch to arch/ppc/iSeries/rtc.c.
> --- linux-2.5.47/arch/ppc/iSeries/rtc.c Mon Nov 11 03:28:15 2002
> +++ linux-2.5.47-chris/arch/ppc/iSeries/rtc.c Sun Nov 17 21:29:25 2002
> static int __init rtc_init(void)
> {
> - if (misc_register(&rtc_dev))
> + if (misc_register(&rtc_dev)) {
> + printk(KERN_ERR "iSeries-rtc: cannot register misc device.\n");
> return -ENODEV;
> - create_proc_read_entry ("driver/rtc", 0, 0, rtc_read_proc, NULL);
> + }
But this cannot sanely fail (it cannot be a module). It's probably
better to do something like inserting a check inside misc_register and
create_proc_read_entry:
BUG_ON(booting && failed);
Maybe even create a "NOFAIL_ON_BOOT(condition)" which does this for
you.
Thoughts?
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-02 5:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.44.0211181909260.15091-200000@top.qwarx.com>
2002-12-02 4:47 ` [PATCH] create_proc_read_entry in arch/ppc/iSeries/rtc.c Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome