Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbdDDNXp (ORCPT ); Tue, 4 Apr 2017 09:23:45 -0400 Received: from mail-qt0-f172.google.com ([209.85.216.172]:34378 "EHLO mail-qt0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbdDDNXn (ORCPT ); Tue, 4 Apr 2017 09:23:43 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170331133728.GA23725@rajaneesh-OptiPlex-9010> <1ca7187132bd2b98ca87d0829a3c76022f041924.1491002056.git.sathyanarayanan.kuppuswamy@linux.intel.com> From: Andy Shevchenko Date: Tue, 4 Apr 2017 16:23:41 +0300 Message-ID: Subject: Re: [PATCH v4 2/5] platform/x86: intel_pmc_ipc: Add pmc gcr read/write/update api's To: Sathyanarayanan Kuppuswamy Natarajan Cc: Kuppuswamy Sathyanarayanan , 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 536 Lines: 17 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. -- With Best Regards, Andy Shevchenko