All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] some *seriously* deceased code in the tree
@ 2007-02-03  9:43 Robert P. J. Day
  2007-02-03 12:49 ` Tobias Klauser
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert P. J. Day @ 2007-02-03  9:43 UTC (permalink / raw)
  To: kernel-janitors


  over here:

http://www.fsdev.dreamhosters.com/wiki/index.php?title=If_0_or_if_1_directives

i mentioned the depressing number of "#if 0" and "#if 1" directives in
the tree, many of which i'm *sure* have long since lost their value.
as one amusing example, i just ran across this in
arch/parisc/mm/fault.c:

======================#if 0
/* This is the treewalk to find a vma which is the highest that has
 * a start < addr.  We're using find_vma_prev instead right now, but
 * we might want to use this at some point in the future.  Probably
 * not, but I want it committed to CVS so I don't lose it :-)
 */
                        while (tree != vm_avl_empty) {
                                if (tree->vm_start > addr) {
                                        tree = tree->vm_avl_left;
                                } else {
                                        prev = tree;
                                        if (prev->vm_next = NULL)
                                                break;
                                        if (prev->vm_next->vm_start > addr)
                                                break;
                                        tree = tree->vm_avl_right;
                                }
                        }
#endif
======================
  in the first place, how old does kernel code have to be to have been
originally checked in via *CVS*?  :-)

  more importantly, though, this strikes me as a misuse of the
official kernel tree -- as an archival dumping ground for snippets of
code that have no immediate value but might someday be useful so, what
the heck, let's throw it in there and, who knows, we might get back to
it but maybe not.

  IMHO, that's the sort of thing that deserves to be ripped out
without a moment's hesitation.

  thoughts?

-- 
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://www.fsdev.dreamhosters.com/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-03 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-03  9:43 [KJ] some *seriously* deceased code in the tree Robert P. J. Day
2007-02-03 12:49 ` Tobias Klauser
2007-02-03 16:57 ` Matthew Wilcox
2007-02-03 17:16 ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.