Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755623AbbFBIkA (ORCPT ); Tue, 2 Jun 2015 04:40:00 -0400 Received: from mx6-out9.antispamcloud.com ([95.211.2.200]:44127 "EHLO mx6-out9.antispamcloud.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbbFBIjp convert rfc822-to-8bit (ORCPT ); Tue, 2 Jun 2015 04:39:45 -0400 Message-ID: <556D6BC7.8000308@topic.nl> Date: Tue, 2 Jun 2015 10:39:35 +0200 From: Mike Looijmans Organization: TOPIC User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Paul Bolle CC: , , , , Subject: Re: [PATCH v3] Add TI CDCE925 I2C controlled clock synthesizer driver References: <1433153623-29205-1-git-send-email-mike.looijmans@topic.nl> <1433231444.2361.75.camel@x220> In-Reply-To: <1433231444.2361.75.camel@x220> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8BIT X-Originating-IP: [192.168.80.121] X-EXCLAIMER-MD-CONFIG: 9833cda7-5b21-4d34-9a38-8d025ddc3664 X-EXCLAIMER-MD-BIFURCATION-INSTANCE: 0 X-Filter-ID: s0sct1PQhAABKnZB5plbIbbvfIHzQjPVmPLZeVYSu3xU9luQrU+8/8qthi+0Jd/W6KAUC/fjyuDn NXFr4uarw3l1CC2knDcy62erxJyS81COSLfVL0nhwrRe33lSzlq4lJLRliFOVIC/fLKAoN9CfrfA vZjgXTjXZ7MYLJNQ9qd/TdnEs8NPIq1rkboUQlaLm28FtnTrnAcLTaf33An9Jh2LIFGgh/QiXjPx B1Apcw28iPoeP5dZEJubVmKHHAH+HaaU/Zb275qB1xqcfpxQM5y+qZCqKVlOLbnZGefy4WgwrbEF ha0YeJJyddEv82oxGgdQZXRisyliedf3wwG/i0fbPHDukXV00bsRlEs4lRL1n/XdJJ9GRgEOIAdJ fsxH6o9cJP5eX5ZgblmatfgTi3UQUe920uagS8myy1PBX7CsmQnrR7py9e2gPXO9XlBs17NirEYy qwqMBGrw8ELiqF4PlbgadAKXLcwPkwqAo9UGYy42O+jB/NwKEjI94rgPfqb5R4VemuUI6bcEARsm 0G4So95h1QWSnuAyA3PczJY7HX7hLQQQ5XLbXPeVllL5O3DdQMC1I7PjKvOAjz6r9cqScuaSWO4w wuxYneZpZbMG50Z1SQdFp/m/gCxT5Zl6jACm/2fwXHUnI8IYsapwron5y/vcIKE4+MoDT8NV3zcZ C9DYMKflXpm8yUDD7i0dzpoiGg7JkcNAJDkuuAYWX61RIYrv45ptEyIIan2eaz6s5ykKGcbUEDrx 3Vk/JXIujjSI+QVckh6MyG0x3p9X+HMcN6qoXPjenLhIOF1oeRbX9pIz35ln/e+4p65HKqDlkD2u qFy60zpwcON7KickbqsEv/Gjlkq6RRjTo1LYFNgKERT6M2un2ftABNNH5z4X X-Report-Abuse-To: spam@mx99.antispamcloud.com X-Filter-Fingerprint: IFrWXGses7OKB5S5G8/dJXhXyDRoOQM5J3kcUr0HrMvJUWjZ8+qhjyB23tbDuyLOYL8Ff78gYsez 4Rl08xudmXi4esCQ0R1MchVjt7wblGlvhFgW0MjUMRkF5sMCDfftTXNFDzN17hnrWeZYOJvLq0Ic WjZ+XcEjj/7Pkld0zkmvziDInX9WdMov2kn2yXjdwv61T+KDYyYtREgszdyFwv8IxCB3p/oCKvxr eyISh3JGb7OS5oVgiO+kDxZrVPLz3MmEGC2PrUKqLq5WmHK+Nw== X-Originating-IP: 88.159.208.100 X-Spampanel-Domain: topic.nl X-Spampanel-Username: 88.159.208.100 Authentication-Results: antispamcloud.com; auth=pass smtp.auth=88.159.208.100@topic.nl X-Spampanel-Outgoing-Class: ham X-Spampanel-Outgoing-Evidence: SB/global_tokens (0.00587804638559) X-Recommended-Action: accept Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2794 Lines: 85 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@topicproducts.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/