Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4073153ybl; Tue, 20 Aug 2019 06:39:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRZm+W7H2U1voiNTEKgCee9MhIXVu4dsBuE73tofd3fGOkw9gKvq63/FwApAiatC2YkUaj X-Received: by 2002:a17:902:f082:: with SMTP id go2mr29674370plb.25.1566308382705; Tue, 20 Aug 2019 06:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566308382; cv=none; d=google.com; s=arc-20160816; b=y1uLMrWVRvFkyGACEyLjyPUcz7o7Pk/nksvWJbjg3rr7OyWX2opQ9Ck4eIAYyjOCIb 9jCsE89EHZ4XDy7rbv9Puld7FpCXRyfjA1Nz9hLuHDZ7OBBnyQis8/5O4anY+WpvVyae qMuAkcc7q7HGUk0IYMryrAllvNI9kbrPVvLKRmkRZWUBJfBJt+vtdSYZBubMq2KWTcOV mA+Xd6E3uNvGRXOHZRGL2itQfMA+amruJPs8FhCP8LrfYzYS7QqTn6hG1c/jOz+Nzrof gsUyeKi+HBlwnlpJEUr+dYQ8wn3Hlzw09/cLEYU7fQX4X7zeCXe6Q9TGfN7jcnAG+ILi zzOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=D4upNy5Z/FI8rlnFYgHOUDS4ndyqbVNBQ89eAaMZD+4=; b=RF8YiEO9PooRsrgLjYefYbKwkqq3+5uFhL90Xg6ZWWkrQPRoHRO6JSCju2oc+2MtWN 2oVRGz+NDUFOJabq8NaHmn/pYHCEmRjxvjQaKOgm7KYSGqlAz2JJTIdGVJa7IUr3QUhn Bt+sJov3ydsgbtXK0F/4/sQLWhTngVnAABdiZDZcYelF9DVi0f0nOKEfC9yCejPZyGo+ YEtj9+nxaTs4dctqcfudWjcr3qglsdAx8w7t7rdseOQRgvjoXFmu4KYEsXvyUK10j3+Z feQyzP4ajij8vhYqSYsVnc5DpDKfO13kC9JdVmVCbUD4Fd8A27s3y3NIlx0CQhhOdx5I uuqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VjuVMDMu; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p33si12233905pgb.0.2019.08.20.06.39.27; Tue, 20 Aug 2019 06:39:42 -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=@samsung.com header.s=mail20170921 header.b=VjuVMDMu; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730000AbfHTNgk (ORCPT + 99 others); Tue, 20 Aug 2019 09:36:40 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:52736 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728947AbfHTNgk (ORCPT ); Tue, 20 Aug 2019 09:36:40 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190820133639euoutp02e7d8ccb35446dd6040795f8a92e1fab4~8pQIjiS7u1105011050euoutp02e for ; Tue, 20 Aug 2019 13:36:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190820133639euoutp02e7d8ccb35446dd6040795f8a92e1fab4~8pQIjiS7u1105011050euoutp02e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1566308199; bh=D4upNy5Z/FI8rlnFYgHOUDS4ndyqbVNBQ89eAaMZD+4=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=VjuVMDMufblxA+qrNpMAqUCnLS0YJpmrPCmQvsOD79hShHUg4IsS6Mkedwl2N9Mo0 ngNeeFKmx4w9xwk65ltnBA0wdRMjf7m3NMvCxK6AOy7xleP14IRI0w2wQvSqwivkzc MAg/Hm6UW4kVuJ8eC2Jr3R/F6/2HBahmC1sr/tdg= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190820133638eucas1p27a672e609f7e3fe3a3b55c892833fb5d~8pQIPIYOy0313803138eucas1p2I; Tue, 20 Aug 2019 13:36:38 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id E3.6F.04374.667FB5D5; Tue, 20 Aug 2019 14:36:38 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190820133637eucas1p13c8129a8dbc1987fd71cb93bbff0bce9~8pQHYbFDU0444104441eucas1p1Q; Tue, 20 Aug 2019 13:36:37 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190820133637eusmtrp1d31805f2abdeb827060d053120dad483~8pQHKAdLR2051720517eusmtrp1E; Tue, 20 Aug 2019 13:36:37 +0000 (GMT) X-AuditID: cbfec7f5-4f7ff70000001116-e1-5d5bf766f7db Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id AE.B7.04117.567FB5D5; Tue, 20 Aug 2019 14:36:37 +0100 (BST) Received: from [106.120.51.71] (unknown [106.120.51.71]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190820133637eusmtip240264164b9de8a150dcdc08acf90588d~8pQG0N3kI1713817138eusmtip2O; Tue, 20 Aug 2019 13:36:37 +0000 (GMT) Subject: Re: [PATCH 8/9] drivers: ata: sata_gemini: use devm_platform_ioremap_resource() To: "Enrico Weigelt, metux IT consult" Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk, hdegoede@redhat.com, linus.walleij@linaro.org, linux-ide@vger.kernel.org, linux-tegra@vger.kernel.org From: Bartlomiej Zolnierkiewicz Message-ID: Date: Tue, 20 Aug 2019 15:36:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1566304548-19972-8-git-send-email-info@metux.net> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOKsWRmVeSWpSXmKPExsWy7djP87pp36NjDe51S1qsvtvPZvHm+HQm i5uNu5kspvxZzmRxbMcjJovLu+awWXR+mcXmwO5x+Wypx51re9g8Jnx4y+bxft9VNo/Pm+QC WKO4bFJSczLLUov07RK4Mr5sf8lY8I674t+x1SwNjDc4uxg5OSQETCTWrVjPDmILCaxglLj+ UhfC/sIoceSHQxcjF5D9mVFi78s/zF2MHGANf5arQsSXM0q83H2SCcJ5yyhx4cMKZpBuYYEo iRMvN4JNFREwl3j8ZCErSBGzwBxGiY9/t7GAJNgErCQmtq9iBLF5BewkWhf8YQOxWQRUJaY8 u8cKYosKREjcP7aBFaJGUOLkzCcsIFdwCthLzHhXDxJmFhCXuPVkPhOELS+x/e0cZpBdEgK7 2CXOTX3KCHG1i8T5X4IQHwtLvDq+hR3ClpE4PbmHBaJ+HaPE344XUM3bGSWWT/7HBlFlLXH4 +EVWkEHMApoS63fpQ4QdJfo/7WWBmM8nceOtIMQNfBKTtk2HBhavREebE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1AS5+0QOBgjJJCeWJKanZpakFoE08fEwSnVwHhuV1Bk+aylU0u06q1MeaemHF+2R/qfSf+W G7+SPzxM23G7bs4JdsUz79jqvuXsWNHs/LDg4IvF22XYVAxDsuJErWX26XvNUZXU2ZYkut1b 9XLuRfuUpa1/rZ6ZXM+Sv86idqxlc1zfhusfvW6fuT0rek7no2XtGfWs3JPmVeu9WzB3ut6J mexKLMUZiYZazEXFiQBtlJWXzQIAAA== X-CMS-MailID: 20190820133637eucas1p13c8129a8dbc1987fd71cb93bbff0bce9 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190820123601epcas1p19aecef8b133d389e392fdd12273ef3a6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190820123601epcas1p19aecef8b133d389e392fdd12273ef3a6 References: <1566304548-19972-1-git-send-email-info@metux.net> <1566304548-19972-8-git-send-email-info@metux.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote: > Use the new helper that wraps the calls to platform_get_resource() > and devm_ioremap_resource() together. It would also be worth to mention in the patch description that on !res condition the driver will now return -EINVAL (instead of -ENODEV) and print an error. > Signed-off-by: Enrico Weigelt, metux IT consult Acked-by: Bartlomiej Zolnierkiewicz Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > --- > drivers/ata/sata_gemini.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c > index f793564..55e2689 100644 > --- a/drivers/ata/sata_gemini.c > +++ b/drivers/ata/sata_gemini.c > @@ -318,7 +318,6 @@ static int gemini_sata_probe(struct platform_device *pdev) > struct device_node *np = dev->of_node; > struct sata_gemini *sg; > struct regmap *map; > - struct resource *res; > enum gemini_muxmode muxmode; > u32 gmode; > u32 gmask; > @@ -329,11 +328,7 @@ static int gemini_sata_probe(struct platform_device *pdev) > return -ENOMEM; > sg->dev = dev; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - if (!res) > - return -ENODEV; > - > - sg->base = devm_ioremap_resource(dev, res); > + sg->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(sg->base)) > return PTR_ERR(sg->base);