login
Header Space

 
 

Quote: Ugliest Patch Ever

February 12, 2008 - 9:01am
Submitted by Jeremy on February 12, 2008 - 9:01am.

"Or, we could just do the ugliest patch ever, namely

	-#define pcibus_to_node(node)   (-1)
	+#define pcibus_to_node(node)   ((int)(long)(node),-1)

Wow. It's so ugly it's almost wraps around and comes out the other side and looks pretty."

— Linus Torvalds, in a February 11th, 2008 message on the Linux Kernel mailing list.

Whoa!

February 12, 2008 - 9:39am

Whiskey! Tango! Foxtrot!

If the goal is to get rid of unused variable warnings, shouldn't ((void)(node),-1) be enough?

Edit: It appears Andi Kleen said as much. And if you want to prettify it more, I guess you could always wrap it in a macro:

#define UNUSED(x) ((void)(x))

--
Program Intellivision and play Space Patrol!

Linus sure knows how to

February 13, 2008 - 5:49am
Anonymous (not verified)

Linus sure knows how to encourage people to work on "his" kernel...

I bet the guy who did this patch is installing Windows now ;-)

Linus is installing Windows?

February 13, 2008 - 9:54am
Anonymous (not verified)

The guy who wrote that patch was Linus himself (commenting on crazy ways to avoid gcc complaining about uninitialized variables). I guess Linus is now a Windows user.

I don't think so

February 13, 2008 - 10:00am
Anonymous (not verified)

I bet the guy who did this patch is installing Windows now ;-)

Since "the guy" was Linus, I doubt that very much ;-)

window$ sux

February 14, 2008 - 9:19pm
${MY_NAME} (not verified)

Are you sure you want to install Windows? Are you sure you want to continue? Are you sure you are sure? Are you sure you want to move the mouse? Are you sure you want to hit the key? Are you really sure enough? ... window$ sux !

Forgot

February 16, 2008 - 12:31pm
Anonymous (not verified)

You forgot "You have moved your mouse; Windows needs to restart for these changes to take effect".

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary