On Wed, 2013-07-03 at 20:13 +0300, Or Gerlitz wrote:
> From: Eli Cohen <[email protected]>
trivial comments:
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
[]
> +static const char *deliv_status_to_str(u8 status)
> +{
> + switch (status) {
> + case MLX5_CMD_DELIVERY_STAT_OK:
> + return "no errors";
[]
> + default:
> + return "unknown status code\n";
> + }
> +}
Likely unnecessary newline for default case
> +static struct mlx5_cmd_mailbox *alloc_cmd_box(struct mlx5_core_dev *dev,
> + gfp_t flags)
> +{
> + struct mlx5_cmd_mailbox *mailbox;
> +
> + mailbox = kmalloc(sizeof(*mailbox), flags);
> + if (!mailbox) {
> + mlx5_core_dbg(dev, "failed allocation\n");
> + return ERR_PTR(-ENOMEM);
> + }
unnecessary OOM message.
> +static void set_wqname(struct mlx5_core_dev *dev)
> +{
> + struct mlx5_cmd *cmd = &dev->cmd;
> +
> + strcpy(cmd->wq_name, "mlx5_cmd_");
> + strcat(cmd->wq_name, dev_name(&dev->pdev->dev));
More likely snprintf might be better.
snprintf(cmd->wq_name, sizeof(cmd->wq_name), "mlx5_cmd_%s",
dev_name(&dev->pdev->dev));
How big is wq_name? Will a maximum length dev_name always fit?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html