« gaming through the years | tabs vs spaces »
April 26, 2009 1:24 a.m.
Sometimes I add humor to my code just for kicks, but I really like it when I run into comical code while looking through other people's stuff. Maybe it's an easter egg or just a funny comment. Either way, I enjoy it as much as any other geek should! Here is a code snippet that was once part of the Linux Kernel.
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=%04xn", 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
I found this in a very old post, but funny none the less. The original post and other funny code snippets in the kernel can be found at Kernel Trap.