Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756013AbbFBHut (ORCPT ); Tue, 2 Jun 2015 03:50:49 -0400 Received: from lb2-smtp-cloud6.xs4all.net ([194.109.24.28]:36556 "EHLO lb2-smtp-cloud6.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbbFBHur (ORCPT ); Tue, 2 Jun 2015 03:50:47 -0400 Message-ID: <1433231444.2361.75.camel@x220> Subject: Re: [PATCH v3] Add TI CDCE925 I2C controlled clock synthesizer driver From: Paul Bolle To: Mike Looijmans Cc: linux-clk@vger.kernel.org, sboyd@codeaurora.org, mturquette@linaro.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Date: Tue, 02 Jun 2015 09:50:44 +0200 In-Reply-To: <1433153623-29205-1-git-send-email-mike.looijmans@topic.nl> References: <1433153623-29205-1-git-send-email-mike.looijmans@topic.nl> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2318 Lines: 62 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 -- 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/