Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753738Ab0IACn4 (ORCPT ); Tue, 31 Aug 2010 22:43:56 -0400 Received: from mail.perches.com ([173.55.12.10]:1161 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752488Ab0IACny (ORCPT ); Tue, 31 Aug 2010 22:43:54 -0400 Subject: Re: [MeeGo-Dev][PATCH] Topcliff: Update PCH_I2C driver to 2.6.35 From: Joe Perches To: Masayuki Ohtak Cc: "Jean Delvare (PC drivers, core)" , "Ben Dooks (embedded platforms)" , Crane Cai , Samuel Ortiz , Linus Walleij , Ralf Baechle , srinidhi kasagar , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, "Wang Yong Y\"" , "Wang Qi\"" , "Andrew\"" , arjan@linux.intel.com, Tomoya MORINAGA , Arnd Bergmann In-Reply-To: <4C7DB9CF.5000905@dsn.okisemi.com> References: <4C7DB9CF.5000905@dsn.okisemi.com> Content-Type: text/plain; charset="UTF-8" Date: Tue, 31 Aug 2010 19:43:52 -0700 Message-ID: <1283309032.1797.123.camel@Joe-Laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1326 Lines: 45 On Wed, 2010-09-01 at 11:26 +0900, Masayuki Ohtak wrote: > I2C driver of Topcliff PCH > +++ b/drivers/i2c/busses/i2c-pch.c [] > +static void pch_init(struct i2c_algo_pch_data *adap) [] > + if (pch_i2c_speed == FAST_MODE_CLK) { > + reg_value |= FAST_MODE_EN; > + dev_dbg(adap->pch_adapter.dev.parent, "Fast mode enabled\n"); > + } Just a suggestion below, ignore it at your pleasure... These dev_ calls might be easier to read if you had some #defines like: #define pch_dbg(adap, fmt, arg...) \ dev_dbg(adap->pch_adapter.dev.parent, fmt, ##arg) #define pch_err(adap, fmt, arg...) \ dev_err(adap->pch_adapter.dev.parent, fmt, ##arg) #define pch_info(adap, fmt, arg...) \ dev_info(adap->pch_adapter.dev.parent, fmt, ##arg) then the last dev_dbg becomes: pch_dbg(adap, "Fast mode enabled\n"); Many modules use similar wrapper #defines. > + dev_dbg(adap->pch_adapter.dev.parent, > + "%s: I2CCTL=%x pch_i2cbc=%x pch_i2ctmr=%x Enable interrupts\n", > + __func__, ioread32(p + PCH_I2CCTL), > + pch_i2cbc, pch_i2ctmr); pch_dbg(adap, etc...) etc. cheers, Joe -- 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/