All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Marc St-Jean <stjeanma@pmc-sierra.com>
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] drivers: PMC MSP71xx TWI driver
Date: Mon, 5 Mar 2007 02:17:44 -0800	[thread overview]
Message-ID: <20070305021744.bb34a7ce.akpm@linux-foundation.org> (raw)
In-Reply-To: <200702262348.l1QNm6LY015085@pasqua.pmc-sierra.bc.ca>

Previous comments apply - please convert all this code to kernel coding style.

There are many typecasts of void*, eg:

> +	struct pmcmsp_priv_data *p = (struct pmcmsp_priv_data*)data;

Such casts are unneeded and give an undesirable decrease in typesafety - please
remove them all.

pmcmsp_priv_data.lock should be converted from semaphore to a mutex

Convert u_intN_t -> uN throughout.

Convert all symbol of the form getClockConfig to (in this case)
get_clock_config.

These:

> +/* The default settings */
> +const static struct pmctwi_clockcfg pmctwi_defclockcfg = {
> +	.standard = {
> +		.filter = 0x3,
> +		.clock = 0x1f,
> +	},
> +	.highspeed = {
> +		.filter = 0x3,
> +		.clock = 0x1f,
> +	},
> +};
> +
> +const static struct pmctwi_cfg pmctwi_deftwicfg = {
> +	.arbf		= 0x03,
> +	.nak		= 0x03,
> +	.add10		= 0x00,
> +	.mst_code	= 0x00,
> +	.arb		= 0x01,
> +	.highspeed	= 0x00,
> +};

Should be in a .c file, not a .h file.

  reply	other threads:[~2007-03-05 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26 23:48 [PATCH] drivers: PMC MSP71xx TWI driver Marc St-Jean
2007-03-05 10:17 ` Andrew Morton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-03-08 23:24 Marc St-Jean

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=20070305021744.bb34a7ce.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=stjeanma@pmc-sierra.com \
    /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.