Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp378015pxb; Thu, 12 Nov 2020 06:13:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJy35oAU2E/d2HjaIW5PJXH1WNOZ8yCm1VBB9+wAh7QTAZtE9p+IGHy3N1xJo/cnAP70HF+1 X-Received: by 2002:a17:906:b783:: with SMTP id dt3mr30281988ejb.534.1605190402526; Thu, 12 Nov 2020 06:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605190402; cv=none; d=google.com; s=arc-20160816; b=XG1nDYqHO0cizxbZKqZL8A8NDf3ll7QlEjWpSg3+Uy6mQrs1f16G5Q2WdumC45HvAG fy4GR6p9qnkrJsPfG+UjDP51jUGZn/7ZxzUeqpD+Z5PQQRcy5Sx9YuR3EHtvnAxfPPIG 4lkVIMwFjv1MjHirDqswnAw4CqcJP1jKdUHA7lJNGgD1z/PF0weN+toDeRaXdiXPztWe Oo76fJoP08Lzyk7iKsyw2ikAKWvCQbckVIKvcXW9S+Ov1Tm6bP/12FEu0krdeENQoWf2 dlA5NGwkhd1Ms9OrZuXK3rR82N8NlYRn/nEOueP5jY7o0KVTOJDEhB4NMA6CZixORSnT Ahyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=8pQc8/OHqV34abXaKJ3XXkNde3LOGpGHsN/PN8sKy4I=; b=tVBVrkLr8kJONsrvA/wizgwsAlvuMoWNBNHv9fza3eSGQQeM3HyJQxwJFSENa2UpFj vHYjdSnm+y/1hfIpY5FZMwrJdA/+OB2NUfdhoIEn1GIphGgv8m+ClhjkOtmSlHi3Luvx /7qe9FA5OpwurGS6gbRsD0caNzHQI5NLZN6BEFgnXp32LiU2mji4T8DBSEyfiNkHgt96 MAc+glXZxQCnYpUiUf9gFyJCEu9ADgDJkQLbfiRRnChVZCxl+LjnR2H0bGQ1ZryL58K3 fHqTpHN9ttbxYpcvnqgq/TjINmBqpKFsOpHoDwnukS017QdXXZDn/ipOMOoQrSGY0pOm TCbw== 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 g11si321895ejb.468.2020.11.12.06.12.59; Thu, 12 Nov 2020 06:13:22 -0800 (PST) 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 S1728441AbgKLOLO (ORCPT + 99 others); Thu, 12 Nov 2020 09:11:14 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:33994 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728432AbgKLOLL (ORCPT ); Thu, 12 Nov 2020 09:11:11 -0500 Received: by mail-ot1-f67.google.com with SMTP id j14so5694888ots.1; Thu, 12 Nov 2020 06:11:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8pQc8/OHqV34abXaKJ3XXkNde3LOGpGHsN/PN8sKy4I=; b=Sa31ig72XXOGbwgR8fSlLKy3a7Xhma/pPlnAXunzOg4v7Zl0YDw3zE3hoQDshP16KO NcXCXbIpm0CBkzslrxDyZADifH1phcFpAY4dmWXwi99Fuzj+dm4wEivimMw+P9WALiZx 6WlS8dtbc3BGZwxMjPQJTiqkbIsxKRcSzfidp4/2LEaecRQIjrigGB4mHhjiO6mrRQp9 v33wgpZthVHosY6y83xK4oL1V2bwc6uClxuXKh/GiJKqvhcA2Xt9x4urGNya/33MhuGm bY+FMBTvai6769St1+6wtbUJMDJOYFVY+t/mj4wlox2GXa01lrF/wadMsDhBHN5boO0t 84lA== X-Gm-Message-State: AOAM532BO8/M12UMvaKi8PzYlaXk8Q9VklwyxuTntqYLrDYEpBNmNxLn 9RTeBenUAVKyDnekOb7CplTD04BJ+658iG5hgkQ= X-Received: by 2002:a05:6830:1f5a:: with SMTP id u26mr5657008oth.250.1605190270725; Thu, 12 Nov 2020 06:11:10 -0800 (PST) MIME-Version: 1.0 References: <20200916084017.14086-1-huobean@gmail.com> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 12 Nov 2020 15:10:59 +0100 Message-ID: Subject: Re: [PATCH v2] scsi: ufs-exynos: use devm_platform_ioremap_resource_byname() To: Bean Huo Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, "James E.J. Bottomley" , "Martin K. Petersen" , stanley.chu@mediatek.com, =?UTF-8?B?QmVhbiBIdW8g6ZyN5paM5paMIChiZWFuaHVvKQ==?= , Bart Van Assche , "Winkler, Tomas" , cang@codeaurora.org, scsi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bean, On Thu, Nov 12, 2020 at 3:06 PM Geert Uytterhoeven wrote: > On Wed, Sep 16, 2020 at 10:43 AM Bean Huo wrote: > > From: Bean Huo > > > > Use devm_platform_ioremap_resource_byname() to simplify the code. > > > > Signed-off-by: Bean Huo > > Thanks for your patch, which is now commit 2dd39fad92a1f25f ("scsi: ufs: > ufs-exynos: Use devm_platform_ioremap_resource_byname()") in v5.10-rc1. > > > --- a/drivers/scsi/ufs/ufs-exynos.c > > +++ b/drivers/scsi/ufs/ufs-exynos.c > > @@ -940,7 +940,6 @@ static int exynos_ufs_init(struct ufs_hba *hba) > > struct device *dev = hba->dev; > > struct platform_device *pdev = to_platform_device(dev); > > struct exynos_ufs *ufs; > > - struct resource *res; > > int ret; > > > > ufs = devm_kzalloc(dev, sizeof(*ufs), GFP_KERNEL); > > @@ -948,24 +947,21 @@ static int exynos_ufs_init(struct ufs_hba *hba) > > return -ENOMEM; > > > > /* exynos-specific hci */ > > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vs_hci"); > > - ufs->reg_hci = devm_ioremap_resource(dev, res); > > + ufs->reg_hci = devm_platform_ioremap_resource_byname(pdev, "vs_hci"); > > Are you sure this is equivalent? > Before, devm_ioremap_resource() was called on "dev" (hba->dev), > after it is called on "&pdev->dev" . Yes it is, due to: struct platform_device *pdev = to_platform_device(dev); Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds