lkml.org 
[lkml]   [2003]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [STUPID] Best looking code to transfer to a t-shirt
Rik,

Thanks for posting this, it was truly hilarious and a joy to behold :)

A reminder of the best on this planet, after observing the ugliest
and worst on this planet a short while ago on this mailing list..

thanks,
Nivedita

> How about drivers/net/sunhme.c ?
>
> It's not scary, but it is absolutely hilarious, even to
> people who don't even know C.
>
> static void happy_meal_tcvr_write(struct happy_meal *hp,
> unsigned long tregs, int reg,
> unsigned short value)
> {
> int tries = TCVR_WRITE_TRIES;
>
> ASD(("happy_meal_tcvr_write: reg=0x%02x value=%04x\n", reg,
> value));
>
> /* Welcome to Sun Microsystems, can I take your order please? */
> if (!hp->happy_flags & HFLAG_FENABLE)
> return happy_meal_bb_write(hp, tregs, reg, value);
>
> /* Would you like fries with that? */
> hme_write32(hp, tregs + TCVR_FRAME,
> (FRAME_WRITE | (hp->paddr << 23) |
> ((reg & 0xff) << 18) | (value & 0xffff)));
> while (!(hme_read32(hp, tregs + TCVR_FRAME) & 0x10000) && --tries)
> udelay(20);
>
> /* Anything else? */
> if (!tries)
> printk(KERN_ERR "happy meal: Aieee, transceiver MIF write
> bolixed\n");
>
> /* Fifty-two cents is your change, have a nice day. */
> }
>
>
> Rik
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.030 / U:9.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site