From patchwork Fri Oct 27 07:23:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 158790 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp420755vqb; Fri, 27 Oct 2023 00:24:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGj76R/ZSOJiSSFeANq+ErwFgaitp129qKYEJZQI4I8W8MsVU7NiSoCgEodVk2c80ZjZtvP X-Received: by 2002:a81:c946:0:b0:5a8:7375:af6b with SMTP id c6-20020a81c946000000b005a87375af6bmr1863077ywl.44.1698391465023; Fri, 27 Oct 2023 00:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698391465; cv=none; d=google.com; s=arc-20160816; b=m219BMxw/1RqulX4mGE2yQlCqA6HoBm0D7w52IWVD8cwZTxUHGUiNweia6wIHvnz17 vMD8GAMl2KR0Jg3e9AiHLVPnFYKQj/y1pkmjYObFieQidljNL34h4QfUNfGEXP0d3Gqx 0dMZ6td5MYm9txY8oEYhhqwK1OUm2otDXiJwOAtdlFnwQGq0DZdU63Ngp7Ur6LmGFOIK rOnbRiQUIjg5bWAIxuh5C5rFQrqcxHm67kMuu6WfnCZNYCdncbtBrL0X5a9uJTjwbunh WforcvBJDNr/OstyMRy1gq1OoodSA0wNvKVrQZIS97cVU1LklwUGyMYURz/VlNp4aZqQ 8n9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=O//1fsnSIZl/qZYdPGy7Kgy5AC0iiFOxPF2WMdZrKEg=; fh=uk97TQgkuGjh8JequwyihMINeY2lqu55vmNpCXVcDbY=; b=GAtdngQafNrSxVMR8ByMgvTBRaqWiL7MmUqYP1hb4vJm2H/6Ve7jtwiRq9glEPJyev Mqq4RyGM9hoAApFmki+HgdscqXuTim7wtrUEQc6aES0Wnpcbh6BPSTAhmGpqBK8KQ38s 8qpQerSlvjdSbnjciQO+T7aHsVC6BCSZ+CokwrjOJFQ79OjSU1u27E0Iy2ORchbK1MZz gkT+5dulL0kHKnTPgOE4lyn7HStU/o3WHSEewbEL5r+1wgOltSr3eiCwdV7Or6NBfXNN TPHfjdbZMR7Om3Nx+P07GD1JaQHRasTDYX6ps0LGXC7uWAsxUOQoxSRPmoJ1VA6KpMtM 8uKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VbnGo70c; dkim=neutral (no key) header.i=@linutronix.de header.b=3WY3Xh5U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n82-20020a817255000000b0059bdee627d5si1559378ywc.149.2023.10.27.00.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 00:24:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VbnGo70c; dkim=neutral (no key) header.i=@linutronix.de header.b=3WY3Xh5U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 20E8781F70A9; Fri, 27 Oct 2023 00:24:20 -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 S1345363AbjJ0HYF (ORCPT + 26 others); Fri, 27 Oct 2023 03:24:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjJ0HYE (ORCPT ); Fri, 27 Oct 2023 03:24:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE66E116; Fri, 27 Oct 2023 00:24:01 -0700 (PDT) Date: Fri, 27 Oct 2023 07:23:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1698391440; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O//1fsnSIZl/qZYdPGy7Kgy5AC0iiFOxPF2WMdZrKEg=; b=VbnGo70cgtk7inlZGoUs8cHI7wppwyITCaDRuQaXsoKv48ZF9OwO9UCSc3RBOfK6kYRlGy DcYQZRXQbWg+To9s5i+R+Tc4BKHTPeGN5URvuiSsFmm893OqRacMvbjlBwhCDZs5AssjyY 9yAuUlV7yPk4qx47GqvZ57QP5VT8uv8Y0wJIO6KZ0rLvbsEfMSevpOGJ1crz14kgrwKHJw 3aX/ozdzhRutX7XzvWS7qa7fXkzDB+FdltVm3xkttmDzU0o5F5Hk5i08IL3/TqPAAsCwIx LMlrSDxSMN4H9MPLHuBoCOKIMYTeNUSFZPRgv0qj+nmM4Cgj+MazHU3YMhmr3A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1698391440; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O//1fsnSIZl/qZYdPGy7Kgy5AC0iiFOxPF2WMdZrKEg=; b=3WY3Xh5Uf2Ai/4uJVd12SOBNAH5SAXxOoVgbPKaelLzS30uZcnbVu2YnoB15kEUsb/mye7 ArdxiDIJgQY48kAg== From: "tip-bot2 for Rob Herring" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/ls-scfg-msi: Use device_get_match_data() Cc: Rob Herring , Thomas Gleixner , Vladimir Oltean , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20231020130255.2954415-3-robh@kernel.org> References: <20231020130255.2954415-3-robh@kernel.org> MIME-Version: 1.0 Message-ID: <169839143971.3135.1761692121713696071.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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, 27 Oct 2023 00:24:20 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780279910944396637 X-GMAIL-MSGID: 1780892529050966676 The following commit has been merged into the irq/core branch of tip: Commit-ID: 08d4c174828d868d314d2475fbcaa1393f0bbba9 Gitweb: https://git.kernel.org/tip/08d4c174828d868d314d2475fbcaa1393f0bbba9 Author: Rob Herring AuthorDate: Fri, 20 Oct 2023 08:02:56 -05:00 Committer: Thomas Gleixner CommitterDate: Fri, 27 Oct 2023 09:15:44 +02:00 irqchip/ls-scfg-msi: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data in a single step without the unnecessary intermediate match pointer. With this, adjust the includes to explicitly include the correct headers. That also serves as preparation to remove implicit includes within the DT headers. of_platform.h currently includes platform_device.h among others. Signed-off-by: Rob Herring Signed-off-by: Thomas Gleixner Tested-by: Vladimir Oltean Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20231020130255.2954415-3-robh@kernel.org --- drivers/irqchip/irq-ls-scfg-msi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/irqchip/irq-ls-scfg-msi.c b/drivers/irqchip/irq-ls-scfg-msi.c index f31a262..15cf80b 100644 --- a/drivers/irqchip/irq-ls-scfg-msi.c +++ b/drivers/irqchip/irq-ls-scfg-msi.c @@ -17,7 +17,8 @@ #include #include #include -#include +#include +#include #include #define MSI_IRQS_PER_MSIR 32 @@ -334,20 +335,17 @@ MODULE_DEVICE_TABLE(of, ls_scfg_msi_id); static int ls_scfg_msi_probe(struct platform_device *pdev) { - const struct of_device_id *match; struct ls_scfg_msi *msi_data; struct resource *res; int i, ret; - match = of_match_device(ls_scfg_msi_id, &pdev->dev); - if (!match) - return -ENODEV; - msi_data = devm_kzalloc(&pdev->dev, sizeof(*msi_data), GFP_KERNEL); if (!msi_data) return -ENOMEM; - msi_data->cfg = (struct ls_scfg_msi_cfg *) match->data; + msi_data->cfg = (struct ls_scfg_msi_cfg *)device_get_match_data(&pdev->dev); + if (!msi_data->cfg) + return -ENODEV; msi_data->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(msi_data->regs)) {