Subject: Re: [patch 09/18] PS3: System-bus rework

From: Geoff Levand <[email-masked]>
Date: Mon, 11 Jun 2007 08:39:19 -0700

Milton Miller wrote:
>> --- a/arch/powerpc/platforms/ps3/mm.c
>> +++ b/arch/powerpc/platforms/ps3/mm.c
>> -#define DBG(fmt...) do{if(0)printk(fmt);}while(0)
>> +#define DBG(fmt...) do { if (0) printk(fmt);} while (0)
> 
> While there isn't a style guide for one line defines, while you're 
> adding spaces add one more after the ; before the } where a new line 
> would normally appear.

I don't even like the original.  I planned to replace it with the
following, and will do so now.

static inline int __attribute__ ((format (printf, 1, 2))) DBG(
	const char *fmt, ...) {return 0;}

>> +       BUG_ON(!dev->bus_id);
>> +       mutex_lock(&usage_hack.mutex);
>> +
>> +       if(dev->bus_id == 1 && dev->dev_id == 1) {
>> +               usage_hack.sb_11++;
> 
> If you expect to leave this hack in for a while, how about adding a 
> DEVICE_IS(dev, bus, device) macro?

A good idea!

-Geoff