From: Joe Perches on
On Mon, 2010-03-08 at 02:20 -0800, Jason Dreisbach wrote:
> From: Jason <jtdreisb(a)gmail.com>
> diff --git a/drivers/staging/wavelan/wavelan.c b/drivers/staging/wavelan/wavelan.c
> index 54ca631..37ede43 100644
> --- a/drivers/staging/wavelan/wavelan.c
> +++ b/drivers/staging/wavelan/wavelan.c
[]
> @@ -279,7 +285,8 @@ static void update_psa_checksum(struct net_device * dev, unsigned long ioaddr, u
>
> if (crc != 0)
> printk(KERN_WARNING
> - "%s: update_psa_checksum(): CRC does not agree with PSA data (even after recalculating)\n",
> + "%s: update_psa_checksum(): CRC does not \
> + agree with PSA data (even after recalculating)\n",
> dev->name);
> #endif /* DEBUG_IOCTL_INFO */
> #endif /* SET_PSA_CRC */

Hi Jason.

What you've done here actually adds a defect.

Breaking up a string using line continuations adds the
initial spaces on the next line to the string.

Ignore the checkpatch error for long format lines.
They are not an error and are actually the preferred style.

One thing you could do is to change the logging form from:
printk(KERN_<level> "%s: fmt...", dev->name, args);
to
netdev_<level>(dev, "fmt...", args);

as this may now be a preferred style.
It gives a bit more information in the logs.

When dev is a struct device *, the conversion should be from:
printk(KERN_<level> "%s: fmt...", dev->name, args);
to:
dev_<level>(dev, "fmt...", args);

Another thing you could do would be to take the
embedded function name out of the format string
and use "%s() ...", __func__ as this can save
some text space when there's more than 1 use of
the function name and if the function is renamed
or refactored, the right function name is used.

So this gets converted from:
printk(KERN_WARNING
"%s: update_psa_checksum(): CRC does not agree with PSA data (even after recalculating)\n",
dev->name);
to:
netdev_warn(dev, "%s(): CRC does not agree with PSA data (even after recalculating)\n",
__func__);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/