Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 3 Jan 2003 17:50:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 3 Jan 2003 17:50:36 -0500 Received: from 5-116.ctame701-1.telepar.net.br ([200.193.163.116]:59528 "EHLO 5-116.ctame701-1.telepar.net.br") by vger.kernel.org with ESMTP id ; Fri, 3 Jan 2003 17:50:34 -0500 Date: Fri, 3 Jan 2003 20:58:50 -0200 (BRST) From: Rik van Riel X-X-Sender: riel@imladris.surriel.com To: Maciej Soltysiak cc: linux-kernel@vger.kernel.org Subject: Re: [STUPID] Best looking code to transfer to a t-shirt In-Reply-To: Message-ID: References: X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1807 Lines: 51 On Fri, 3 Jan 2003, Maciej Soltysiak wrote: > I am in a t-shirt transfering frenzy and was wondering which part of the > kernel code it would be best to have on my t-shirt. > How about we have a poll of the most frightening pieces of the kernel ? 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 -- Bravely reimplemented by the knights who say "NIH". http://www.surriel.com/ http://guru.conectiva.com/ Current spamtrap: october@surriel.com - 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/