Re: [PATCH v5 3/6] mfd: Add ChromeOS EC I2C driver

From: Dmitry Torokhov
Date: Wed Feb 20 2013 - 13:48:16 EST


On Wed, Feb 20, 2013 at 09:24:36AM -0800, Simon Glass wrote:
> +#ifdef DEBUG
> + dev_dbg(ec_dev->dev, "packet: ");
> + for (i = 0; i < i2c_msg[1].len; i++)
> + dev_cont(ec_dev->dev, " %02x", in_buf[i]);
> + dev_cont(ec_dev->dev, ", sum = %02x\n", sum);

There is "%ph" now so you can simply write:

dev_dbg(ec_dev->dev, "packet: %*ph, sum = %02x\n",
i2c_msg[1].len, in_buf[i], sum);

> +#endif

Thanks.

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