Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5022111e authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'net-sizeof-cleanups'



Stephen Hemminger says:

====================
net: various sizeof cleanups

Noticed some places that were using sizeof as an operator.
This is legal C but is not the convention used in the kernel.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6b0355f4 31975e27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3516,7 +3516,7 @@ static const char *skge_board_name(const struct skge_hw *hw)
		if (skge_chips[i].id == hw->chip_id)
			return skge_chips[i].name;

	snprintf(buf, sizeof buf, "chipid 0x%x", hw->chip_id);
	snprintf(buf, sizeof(buf), "chipid 0x%x", hw->chip_id);
	return buf;
}

+2 −2
Original line number Diff line number Diff line
@@ -2695,7 +2695,7 @@ struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev)
{
	struct mlx4_cmd_mailbox *mailbox;

	mailbox = kmalloc(sizeof *mailbox, GFP_KERNEL);
	mailbox = kmalloc(sizeof(*mailbox), GFP_KERNEL);
	if (!mailbox)
		return ERR_PTR(-ENOMEM);

+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,
	struct mlx4_en_dev *mdev = priv->mdev;
	struct net_device *dev = priv->dev;

	memset(context, 0, sizeof *context);
	memset(context, 0, sizeof(*context));
	context->flags = cpu_to_be32(7 << 16 | rss << MLX4_RSS_QPC_FLAG_OFFSET);
	context->pd = cpu_to_be32(mdev->priv_pdn);
	context->mtu_msgmax = 0xff;
+1 −1
Original line number Diff line number Diff line
@@ -1056,7 +1056,7 @@ static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, int qpn,
	}
	qp->event = mlx4_en_sqp_event;

	memset(context, 0, sizeof *context);
	memset(context, 0, sizeof(*context));
	mlx4_en_fill_qp_context(priv, ring->actual_size, ring->stride, 0, 0,
				qpn, ring->cqn, -1, context);
	context->db_rec_addr = cpu_to_be64(ring->wqres.db.dma);
+1 −1
Original line number Diff line number Diff line
@@ -643,7 +643,7 @@ static void build_inline_wqe(struct mlx4_en_tx_desc *tx_desc,
			     void *fragptr)
{
	struct mlx4_wqe_inline_seg *inl = &tx_desc->inl;
	int spc = MLX4_INLINE_ALIGN - CTRL_SIZE - sizeof *inl;
	int spc = MLX4_INLINE_ALIGN - CTRL_SIZE - sizeof(*inl);
	unsigned int hlen = skb_headlen(skb);

	if (skb->len <= spc) {
Loading