From patchwork Fri Oct 6 21:45:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 149433 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp611647vqo; Fri, 6 Oct 2023 14:47:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBcGs5gFOKKhjq/JsUMaly9RrB4qf/5QMGy28IdI+PV5nEB84MQ+HdoKIhtmobUt6fJ1et X-Received: by 2002:a17:903:120f:b0:1bb:994c:bc43 with SMTP id l15-20020a170903120f00b001bb994cbc43mr10161576plh.18.1696628845174; Fri, 06 Oct 2023 14:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696628845; cv=none; d=google.com; s=arc-20160816; b=j0+O8o4RcSkCCIrsmSJgZ97W3DI6TB08XIHlGlRdZe0qOZRZyrsQfDdr5BClKKnUGR bys52ki2esGsR17zS1sPXipmeFixbsnhz1qStz1a5tE9kjLq2cxZxQud/xSnrmAnhxhm Wa9uVD0Tnn3mJWda8iTO9Sbq7wudMn3o58kRgwP2hOlPMLKMnGkXGSMN1mn7t0GEND99 BQd2rOTbZDl8bX/QG8QGwlKlqP7hAqcXzPM6oUneDKWCPZgz0oBbh6v3LYYe9glVQvRo ZlW5itW2qkM0qPNAXnRIGLy3X/u3M0XHZzgz8SMzsM8V3dzcm2qyUwXlWsQuURhPGwS6 gMOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gddStUNfOxNFuzl0ZgrtYlob+hdy4yJY/JZWuKfkXC4=; fh=WdqtERepRB4KHJSoyoEh0SzkLe5GuyUO5xbbCpTxDX0=; b=PzItfQL+BHEGDUIxMWoDso7/7gCH7YK8kUG+wXSu7Q5o5cPbS8ogLax4nrloVnXWM9 0WcLfZv/uxxolKIL4rWk66zGPw1mw5+P1Om/ndAmt3LLm1rwnW8xTajvc+AL3Q0YAaC9 uxvSUP/gRLGzqmHxCQ1fCIjGCq19Xrqy+pZXvd4eLILEFhdnkJ/0Qbg1ynU1NBN9JPDc WPnAwKOXLvhX7Bc0thrNXpVSAGHEb+Muu0LMg+tJ6Hch5LcryfOm1hYCCKCH0UuYZkfg TkVBpf2Sb00DfDLmiz3Jo9ZjgNNGnmrsttS0WePjDnkXHr+5OTlonzISnACGvQo8GXWs GD1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vo565lnS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id lm8-20020a170903298800b001b895572179si4561248plb.184.2023.10.06.14.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 14:47:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vo565lnS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 015C480C599A; Fri, 6 Oct 2023 14:45:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233794AbjJFVp0 (ORCPT + 18 others); Fri, 6 Oct 2023 17:45:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233750AbjJFVpX (ORCPT ); Fri, 6 Oct 2023 17:45:23 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70739BD for ; Fri, 6 Oct 2023 14:45:21 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AEB4C433C8; Fri, 6 Oct 2023 21:45:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696628721; bh=i+PAI5tS9dQFHq2UMHdhk9RfN5pkw2PWAlQmRe31xno=; h=From:To:Cc:Subject:Date:From; b=Vo565lnSLZ2W3SIoc47sdQoPbrIHs2BdRkW2RJdfXI5ijLO4KPy069jJH4ezPmAW3 V815SJZ08RdABhfA4NuEXVWyYKjXEZZG+Ztpk9zcmI0H0P8l7x3u0AX5f2C5v+olqJ v0kMx1q58+WOxorH6l/5iby1Om0tmcVwsZc72MjEhN0+Nu+2vI5pWdDA9cEv7bB7fn b4tMJst71tkSu2c+vZ9f6afbA8B3PipHNsYNW/zbJZFwOWgww8mxyTp6eaIRu79w3Q iQXWlhQURfMbq4H7FYj3HtvfWlJMg4ZLOjNumE2jwRZlAANkD9DRsivzE3BnRduGch zO8W9upmtgjwA== Received: (nullmailer pid 340666 invoked by uid 1000); Fri, 06 Oct 2023 21:45:19 -0000 From: Rob Herring To: Michael Ellerman , Nicholas Piggin , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] powerpc: fsl_msi: Use device_get_match_data() Date: Fri, 6 Oct 2023 16:45:16 -0500 Message-Id: <20231006214516.340589-1-robh@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 06 Oct 2023 14:45:52 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779044288338004194 X-GMAIL-MSGID: 1779044288338004194 Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring --- arch/powerpc/sysdev/fsl_msi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 57978a44d55b..558ec68d768e 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c @@ -11,9 +11,11 @@ #include #include #include +#include #include #include -#include +#include +#include #include #include #include @@ -392,7 +394,6 @@ static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev, static const struct of_device_id fsl_of_msi_ids[]; static int fsl_of_msi_probe(struct platform_device *dev) { - const struct of_device_id *match; struct fsl_msi *msi; struct resource res, msiir; int err, i, j, irq_index, count; @@ -402,10 +403,7 @@ static int fsl_of_msi_probe(struct platform_device *dev) u32 offset; struct pci_controller *phb; - match = of_match_device(fsl_of_msi_ids, &dev->dev); - if (!match) - return -EINVAL; - features = match->data; + features = device_get_match_data(&dev->dev); printk(KERN_DEBUG "Setting up Freescale MSI support\n");