All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geoff Levand <geoffrey.levand@am.sony.com>
To: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 3/16] add base support for Celleb platform
Date: Mon, 20 Nov 2006 13:03:36 -0800	[thread overview]
Message-ID: <45621828.5000904@am.sony.com> (raw)
In-Reply-To: <200611150931.kAF9VciJ023243@toshiba.co.jp>

Just a few very minor comments.

Ishizaki Kou wrote:
> Index: linux-2.6.19/arch/powerpc/platforms/celleb/beat.c
> +int64_t beat_repository_encode(int vendor_id, const char *str, uint64_t name[4])
> +{ 
> +	union {
> +		unsigned char cbuf[8];
> +		uint64_t a;
> +	} buf[4];
> +
> +	buf[0].cbuf[0] = vendor_id << 4;
> +	buf[0].cbuf[1] = 0;
> +	buf[0].cbuf[2] = 0;
> +	buf[0].cbuf[3] = 0;
> +	if((str = re_det1(str, &buf[0].cbuf[4], 4)) == NULL) {
> +		return -1;
> +	}
> +	if((str = re_det1(str, &buf[1].cbuf[0], 8)) == NULL) {
> +		return -2;
> +	}
> +	if((str = re_det1(str, &buf[2].cbuf[0], 8)) == NULL) {
> +		return -3;
> +	}
> +	if((str = re_det1(str, &buf[3].cbuf[0], 8)) == NULL) {
> +		return -4; 
> +	}
> +	if(*str != 0) {
> +		return -5;
> +	} 
> +	name[0] = buf[0].a;
> +	name[1] = buf[1].a;
> +	name[2] = buf[2].a;
> +	name[3] = buf[3].a;
> +	return 0;
> +} 


I think we can have common lower level repository routines shared between
beat and lv1.


> +#ifdef DEBUG
> +#define DBG(fmt...) udbg_printf(fmt)
> +#else
> +#define DBG(fmt...)
> +#endif

Maybe you should consider using something like this for the non-debug case:

#define DBG(fmt...) do{if(0)printk(fmt);}while(0)

That way a syntax check is always done, and it will keep your DBG() statements
from getting out of sync with the rest of the code.


-Geoff

  parent reply	other threads:[~2006-11-20 21:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15  9:31 [PATCH 3/16] add base support for Celleb platform Ishizaki Kou
2006-11-15 17:23 ` Arnd Bergmann
2006-11-15 18:36 ` Christoph Hellwig
2006-11-15 23:31   ` Benjamin Herrenschmidt
2006-11-17  6:52     ` Christoph Hellwig
2006-11-16  0:51   ` Geoff Levand
2006-11-20 21:03 ` Geoff Levand [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-11-17 10:27 Ishizaki Kou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45621828.5000904@am.sony.com \
    --to=geoffrey.levand@am.sony.com \
    --cc=kou.ishizaki@toshiba.co.jp \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.