On Tue, 2005-08-09 at 01:09 +0200, Peter Hagervall wrote:
> This patch contains the following possible cleanups/fixes:
> 
> - use C99 struct initializers
> - make a few arrays and structs static
> - remove a few uses of literal 0 as NULL pointer
> - add __force attribute in cast to silence sparse
> - remove casts to u8 * in calls to readl/writel
> 
> I'm not sure about removing the casts, since I can't tell why they're
> there in the first place and I don't have the hardware to test this.

You're right, the casts are not necessary.

> @@ -52,7 +52,7 @@ static struct {
>       { "HP NC370i Multifunction Gigabit Server Adapter" },
>       { "Broadcom NetXtreme II BCM5706 1000Base-SX" },
>       { "HP NC370F Multifunction Gigabit Server Adapter" },
> -     { 0 },
> +     { "" },

Here, we can just remove the { 0 } line. We don't need to replace it
with a NULL string or a NULL pointer.

> @@ -5012,7 +5012,7 @@ static struct ethtool_ops bnx2_ethtool_o
>  static int
>  bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
>  {
> -     struct mii_ioctl_data *data = (struct mii_ioctl_data *)&ifr->ifr_data;
> +     struct mii_ioctl_data *data = (struct mii_ioctl_data __force 
> *)&ifr->ifr_data;

We can do this instead:
        struct mii_ioctl_data *data = if_mii(ifr);


I ACK all the other changes.

Thanks.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to