From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751652AbdFJAJT (ORCPT ); Fri, 9 Jun 2017 20:09:19 -0400 Received: from mga14.intel.com ([192.55.52.115]:31706 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751558AbdFJAJR (ORCPT ); Fri, 9 Jun 2017 20:09:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,320,1493708400"; d="scan'208";a="111391404" From: "Mani, Rajmohan" To: Andy Shevchenko , Sakari Ailus CC: "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-acpi@vger.kernel.org" , Lee Jones , Linus Walleij , "Alexandre Courbot" , "Rafael J. Wysocki" , "Len Brown" Subject: RE: [PATCH v1 3/3] ACPI / PMIC: Add TI PMIC TPS68470 operation region driver Thread-Topic: [PATCH v1 3/3] ACPI / PMIC: Add TI PMIC TPS68470 operation region driver Thread-Index: AQHS3rzEYU7jz9+9JUK4AveyJYX8GqIZxSiAgAAZDACAA1+b8A== Date: Sat, 10 Jun 2017 00:09:15 +0000 Message-ID: <6F87890CF0F5204F892DEA1EF0D77A59725BED60@FMSMSX114.amr.corp.intel.com> References: <1496750118-5570-1-git-send-email-rajmohan.mani@intel.com> <1496750118-5570-4-git-send-email-rajmohan.mani@intel.com> <20170607120730.GZ1019@valkosipuli.retiisi.org.uk> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v5A09T6K021290 Hi Andy, Thanks for the reviews and patience. > Subject: Re: [PATCH v1 3/3] ACPI / PMIC: Add TI PMIC TPS68470 operation > region driver > > On Wed, Jun 7, 2017 at 3:07 PM, Sakari Ailus wrote: > > >> +static int ti_tps68470_pmic_get_power(struct regmap *regmap, int reg, > >> + int bitmask, u64 *value) { > >> + int data; > > > > Shouldn't you use unsigned int here? Same in the functions below. > > +1, regmap_read() returns unsigned int. > Ack > >> +static acpi_status ti_pmic_common_handler(u32 function, > > + acpi_physical_address address, > > + u32 bits, u64 *value, > > + void *handler_context, > > > handler_context is unused. > Ack > >> + int, int, u64 *), > >> + int (*update)(struct regmap *, > >> + int, int, u64), > >> + struct ti_pmic_table *table, > >> + int table_size) > > I would even split this to have separate update() and get() paths instead of > having such a monster of parameters. > I have responded on top of Sakari's response. > >> +static acpi_status ti_pmic_clk_freq_handler(u32 function, > >> + acpi_physical_address address, > >> + u32 bits, u64 *value, > >> + void *handler_context, > >> + void *region_context) { > >> + return ti_pmic_common_handler(function, address, bits, value, > >> + handler_context, region_context, > >> + ti_tps68470_pmic_get_clk_freq, > >> + ti_tps68470_regmap_update_bits, > >> + (struct ti_pmic_table *) > >> +&clk_freq_table, > > > > You shouldn't use an explicit cast here. Instead make the function > > argument const as well and you're fine. > > +1. > Ack