Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp103646ybj; Fri, 8 May 2020 07:30:04 -0700 (PDT) X-Google-Smtp-Source: APiQypLdOphQODhjF0Ze1OsvMolIo12lhRr5VF5eQ5xkhqCPIO4RY7WuOoSLXDq5REr6fpd0Bc17 X-Received: by 2002:a17:906:809:: with SMTP id e9mr1934692ejd.81.1588948204624; Fri, 08 May 2020 07:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588948204; cv=none; d=google.com; s=arc-20160816; b=xUL+37Tls+zD+U0YPssE6uztmPdyGwkNnXseSMePfiYlUJ5Q4xsOdTGmqGen3sUu8y nlcVHQsyuasL4lilRQMHSBGrUUzAWvLjxtWiutJLKDlZcnhFZiqMnVCh4BTi6Z3NAgNl Z0KPmCxkaCz34+5JfDw5QD+A7KMxzMtWjZHRthi8qWz9+ovreDe+9Uk8DdICu+IMhZen wxdwI5vchbE/IE4cxi8qE9xx7+Whv3ztR5fURUC/th4lfM+wpurYOi0ohzddba8BZhMm xwhTtCH6Wu5Vb1Cfu6L/bj5vQQUYx1/qHMiDUMlKc7NgOa++IGq6Iqt69x5RfwIyzLV6 VV9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=LlPzMWNTEQ1YzpHY+kuxbjgDle08ZAZTvv+jasXn95A=; b=c/EpjQTmutbUXrjQAfTR/mccu+a+HAOFSdW33RHnJrCe1ced6LwS59Oxva0F9K7w2A c1/YqyG5dd7wQiEyhjdyPk6Lzr6VeYTAncjkvxLs5ujWmKgrVGRAUsBymk/mQotzTTGX Jf/HsfNxnByV0ruPDTduWQdly72t0oFJUZGxXHxEgvfx8Fbe1datGoLKjZgXR4jgcLql 3+KGbxGuVN9vaHFjNgobLaa+dXDJ+zM2rgv0WgyperTg/nZwDFPxy/mn8Ze0Ro8TMV5t Qiw6/g1KyyngpvKp/hmoIkS025IvMyn/S4YFO0K2tOVfSVK55Vg8mCI2N1u9xhGBwk8X uGuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh4si1023048ejb.385.2020.05.08.07.29.40; Fri, 08 May 2020 07:30:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728035AbgEHO2N (ORCPT + 99 others); Fri, 8 May 2020 10:28:13 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:4391 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727896AbgEHO2N (ORCPT ); Fri, 8 May 2020 10:28:13 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.7]) by rmmx-syy-dmz-app02-12002 (RichMail) with SMTP id 2ee25eb56c5a887-5ad8b; Fri, 08 May 2020 22:27:39 +0800 (CST) X-RM-TRANSID: 2ee25eb56c5a887-5ad8b X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from [192.168.43.52] (unknown[223.104.148.118]) by rmsmtp-syy-appsvr04-12004 (RichMail) with SMTP id 2ee45eb56c5a857-5b418; Fri, 08 May 2020 22:27:39 +0800 (CST) X-RM-TRANSID: 2ee45eb56c5a857-5b418 Subject: Re: [PATCH] USB: host: ehci: Use the defined variable to simplifycode To: Alan Stern Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Zhang Shengju References: From: Tang Bin Message-ID: Date: Fri, 8 May 2020 22:28:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/5/8 21:56, Alan Stern wrote: > On Fri, 8 May 2020, Tang Bin wrote: > >> Use the defined variable "dev" to make the code cleaner. And >> delete an extra blank line. > Again, the Subject: line should say "ehci-mxc". Got it. > >> Signed-off-by: Zhang Shengju >> Signed-off-by: Tang Bin >> --- >> drivers/usb/host/ehci-mxc.c | 9 ++++----- >> 1 file changed, 4 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c >> index c9f91e6c7..a1eb5ee77 100644 >> --- a/drivers/usb/host/ehci-mxc.c >> +++ b/drivers/usb/host/ehci-mxc.c >> @@ -56,7 +56,7 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev) >> return -ENOMEM; >> >> res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> - hcd->regs = devm_ioremap_resource(&pdev->dev, res); >> + hcd->regs = devm_ioremap_resource(dev, res); > As long as you're making these changes, why not also move the > definition of dev up before the definition of pdata? Then you could > change the definition of pdata to: > > struct mxc_usbh_platform_data *pdata = dev_get_platdata(dev); > Got it. Thanks