Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1964532rdb; Mon, 9 Oct 2023 08:20:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF94JIsJ6b0hZRvsh4WTlOWvqN2t1ejcJ9Koh7uxCCjKNA/OG4a7Qaez+34YORstHzKFRBL X-Received: by 2002:a9d:6655:0:b0:6bc:63c9:7946 with SMTP id q21-20020a9d6655000000b006bc63c97946mr15001679otm.14.1696864845032; Mon, 09 Oct 2023 08:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696864844; cv=none; d=google.com; s=arc-20160816; b=oVidrl+bGW2UdEGEeiyttGf3WMe/a95e0z10UM7DRbcpG5mBhVHI+xHlBcwRmZAS4V ujtMt2hZA1p8qkQm5viXZ5VPO+0xZ29l1O1YL3WW6lJLs5LAuUa4AHsyFqqz87RCI6TH mcrNQzz0zfNlqQyNcgCcZM0YJgVPpDAeslhxrU43zM9Zv2PH5uBXrQSRGdMxbWUxyTfI seXQIhg1nwfyiQUmtKFGDIrlffPaE8aajYOJUb4GAF/UmtZDzWrzr6hi8dJogI9G1UWb 7mUodJGFmCISoSXUGMaVURgd8U3rRQolVzF7zH4SRymx6kZM1YREXp5x/h1dmdawuCDM X+xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=qNZPrfJleHQ5VvSsg3vXAtL0IFBjPZYC2YcQpPOTRXE=; fh=ghQK3tob7+fE0J0JxPFmQgOhbdbaqq7YBq9YuhxpTcE=; b=smknEzudB8FynU0Y0Y3C6RsyhcRBizvOwiQXUi9Igwyaa1CyAIy/c7MvOvg9leW1F8 QaC0voVz9rgRtW1Yi41E7hm9NeIvGrpmCmPJR+PkYMKABWqvKDVsaivTqmCLdLdg5K4R jiX4ppVGsM0794BaxrGmyy4AIVyrUAUrjpHF7BRr9gX3+MSWE5AbHreN2m0hUKCXKYgY NRI0J1H6A6o2UyiWxT+9S43j9db1t6k5oYkn3TxN5bwQi/iDQxhPS1FW7+Nemc2emxjU 8/L/kl6NiUhjvUMnbzUPINTPWYwniJLI56Ptr99qPwBwO/0jcZEDxgkQzDq+p5k9LsDe qi5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AlHAPL6j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id k24-20020a63f018000000b0057808b558cesi7477255pgh.124.2023.10.09.08.20.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 08:20:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AlHAPL6j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 92EF880924AE; Mon, 9 Oct 2023 08:20:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376553AbjJIPUK (ORCPT + 99 others); Mon, 9 Oct 2023 11:20:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376389AbjJIPUJ (ORCPT ); Mon, 9 Oct 2023 11:20:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF499AC; Mon, 9 Oct 2023 08:20:08 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50D80C433C8; Mon, 9 Oct 2023 15:20:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696864808; bh=k2wdi0ESEum3igcBtOoGCjgKrezpemSI40erWk6cIzg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AlHAPL6jF9NPAb57BQxVTIELguJpsgfrqf3KbFnNC75Eqi7yAw+sq1csLectcBDRZ y1VB7Gg4KV+UEqPhrVVsaKiVepR45jBGlYCIg3nOzkSOa133yPX+v8S1ikKl3WOtFF 9vMub9rUUNBUpLiVUcCsnTTRuqHEu+mZ3YjdOIbnmiqd1okqI9pk+ouWFOW/1d6oyv evrsPiJ6J5aWKHiW+6n7z7HZ9FgsmZqSGey6TXaNTaNOMRZw9z2lX5FaF066snC7U5 5xZMJkUSkl9r5yXpNAQEy45L4QhmueHCkME5qVOuwsOTkW8EGaMRq4ZETRLqzy/8m7 h1lhdDiqtsFbw== Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-50325ce89e9so5965264e87.0; Mon, 09 Oct 2023 08:20:08 -0700 (PDT) X-Gm-Message-State: AOJu0Yz2LEOnrl8kvkk1kXF82HSeMMqrsnKRpHZiYlTNRa3Aygh1PMZK KOg5fXR+20rG8X73mZWWviDcBMX2HTrQyS6QFw== X-Received: by 2002:a05:6512:10d5:b0:503:3890:ca3a with SMTP id k21-20020a05651210d500b005033890ca3amr15342746lfg.66.1696864806461; Mon, 09 Oct 2023 08:20:06 -0700 (PDT) MIME-Version: 1.0 References: <20231006214433.339688-1-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Mon, 9 Oct 2023 10:19:54 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ata: xgene: Use of_device_get_match_data() To: Niklas Cassel Cc: Damien Le Moal , "linux-ide@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 09 Oct 2023 08:20:30 -0700 (PDT) X-Spam-Level: ** On Mon, Oct 9, 2023 at 9:41=E2=80=AFAM Niklas Cassel wrote: > > On Fri, Oct 06, 2023 at 04:44:33PM -0500, Rob Herring wrote: > > Use preferred of_device_get_match_data() instead of of_match_device() t= o > > get the driver match data. With this, adjust the includes to explicitly > > include the correct headers. > > > > Signed-off-by: Rob Herring > > --- > > Perhaps device_get_match_data() could be used here and all the ACPI > > specific code dropped, but not sure if all the ACPI code is really > > necessary. > > --- > > drivers/ata/ahci_xgene.c | 11 +++-------- > > 1 file changed, 3 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c > > index ccef5e63bdf9..81a1d838c0fc 100644 > > --- a/drivers/ata/ahci_xgene.c > > +++ b/drivers/ata/ahci_xgene.c > > @@ -13,9 +13,7 @@ > > #include > > #include > > #include > > -#include > > -#include > > -#include > > +#include > > #include > > #include "ahci.h" > > > > @@ -735,7 +733,6 @@ static int xgene_ahci_probe(struct platform_device = *pdev) > > struct ahci_host_priv *hpriv; > > struct xgene_ahci_context *ctx; > > struct resource *res; > > - const struct of_device_id *of_devid; > > enum xgene_ahci_version version =3D XGENE_AHCI_V1; > > const struct ata_port_info *ppi[] =3D { &xgene_ahci_v1_port_info, > > &xgene_ahci_v2_port_info }; > > @@ -778,10 +775,8 @@ static int xgene_ahci_probe(struct platform_device= *pdev) > > ctx->csr_mux =3D csr; > > } > > > > - of_devid =3D of_match_device(xgene_ahci_of_match, dev); > > - if (of_devid) { > > - if (of_devid->data) > > - version =3D (unsigned long) of_devid->data; > > + if (dev->of_node) { > > + version =3D (enum xgene_ahci_version)of_device_get_match_= data(dev); > > } > > Nit: braces can be removed. > > > #ifdef CONFIG_ACPI > > else { Coding style says otherwise when the 'else' has braces. Rob