Re: [PATCH v4][mmc/host]:Blackfin SD Host Controller Driver

From: Mike Frysinger
Date: Wed Nov 25 2009 - 17:25:46 EST


On Wed, Nov 25, 2009 at 17:04, Andrew Morton wrote:
> On Wed, 25 Nov 2009 23:19:50 +0800 cliffcai.sh wrote:
>> +struct dma_desc_array {
>> +   unsigned long  start_addr;
>> + Â Â unsigned short Âcfg;
>> + Â Â unsigned short Âx_count;
>> +   short      x_modify;
>> +} __attribute__((packed));
>
> __packed is preferred.

we should move this into the Blackfin dma.h at any rate

>> +static void sdh_start_cmd(struct sdh_host *host, struct mmc_command *cmd)
>> +{
>> + Â Â unsigned int sdh_cmd;
>> + Â Â unsigned int stat_mask;
>> +
>> + Â Â dev_dbg(mmc_dev(host->mmc), "%s enter cmd: 0x%p\n", __func__, cmd);
>> + Â Â WARN_ON(host->cmd != NULL);
>> + Â Â host->cmd = cmd;
>> +
>> + Â Â sdh_cmd = 0;
>> + Â Â stat_mask = 0;
>> +
>> + Â Â sdh_cmd |= cmd->opcode;
>> +
>> + Â Â if (cmd->flags & MMC_RSP_PRESENT) {
>> + Â Â Â Â Â Â sdh_cmd |= CMD_RSP;
>> + Â Â Â Â Â Â stat_mask |= CMD_RESP_END;
>> + Â Â } else
>> + Â Â Â Â Â Â stat_mask |= CMD_SENT;
>
> Arguably wrong from a coding-style POV and looks weird IMO. ÂAdds a bit
> of risk that subsequent coders will think they're writing in python adn
> will add bugs.

i dont really get what you're referring to here. the code in question
looks ifne to me, and i dont see anything "python-esque" about it

> Fixes:
>
> - Â Â Â } else
> + Â Â Â } else }

guessing you actually meant '{' there
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/