Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp971681rdh; Fri, 27 Oct 2023 00:24:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqTwUdo97Bae6weIDoPpnVzoURDFUfkGNErYzWpeX1eEn5Wk6hbWHLk8p9I8HI60JVYjyi X-Received: by 2002:a81:4c82:0:b0:5a7:d73d:42cd with SMTP id z124-20020a814c82000000b005a7d73d42cdmr1905222ywa.20.1698391458621; Fri, 27 Oct 2023 00:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698391458; cv=none; d=google.com; s=arc-20160816; b=xVgX0Qgebxyelnt6iTmcqgMNcLg1AdZEFYeIpNQd5K3W+UWeZixHDG5PNiw3+LSkb7 UyH5c8qfpsVOeXWbxf6MtlAWoBSMUAJ+hZ8lOCVgGrOeiUcLrZ8V+xEaqZAu/mKQzkMU /XZEG11j/lW0ZfxANeab0wCh1itLsRJJuaKLKZ5gB0E19RQwChO5/KshNAw4GM1d5/Wm 4ZE0R+5KbLliOaNZu5V6ogMEhQ97rp833BN1Cvcmko/rc7MEvVsiqcvA3RccSsKm/y1Q s7WokJxE+7nMX4PInK9sT+IhS+MHqz5lzOqB1URBf8CcyoMnFto5jO2GgPvBdYcNjU3D Hg6A== 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.s=2020e header.b=3WY3Xh5U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id r132-20020a815d8a000000b005af778ed2f6si1500678ywb.469.2023.10.27.00.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 00:24:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; 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.s=2020e header.b=3WY3Xh5U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 1C656829E93F; Fri, 27 Oct 2023 00:24:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345289AbjJ0HYF (ORCPT + 99 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 27 Oct 2023 00:24:13 -0700 (PDT) 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)) {