Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp234932ybl; Tue, 28 Jan 2020 22:49:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzrH8FJbTChZMqVSSxO1bFA0C8/IqF1Lp3nfzBSOQM92Du508P9O7j+XLtDobnWy3uyDUDe X-Received: by 2002:aca:220c:: with SMTP id b12mr5332941oic.55.1580280554438; Tue, 28 Jan 2020 22:49:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580280554; cv=none; d=google.com; s=arc-20160816; b=jI0/oSqHBPcRAoNRTW9ZXNfReUD2ddNVMUsb4u3ER3gvo4fdHVgET12vubg9mORO2m mA4XwokudgcGOYhCQNfOJo3muYVU4bb9OyMkBjdokzYroGEnqyy6rO25DwkdWyMuO0nk ekCA9zscrkBBm/BRbfM8p3oEbvWJLT9aujvXvAjaGLGyaLchLRZplg6JUPOV5XVNS5TQ WMqoScndGaGdEd9KDGF/zPzO7oJIQiwHt1EfkeoeQyLivFX3LT4QlDi1zgofatIsqDIv 1/vsnJY8kXYenGCRR7OcFCpTEIRzxCxW6NLL1aIUiVvp5uVRbXodN5OVkzjreFi8ubJR BIzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=SxpQ+2UID9jajci3A897vLNxQKnwkVPs/AOSn1AC7/o=; b=nbexVRdHnxFVkJHlRMGBvRcRlAz0qVdQPbxO+hqDijT7A58XTJNuyJ71Axw2lt7kn3 q/uwA204wGldzFqGZgRETcc1CmkliM/uJABgnT/dF6pcaQcdEQM/e+FkGxOJ1xMBVOcg gi+ZVLklMK+YOkLiDP9fKRBqFTP+6TC9VyVwyeyFD9X/7CWtW3UYgDOSkYgvJUIEdYeN Ofgta8ChQGz26xIG2mvxuKoMrnWaYUZT1YoXmKLcwfxra/IT09PuWyxs/J5sPCt7T/4m 0Fir8GSVzY5y/4/Tksilqoz0X5HW/JQU3zlYrzCDTE0EsBoxN3cQymsEPNUgqXuww6XN 6eDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=olqhDNMt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5si848264otg.66.2020.01.28.22.49.00; Tue, 28 Jan 2020 22:49:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=olqhDNMt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726140AbgA2GsD (ORCPT + 99 others); Wed, 29 Jan 2020 01:48:03 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:5368 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgA2GsD (ORCPT ); Wed, 29 Jan 2020 01:48:03 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 28 Jan 2020 22:47:48 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 28 Jan 2020 22:48:02 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 28 Jan 2020 22:48:02 -0800 Received: from [10.19.66.205] (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 29 Jan 2020 06:47:59 +0000 Subject: Re: [Patch V3 12/18] usb: gadget: tegra-xudc: support multiple device modes To: Thierry Reding CC: , , , , , , , , , References: <1577704195-2535-1-git-send-email-nkristam@nvidia.com> <1577704195-2535-13-git-send-email-nkristam@nvidia.com> <20200128181020.GJ2293590@ulmo> X-Nvconfidentiality: public From: Nagarjuna Kristam Message-ID: <7478f53a-c236-5442-8abb-7531edb89b29@nvidia.com> Date: Wed, 29 Jan 2020 12:20:09 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200128181020.GJ2293590@ulmo> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1580280468; bh=SxpQ+2UID9jajci3A897vLNxQKnwkVPs/AOSn1AC7/o=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=olqhDNMtxOWOZVnY1KK7ycv1a6jTfzXxFm2/ygjmqqZcuYj+lFqV8zLJREISIUs+W aBUmtZYhXoYgGtCCVws/WGPSadaCq0LqfmqQjsd/JS3nNB4hdaVTIP0525ATl7sfzU rzyjGSv3riqtIQD3QKjKfo9UHsn+0MKLM+qbWxemszmz1PC0ckJ0NPnbshIHlHv3rZ et6CgdTMRLAk6s/3mpWAGwjPfKb3KCLXmqeGRiJCLhQZivDk0Hvfrg/dl4n3XOFqGY xfdjoaeXy7zf0ij8XYijjnHNOt+9YL57WYtpFQ1Lbaq4z2T3H/wL8/MpdDwfy3Mda8 vGDTXXCOV9x4A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28-01-2020 23:40, Thierry Reding wrote: >> struct tegra_xudc_save_regs saved_regs; >> bool suspended; >> bool powergated; >> >> - struct usb_phy *usbphy; >> + struct usb_phy **usbphy; >> + int current_phy_index; > Can be unsigned int. It's also very long. It might be better to choose a > shorter name so that when you use it, the lines don't get excessively > long. Alternatively you could keep this field name and instead declare > local variables to reference the current PHY to make lines shorter. > > Actually, looking at this a bit more, I don't see current_phy_index ever > used by itself (other than the assignment and one check to see if a PHY > has been selected). So why not just store a pointer to the current PHY > and avoid all the dereferencing? > > Thierry current_phy_index main purpose is to quickly get which index for USB 2 and 3 phy's to be used. This is used at mulitple functions. Based on your comment above, I believe its good to use 2 pointers for UTMI and USB 3 phy's, which are points to current phy index. This ensures to keep line length as less as possible. Thanks, Nagarjuna