Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4078873ybi; Mon, 3 Jun 2019 05:27:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqy34tIuLzZVQL0WK61wpr8TTpL+B119o3QfraLFaCSMxlsqN34THehWQBT9EO6jF6MX7zG+ X-Received: by 2002:a63:474a:: with SMTP id w10mr10632081pgk.352.1559564843801; Mon, 03 Jun 2019 05:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559564843; cv=none; d=google.com; s=arc-20160816; b=YgnWXU/0WZljF2jJaVjq+RCCz8bBw1ac4j0aPU+8YOYI+VN5iJYJK0paqTUq3P5YlD r3TwWG5dpskU/azeGpRU7fs3TePQLvtIqZ/DuJFA/vMtL3RjExubzXZQZOsCIOeMF4I+ B128LJ2x1ti7Qz19A0k936vfK5rGXKHule0weiXwxSHvhauw/1osHpxxPLoYqgAkSljv F8h24NZao6HMTX5ipACZLe075DnDMAkZn5U9ia33s0iZBdfYTpuYU5CsaPR8uNMrY8cs gASiQG3kq52vUwHhhWV5xlB/3EtwUVhSJ+0GcqbwTA6MRDpQVe/hdm/nYXIciphNVTCO 8U9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Yb/KbagyUUw4P75rmK+KN+lvqVVUnJQqqW2WqAudFaE=; b=hvyPNhnQu0of2evXHJtIInRuwO7dlwiHz/+LjO5XAdZmN6yD8qRaaeyS7B43f6gf8h Xo5N10+AD7np1mS+AELNRvXd7zVNNzVyAzMxeGntAD1qJDAMJRnS1zYtZjGB6V0uWyvY SQF9oe+RLBCTIU6LY0pSpspzI6YOXSzhlSWSTl5oCOgwMeDPWd41dlaOh7mDKvgjWV4u d6qCPARAdJIDOmKc5SO9h1p7XEecVy6J2YAloQ4T5vyl7fCaCWu6pJk/LHrzirmFcfno WpJLISKto+t0VZFkw7XOIfV5SLcvRXM6hdn+kHOUgkH2hsYp1yxaejXcU7hn8uxZAmRt J2kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GbX3eLZz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m64si18448403pgm.532.2019.06.03.05.27.05; Mon, 03 Jun 2019 05:27:23 -0700 (PDT) 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=@kernel.org header.s=default header.b=GbX3eLZz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727501AbfFCMQq (ORCPT + 99 others); Mon, 3 Jun 2019 08:16:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:47342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726587AbfFCMQq (ORCPT ); Mon, 3 Jun 2019 08:16:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3DBB8280C0; Mon, 3 Jun 2019 12:16:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559564205; bh=wulgFJ3+yhHuyD9dxZ/TbsHdJm7qURFTPLhJyoQxgw0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GbX3eLZzOyim2Gyqv5jHF5jIvDinNpRiZiEfETW6gw+ijDjYfdyRBe0n3kS2OEyGw 8BhbmNSlhBrWU0h8ZyKGKlQUhNyJhC5217gPeVRJUoairtqivdjOlLLmFI+5CXAqao gx80KM8zMSRxHSL9g/LMFg2gVWMvwk2ARWFFO0jk= Date: Mon, 3 Jun 2019 14:16:43 +0200 From: Greg Kroah-Hartman To: Geordan Neukum Cc: devel@driverdev.osuosl.org, YueHaibing , Mao Wenan , linux-kernel@vger.kernel.org, Nathan Chancellor , Dan Carpenter Subject: Re: [PATCH 5/5] staging: kpc2000: kpc_spi: use devm_* API to manage mapped I/O space Message-ID: <20190603121643.GA25274@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 02, 2019 at 03:58:37PM +0000, Geordan Neukum wrote: > The kpc_spi driver does not unmap its I/O space upon error cases in the > probe() function or upon remove(). Make the driver clean up after itself > more maintainably by migrating to using the managed resource API. > > Signed-off-by: Geordan Neukum > --- > drivers/staging/kpc2000/kpc2000_spi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c > index b513432a26ed..32d3ec532e26 100644 > --- a/drivers/staging/kpc2000/kpc2000_spi.c > +++ b/drivers/staging/kpc2000/kpc2000_spi.c > @@ -471,7 +471,8 @@ kp_spi_probe(struct platform_device *pldev) > goto free_master; > } > > - kpspi->phys = (unsigned long)ioremap_nocache(r->start, resource_size(r)); > + kpspi->phys = (unsigned long)devm_ioremap_nocache(&pldev->dev, r->start, > + resource_size(r)); Why is this being cast? This should just be an __iomem *, right? > kpspi->base = (u64 __iomem *)kpspi->phys; Then that cast will go away :) Anyway, something for a future patch, this one is fine, thanks. greg k-h