Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754150AbcDYKFN (ORCPT ); Mon, 25 Apr 2016 06:05:13 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:2432 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752436AbcDYKFL (ORCPT ); Mon, 25 Apr 2016 06:05:11 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Mon, 25 Apr 2016 03:04:53 -0700 Message-ID: <571DE912.3060602@nvidia.com> Date: Mon, 25 Apr 2016 15:23:22 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Thierry Reding CC: , , , , , Subject: Re: [PATCH V4 3/4] gpio: tegra: Get rid of all file scoped global variables References: <1461319754-12040-1-git-send-email-ldewangan@nvidia.com> <1461319754-12040-3-git-send-email-ldewangan@nvidia.com> <20160425100055.GA20630@ulmo.ba.sec> In-Reply-To: <20160425100055.GA20630@ulmo.ba.sec> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRHKMAIL102.nvidia.com (10.25.59.16) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="ISO-8859-1"; 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: 771 Lines: 24 On Monday 25 April 2016 03:30 PM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Fri, Apr 22, 2016 at 03:39:13PM +0530, Laxman Dewangan wrote: > [...] >> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c > [...] >> static struct gpio_chip tegra_gpio_chip = { > This variable is still file-scoped. Why not get rid of it at the same > time? It's rather pointless to remove all file-scoped variables except a > single one, because now the driver still isn't properly equipped to deal > with multiple instances (however theoretical that may be). > Yaah, Alex also pointed that to have the instance of gpio_chip in tegra_gpio_info and then do as tgi->gc = tegra_gpio_chip. same for irq_chip also. I hope this will resolve the concern.