From patchwork Sat Nov 26 13:34:30 2022 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: 26235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4633866wrr; Sat, 26 Nov 2022 05:35:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4MVwIdnJZTK70xT8BszMYkDkOFqAZfzkh3gAbp5dQI/YJrOhhOLC4O9OgcXrlZp2Kcw1R7 X-Received: by 2002:a17:902:b490:b0:189:5ba2:4907 with SMTP id y16-20020a170902b49000b001895ba24907mr12374380plr.113.1669469717973; Sat, 26 Nov 2022 05:35:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669469717; cv=none; d=google.com; s=arc-20160816; b=EeJaQVVTXUfGC/OFD0ecYPPaGSHqazYmLQ319u2mkcMBU7h5CpGnlTno4W7GpfQ3SY MZQ82+91j8e6KGYRGv2c7gYYNWFzpb+V4lNTTjuk7690IOnz1hi/V7AK9PrtdUfblDL3 e3yrXeA3awxzbPJLofi5whBQaMVNrW2dPsF83zqZ+Wm3Y4/xS6WfL/41+2nCRAAZym7a r45Z5/E+h6TVXkb5/P0bJTyQVFl2ZnBDu45hU1CK/eKWExuFl/O4SqI8CYeK7IhCL2Zc Wpt+zYly5ssIE3mCXvyslNDmBkxlectYDQtP9peNp9LSfofpLY3qdZMEt3Ae2RrkYCfK pgCg== 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=vtKvSRodCD4bDELoD6KWMF2NZFkks97o1d6spmf95xk=; b=LHGR+0BJT4kJ7GOLwPoynAdcAROsuohMXVusYvWiitGSkf+xl9ZF7VJPCCuLrpS0ln NjIPmytaDGV0iLChzlb4NcC6tXu7a+PcurFP4MP3iFkIt/4SN7/ZIV2uiEv57bxlZUAa c0YsMM5sn/v8ecjKOwEBgkX57Pokaczo0OhE/IsvdLg5OZsXouzDhK6Fy0KK7BbNeO14 cciSkVS0lCArGRo74P38XAp/u2aT4v4nA9gX8xPcZRMnAJnSaJy/IcOyIajKrXeG1IwJ UMKr8PdFUXQVOAW670huzXhPyDPCGl0KrLPDnO2aB0hmh1c7nOp6vD/qQhzGwBz+O1DD k1aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="MXW/ZWuA"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=f88uVwfq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a056a00248f00b00557bb4f6977si7693501pfv.106.2022.11.26.05.35.04; Sat, 26 Nov 2022 05:35:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="MXW/ZWuA"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=f88uVwfq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229606AbiKZNek (ORCPT + 99 others); Sat, 26 Nov 2022 08:34:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbiKZNed (ORCPT ); Sat, 26 Nov 2022 08:34:33 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E767A19021 for ; Sat, 26 Nov 2022 05:34:32 -0800 (PST) Date: Sat, 26 Nov 2022 13:34:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669469671; 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=vtKvSRodCD4bDELoD6KWMF2NZFkks97o1d6spmf95xk=; b=MXW/ZWuABsqdDLMLlb2+/i0C6W4rYwTJgmWXumjf8OrTGndigjjy1RtYucYG23W4TYyeXI fyKtd5tKLPfGpkFomTGpHC6Q3nPMenqpPMvrJVU/YkMjNTpC1DvbpneOEE/6r6DTVWuKUk XDZWBWkauuuSxp35rvQPJThYUWL0KSSjnl/5TGlV9t/Ndz+VqpjLmnegFv9toB5lwnAok+ Trk68aTIQ3AqBkaSkO6fd0xbleOszKsoZjcnhBRLhx/KXLnLxRO4C8S1LtcAFOBrWEVgfg nprii3M5yygjywfLoFi8AH1jed3yht49HH8YkCGuALq1Y42wNADLuWn5TMak2Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669469671; 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=vtKvSRodCD4bDELoD6KWMF2NZFkks97o1d6spmf95xk=; b=f88uVwfqe6jADfJ4zDJxhh9BYHgzwwAiq1oOM+lvT2r5la7gwV7BW/F8e2u55sqlXO+fDN 2uN/x1kZvT10hVAA== From: "irqchip-bot for ye xingchen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/st: Use device_get_match_data() to simplify the code Cc: ye xingchen , Marc Zyngier , tglx@linutronix.de In-Reply-To: <202211171916504943604@zte.com.cn> References: <202211171916504943604@zte.com.cn> MIME-Version: 1.0 Message-ID: <166946967037.4906.1264875949138742444.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750565878650083462?= X-GMAIL-MSGID: =?utf-8?q?1750565878650083462?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 4e08a286b1f7a0a32828d6411255296e4ef51fa6 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4e08a286b1f7a0a32828d6411255296e4ef51fa6 Author: ye xingchen AuthorDate: Thu, 17 Nov 2022 19:16:50 +08:00 Committer: Marc Zyngier CommitterDate: Sat, 26 Nov 2022 13:29:42 irqchip/st: Use device_get_match_data() to simplify the code Directly get the match data with device_get_match_data(). Signed-off-by: ye xingchen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/202211171916504943604@zte.com.cn --- drivers/irqchip/irq-st.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/irqchip/irq-st.c b/drivers/irqchip/irq-st.c index 801551e..1b83512 100644 --- a/drivers/irqchip/irq-st.c +++ b/drivers/irqchip/irq-st.c @@ -153,18 +153,13 @@ static int st_irq_syscfg_enable(struct platform_device *pdev) static int st_irq_syscfg_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *match; struct st_irq_syscfg *ddata; ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); if (!ddata) return -ENOMEM; - match = of_match_device(st_irq_syscfg_match, &pdev->dev); - if (!match) - return -ENODEV; - - ddata->syscfg = (unsigned int)match->data; + ddata->syscfg = (unsigned int) device_get_match_data(&pdev->dev); ddata->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg"); if (IS_ERR(ddata->regmap)) {