Re: [PATCH] ipw2200 stack reduction

Pekka Enberg
2005-12-29T08:48:52Z

Hi Jens,

On 12/28/05, Jens Axboe <axboe@suse.de> 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