Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754493AbdDDUTf (ORCPT ); Tue, 4 Apr 2017 16:19:35 -0400 Received: from mga09.intel.com ([134.134.136.24]:50658 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753288AbdDDUSs (ORCPT ); Tue, 4 Apr 2017 16:18:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,275,1486454400"; d="scan'208";a="1150963882" Reply-To: sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v4 2/5] platform/x86: intel_pmc_ipc: Add pmc gcr read/write/update api's References: <20170331133728.GA23725@rajaneesh-OptiPlex-9010> <1ca7187132bd2b98ca87d0829a3c76022f041924.1491002056.git.sathyanarayanan.kuppuswamy@linux.intel.com> To: Andy Shevchenko , Sathyanarayanan Kuppuswamy Natarajan Cc: Andy Shevchenko , Zha Qipeng , "dvhart@infradead.org" , Guenter Roeck , Wim Van Sebroeck , David Box , Rajneesh Bhardwaj , Platform Driver , "linux-kernel@vger.kernel.org" , linux-watchdog@vger.kernel.org From: sathyanarayanan kuppuswamy Organization: Intel Message-ID: Date: Tue, 4 Apr 2017 13:14:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 724 Lines: 21 Hi Andy, On 04/04/2017 06:23 AM, Andy Shevchenko wrote: > On Mon, Apr 3, 2017 at 4:51 AM, Sathyanarayanan Kuppuswamy Natarajan > wrote: > >>>> +static inline int is_gcr_valid(u32 offset) >>> Pointer to ipcdev should be a parameter to this function. >> But ipcdev is a static variable, visible across this file. So there is >> no point in passing it as parameter. > That's one of refactoring needed for this library. You need to pass a > pointer to all internal functions and where it's possible to avoid > reference to a global variable. Yes, I have included this into the list of issues that needs to fixed during the refactoring effort. > -- Sathyanarayanan Kuppuswamy Android kernel developer