Re: [PATCH] ipw2200 stack reduction

From: Pekka Enberg
Date: Thu Dec 29 2005 - 03:48:17 EST


Hi Jens,

On 12/28/05, Jens Axboe <axboe@xxxxxxx> wrote:
> -static int ipw_send_host_complete(struct ipw_priv *priv)
> +static struct host_cmd *ipw_host_cmd_get(u8 command, u8 len)
> {
> - struct host_cmd cmd = {
> - .cmd = IPW_CMD_HOST_COMPLETE,
> - .len = 0
> - };
> + struct host_cmd *cmd;
> +
> + cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
> + if (cmd) {
> + cmd->cmd = command;
> + cmd->len = len;
> + return cmd;
> + }
> +
> + return NULL;

A minor nitpick: you can always return cmd here.

Pekka
-
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/