Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AADAC433F5 for ; Mon, 27 Dec 2021 20:55:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233282AbhL0Uzy (ORCPT ); Mon, 27 Dec 2021 15:55:54 -0500 Received: from mxout01.lancloud.ru ([45.84.86.81]:50944 "EHLO mxout01.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbhL0Uzx (ORCPT ); Mon, 27 Dec 2021 15:55:53 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout01.lancloud.ru DEEC0209F8C5 Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [PATCH v3 07/10] ata: pata_platform: Merge pata_of_platform into pata_platform From: Sergey Shtylyov To: Andy Shevchenko , Lad Prabhakar CC: Damien Le Moal , Rob Herring , Linux Kernel Mailing List , Prabhakar , References: <20211224131300.18198-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20211224131300.18198-8-prabhakar.mahadev-lad.rj@bp.renesas.com> Organization: Open Mobile Platform Message-ID: <73042c85-c194-e1c8-296c-6d9322624d83@omp.ru> Date: Mon, 27 Dec 2021 23:55:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT02.lancloud.ru (fd00:f066::142) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/27/21 11:54 PM, Sergey Shtylyov wrote: [...] >> ... >> >>> + if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) { >>> + dev_err(&pdev->dev, "invalid number of resources\n"); >>> + return -EINVAL; >> >> return dev_err_probe(); ? >> >>> + } >> >> ... >> >>> + if (!dev_of_node(&pdev->dev)) >>> + ret = pata_platform_get_pdata(pdev, priv); >>> + else >>> + ret = pata_of_platform_get_pdata(pdev, priv); >> >> What the difference between them? > > One parses DT props into the private structure, the other inits this structure without DT... > >> Can't you unify them and leave only >> DT related part separately? > > He can't -- grep *defconfig for PATA_PLATFORM=, please. I take it back -- I think I misunderstood. :-) > [...] MBR, Sergey