lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Jun 2015 10:39:35 +0200
From:	Mike Looijmans <mike.looijmans@...ic.nl>
To:	Paul Bolle <pebolle@...cali.nl>
CC:	<linux-clk@...r.kernel.org>, <sboyd@...eaurora.org>,
	<mturquette@...aro.org>, <linux-kernel@...r.kernel.org>,
	<devicetree@...r.kernel.org>
Subject: Re: [PATCH v3] Add TI CDCE925 I2C controlled clock synthesizer driver

On 02-06-15 09:50, Paul Bolle wrote:
> On Mon, 2015-06-01 at 12:13 +0200, Mike Looijmans wrote:
>> --- /dev/null
>> +++ b/drivers/clk/clk-cdce925.c
>
>> +static int cdce925_regmap_i2c_write(
>> +	void *context, const void *data, size_t count)
>
>> +	dev_dbg(&i2c->dev, "%s(%u) %#x %#x\n", __func__, count,
>> +			reg_data[0], reg_data[1]);
>
> For some silly reason (ie, I mistakenly thought I spotted an issue) I
> did a quick build of this file. That triggered some noise on x86_64.
> Excerpt:
>
> drivers/clk/clk-cdce925.c: In function ‘cdce925_regmap_i2c_write’:
> include/linux/dynamic_debug.h:64:16: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
>    static struct _ddebug  __aligned(8)   \
>                  ^
> [...]
> drivers/clk/clk-cdce925.c:505:2: note: in expansion of macro ‘dev_dbg’
>    dev_dbg(&i2c->dev, "%s(%u) %#x %#x\n", __func__, count,
>    ^
>
> A quick look at Documentation/printk-formats.txt suggested this (very
> lightly tested) fix:
> @@ -502,7 +502,7 @@ static int cdce925_regmap_i2c_write(
>          reg_data[0] = CDCE925_I2C_COMMAND_BYTE_TRANSFER | ((u8 *)data)[0];
>          reg_data[1] = ((u8 *)data)[1];
>
> -       dev_dbg(&i2c->dev, "%s(%u) %#x %#x\n", __func__, count,
> +       dev_dbg(&i2c->dev, "%s(%zu) %#x %#x\n", __func__, count,
>                          reg_data[0], reg_data[1]);
>
>          ret = i2c_master_send(i2c, reg_data, count);
>
>> +static int cdce925_regmap_i2c_read(void *context,
>> +	   const void *reg, size_t reg_size, void *val, size_t val_size)
>
>> +		dev_dbg(&i2c->dev, "%s(%u, %u) %#x %#x\n", __func__,
>> +				reg_size, val_size, reg_data[0], *((u8 *)val));
>
> Likewise:
> @@ -547,7 +547,7 @@ static int cdce925_regmap_i2c_read(void *context,
>
>          ret = i2c_transfer(i2c->adapter, xfer, 2);
>          if (likely(ret == 2)) {
> -               dev_dbg(&i2c->dev, "%s(%u, %u) %#x %#x\n", __func__,
> +               dev_dbg(&i2c->dev, "%s(%zu, %zu) %#x %#x\n", __func__,
>                                  reg_size, val_size, reg_data[0], *((u8 *)val));
>                  return 0;
>          } else if (ret < 0)
>
> Thanks,
>
>
> Paul Bolle
>



Kind regards,

Mike Looijmans
System Expert

TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
Telefax: +31 (0) 499 33 69 70
E-mail: mike.looijmans@...icproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ