Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp150078pxk; Thu, 24 Sep 2020 01:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwID7L5fkccne0fldS7TsBMB9poZFG032JM2UIp/AwuSO5OdWTTUVQ06VwzmjmqbINHJdT6 X-Received: by 2002:a17:906:d94:: with SMTP id m20mr3669318eji.133.1600937630496; Thu, 24 Sep 2020 01:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600937630; cv=none; d=google.com; s=arc-20160816; b=YGtZdEYecy5VTDdnb7O7LxaviYYVZmR7X58WsC438l76xidp+c9DAzomuOB9cS96Vg 51bSW0migabZg8uYf1TQnsvwQe+mEs0H8AJ5DEU6pFd7iT+YPSN7sH0q1g+c6W3/uspU my9zWuxUdV6GGh0nShlh7zOmncHaVsCEtHeTo7Lejj45F5CRih0gebjOVxgWWv3HjX1T /J4LGQEikOSzhLqr8TD62sDdgCHBoABRmL2kWGZh0y7DvoObpsxrUrs+boc3hPtqznpp y0KnvDKZjkbuigosxK6/Mlr3sQHQIPuBt/p/7Vm9H2vTnOK9P6k3of8krTBrtyuVNRDx Kk1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=aH7C7gfQaZoKuyV4G3uqPKSbIaHTZv3x5xJr6Co+2x8=; b=1D5HsVZXCS51xMb3jzYaCuHiUCedR/QAxHnm5HDT8RhYRqWWDNIfMVK6O5x5C5Yi1V mI9P5Y/VdfdT8TE7SOtXvlTHwX4F1Eegp9LCoNayYVRCd+cVXmAbP2ddQ421soXIvoCV /nbzjkGv+fB7ntrGfq/+kG89wvLJUGGtJ5BGtKDnK445uOKEMs+nWGC/e8hivShJjKNo ENpmxLJJp8jHiMetJOCroXokn30grP32AcqeU9JCtzPaymR+d9pdx4yzt8ti4Ahr89au FKcBQCl00mjLJhPXlKbKiO86cMcRC4WLODff5wP9/McuKxcYNo6oivxcsNY/zdJ90Krs SQVw== 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 ds1si1356685ejc.279.2020.09.24.01.53.27; Thu, 24 Sep 2020 01:53:50 -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 S1727368AbgIXIva (ORCPT + 99 others); Thu, 24 Sep 2020 04:51:30 -0400 Received: from elvis.franken.de ([193.175.24.41]:54784 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727289AbgIXIv2 (ORCPT ); Thu, 24 Sep 2020 04:51:28 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1kLMyM-0003LM-00; Thu, 24 Sep 2020 10:51:26 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id B79BEC1009; Thu, 24 Sep 2020 10:20:08 +0200 (CEST) Date: Thu, 24 Sep 2020 10:20:08 +0200 From: Thomas Bogendoerfer To: Qinglang Miao Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] MIPS: OCTEON: fix error - use 'ret' after remove it Message-ID: <20200924082008.GA7822@alpha.franken.de> References: <20200924064142.90491-1-miaoqinglang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924064142.90491-1-miaoqinglang@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24, 2020 at 02:41:42PM +0800, Qinglang Miao wrote: > Variable ret was removed in commit 0ee69c589ec("MIPS: OCTEON: > use devm_platform_ioremap_resource") but still being used in > devm_release_mem_region which is unneeded. So remove this > line to fix error. > > Fixes: 0ee69c589ec("MIPS: OCTEON: use devm_platform_ioremap_resource") > Reported-by: kernel test robot > Signed-off-by: Qinglang Miao > --- > arch/mips/cavium-octeon/octeon-usb.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c > index 97f6dc31e1b4..987a94cbf3d0 100644 > --- a/arch/mips/cavium-octeon/octeon-usb.c > +++ b/arch/mips/cavium-octeon/octeon-usb.c > @@ -534,8 +534,6 @@ static int __init dwc3_octeon_device_init(void) > dev_info(&pdev->dev, "clocks initialized.\n"); > mutex_unlock(&dwc3_octeon_clocks_mutex); > devm_iounmap(&pdev->dev, base); > - devm_release_mem_region(&pdev->dev, res->start, > - resource_size(res)); > } > } while (node != NULL); I've reverted the orginal fix as IMHO the whole change is wrong. The code maps/unmaps the io region to setup clocks and phy and releases everything so the real driver can pick it up later. The devm_release_mem_region is important and since the device continues to exists, there is not auto-cleanup. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]