From patchwork Fri Mar 1 17:02:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 208955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp17698dyc; Fri, 1 Mar 2024 09:07:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPjuQ+a0VuBmOTU0E8Cxl2rGWSqfU9scSwmfzNWltg+qoGKgJ5y+EQ+rPnwthJGVph9OChImv+qZI6b81/36caGTw+Rg== X-Google-Smtp-Source: AGHT+IHLLKQIP6GOpe619MvzCweeniam4b5l0c2fWwygEQJbWYuVVviQi+joM0mLdrKqX0wNi0+/ X-Received: by 2002:ad4:46d0:0:b0:690:58a4:360c with SMTP id pm16-20020ad446d0000000b0069058a4360cmr1715723qvb.45.1709312874300; Fri, 01 Mar 2024 09:07:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709312874; cv=pass; d=google.com; s=arc-20160816; b=mOehCsJAh3diiEulyCZ5uko4eIqOrWriPIM89Kdt9cer0+Q0oveC1r4fw0VZajq+to 0EB0MdRF9a+i3ZDDAheAf0GQSoKmhxKIJJ+ko2tFCFAc5YUiqqH98WuvaCpDFoo6Hg+/ vnu3gay7V0yGUcAjJrWTLDXDSfZQq5KXNkDcIMjKVUL5ihShlUCv1Gj52kxSZEcXPrms /546nAHVCCWDywURBUnxoWJwJGtijO4fwUZgcbwrhlG6kqQijKcASpQUfYlKVXzBMs25 r3P71GeBCSUZDJpliR3T1HlybcuW0EWwrOc+MKif9OFmJ97gvpwaqqQ4Ucl+Gv2Mz7PN 8B0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5D+lwpw4B4CqzaxbOzMn85Ig/zR5F9N9xKtP1WaY0I4=; fh=5YY94Yk/jiUSyBUL/kW/BSBraU6Tx38SiQFsJQFDRtQ=; b=YxQpixl1U17YTs6xrVbiMQIS4juRvNEAVDf9R/AhAU3/RBtqCPCeh1iua3eDXLr16l mN9A1uQS/CT7CaAJn9uC0tZ7WvHwqfHSoNNpM8cpvNY57XbcTolUWWE3EWLLXOHKM9EY RHgG1oVMmN1PRRkswJZnfZXbR+5yH/D/SevSEkpEcfhDM/34ibqSjhwf/W92wjU3Qp0f MQpT6fqmj1gNpxla3YKdRn5X7rWGj9SXg4BwmXMpEpRsHH1GcIcsAer1cyn22WvgsdkW BSEoB21tjIajC2tj0WPiBz5c/haSpr+GNiZbskUP/GQUsC6NgHyFioMb7KMgpnl1xFuS /0NQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UoiXNq1Y; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-88792-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88792-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gg12-20020a056214252c00b0068fd34ed059si3910870qvb.291.2024.03.01.09.07.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:07:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88792-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UoiXNq1Y; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-88792-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88792-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F17941C2605D for ; Fri, 1 Mar 2024 17:04:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25BC35396; Fri, 1 Mar 2024 17:02:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="UoiXNq1Y" Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BA8521370 for ; Fri, 1 Mar 2024 17:02:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709312576; cv=none; b=mttrk2VtSDbPHO/7/P2p6paGVWyrg/eD2WwnGK9bPHw42LOY6n0v8/NextD/ZIsECQHl5Smf3K0p5YoftnU5J3Kem2RGY7fQizeHeUiClPPR0MfJdm43pBcTmkwbOPtjvDfZPKPGSIb3EcScY7gTGlFVZhZCnyxibsJFBRPCoII= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709312576; c=relaxed/simple; bh=Am0NKmlCwgLy7Njo99K+o5i4CrEnaQkPIJSAd0GcvZg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PvC/usfoBjST3B41/JRfJam0o6Z+3KndyGyhbtvG4MTqf00t1aHFjuYVOXnoLJRPWfrKnI6mKKHBACNiyJNjcfnoJ28mXanuvU9Og+LVkOaY4wAcKW2CTnqAy3qWUzpf8HCyPuPMPiJIxvX/RSPOkLMt89CgSXzYr+jwJB5EVls= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=UoiXNq1Y; arc=none smtp.client-ip=209.85.166.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-365337ad3e7so7717795ab.0 for ; Fri, 01 Mar 2024 09:02:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709312572; x=1709917372; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5D+lwpw4B4CqzaxbOzMn85Ig/zR5F9N9xKtP1WaY0I4=; b=UoiXNq1YIse/AYhZrBjeNzM++GGQGFq9Ey6Ss73tCz4yKRng/w92bL2oPBe0j0KBSb sFADnKJ51BglRq4K0hCoRsx9qRaOqhb6bnSGHD3604Muzw/NvCk95+VSbhOjtRnDfXit oDMp3CHa+n4nqSKUmEIACbxyiR7HcYYG/NSbvt4gmdfNm2hColtUbZsGVdyEzkpjlnfK PH/vBB5ZBdKP+x+varCLCAzZror7efDGkRcNmoBZUweLURWvDUVw6ykNWGY5JIPJNfPF nbUffIGAJFNqijTjujOUCefemb5CkWdMt1MFd5XcQWTElWR17FpRLQ+YnQTwQHyLpvb1 mf+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709312572; x=1709917372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5D+lwpw4B4CqzaxbOzMn85Ig/zR5F9N9xKtP1WaY0I4=; b=oSzLhwZ1v5Vn1RImdBbRVBy+eDmIwAPoKwAUKro+pll3IAFOBnxXMNCXE7TH8ryvNp vIaLpfAYclftD9DsrUqyG4q05kxwmQ7jbyRtyVLQTP+yst9yHUbuQ+22j0OKFIhfKoKp HHvIw8XEt4UG5SSgYDyBkgpmiQtCzhom7sgy3Lt1wGOsO0zKnLrtz53m0SJUg9LBCnb+ ar9XIWQ3ulEYSZZiCUCRkdb5IeNqGVOyaQdCzXcf0tzbYrY0vjbqnhJv5ILM2n8prNjH FvL7akWasBfs6P9GbJG/K08AW5VwKAwJ6vD4+VYktFqNjJLlyKcVQyAi9l6KngpkUjVD 15uA== X-Forwarded-Encrypted: i=1; AJvYcCU4KnG7tW+tGyrYGxH0wBAb7IENFT9PC8sYqG4m7USzMr8zk2T76hgla68hbvHCeWw0ivrhG3sB4bSTzIWmISx03tYPZfRnz7t50jo+ X-Gm-Message-State: AOJu0YzFNreYGu5hz87+NxFI/IXsZMPMygWvazoXbnBd/BGyMmm60vvl OFak0LuSfOrDCOOVJXgKrh78B8OH1RCiMV1Dxr5Rik5G3ypntZY41LoNzvhbBZ8= X-Received: by 2002:a05:6e02:12c3:b0:365:b574:960b with SMTP id i3-20020a056e0212c300b00365b574960bmr2458398ilm.18.1709312572586; Fri, 01 Mar 2024 09:02:52 -0800 (PST) Received: from localhost.localdomain (c-73-228-159-35.hsd1.mn.comcast.net. [73.228.159.35]) by smtp.gmail.com with ESMTPSA id o2-20020a92dac2000000b0036581060910sm991430ilq.6.2024.03.01.09.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:02:52 -0800 (PST) From: Alex Elder To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: horms@kernel.org, mka@chromium.org, andersson@kernel.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 5/7] net: ipa: pass a platform device to ipa_smp2p_irq_init() Date: Fri, 1 Mar 2024 11:02:40 -0600 Message-Id: <20240301170242.243703-6-elder@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240301170242.243703-1-elder@linaro.org> References: <20240301170242.243703-1-elder@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792344456601412714 X-GMAIL-MSGID: 1792344456601412714 Rather than using the platform device pointer field in the IPA pointer, pass a platform device pointer to ipa_smp2p_irq_init(). Use that pointer throughout that function (without assuming it's the same as the IPA platform device pointer). Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_smp2p.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/ipa/ipa_smp2p.c b/drivers/net/ipa/ipa_smp2p.c index 5620dc271fac3..8c4497dfe5afd 100644 --- a/drivers/net/ipa/ipa_smp2p.c +++ b/drivers/net/ipa/ipa_smp2p.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include @@ -179,14 +179,15 @@ static irqreturn_t ipa_smp2p_modem_setup_ready_isr(int irq, void *dev_id) } /* Initialize SMP2P interrupts */ -static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p, const char *name, - irq_handler_t handler) +static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p, + struct platform_device *pdev, + const char *name, irq_handler_t handler) { - struct device *dev = &smp2p->ipa->pdev->dev; + struct device *dev = &pdev->dev; unsigned int irq; int ret; - ret = platform_get_irq_byname(smp2p->ipa->pdev, name); + ret = platform_get_irq_byname(pdev, name); if (ret <= 0) return ret ? : -EINVAL; irq = ret; @@ -261,7 +262,7 @@ int ipa_smp2p_init(struct ipa *ipa, bool modem_init) /* We have enough information saved to handle notifications */ ipa->smp2p = smp2p; - ret = ipa_smp2p_irq_init(smp2p, "ipa-clock-query", + ret = ipa_smp2p_irq_init(smp2p, smp2p->ipa->pdev, "ipa-clock-query", ipa_smp2p_modem_clk_query_isr); if (ret < 0) goto err_null_smp2p; @@ -273,7 +274,8 @@ int ipa_smp2p_init(struct ipa *ipa, bool modem_init) if (modem_init) { /* Result will be non-zero (negative for error) */ - ret = ipa_smp2p_irq_init(smp2p, "ipa-setup-ready", + ret = ipa_smp2p_irq_init(smp2p, smp2p->ipa->pdev, + "ipa-setup-ready", ipa_smp2p_modem_setup_ready_isr); if (ret < 0) goto err_notifier_unregister;