Re: [PATCH] ipw2200 stack reduction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jens,

On 12/28/05, Jens Axboe <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux