Quote: Ugliest Patch Ever

Submitted by Jeremy
on February 12, 2008 - 6: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 sure knows how to

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

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

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

I don't think so

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

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

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

window$ sux

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

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

Anonymous (not verified)
on
February 16, 2008 - 9:31am

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

Linus is installing Windows?

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

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.

Whoa!

Mr_Z
on
February 12, 2008 - 6: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!