| To: | Marc St-Jean <stjeanma@pmc-sierra.com> |
|---|---|
| Subject: | Re: [PATCH] drivers: PMC MSP71xx TWI driver |
| From: | Andrew Morton <akpm@linux-foundation.org> |
| Date: | Mon, 5 Mar 2007 02:17:44 -0800 |
| Cc: | linux-kernel@vger.kernel.org, linux-mips@linux-mips.org |
| In-reply-to: | <200702262348.l1QNm6LY015085@pasqua.pmc-sierra.bc.ca> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <200702262348.l1QNm6LY015085@pasqua.pmc-sierra.bc.ca> |
| Sender: | linux-mips-bounce@linux-mips.org |
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.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH][MIPS] separate Cobalt PCI codes from setup.c, Yoichi Yuasa |
|---|---|
| Next by Date: | Re: [PATCH] drivers: PMC MSP71xx LED driver, Andrew Morton |
| Previous by Thread: | [PATCH][MIPS] separate Cobalt PCI codes from setup.c, Yoichi Yuasa |
| Next by Thread: | [PATCH] drivers: PMC MSP71xx TWI driver, Marc St-Jean |
| Indexes: | [Date] [Thread] [Top] [All Lists] |