From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 EA72635203D for ; Thu, 9 Jul 2026 02:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783564328; cv=none; b=Bydn/zBJ3u/6OfKHu4zRSpRGGb9hTPe93Gbb2tK+KPtAz0DzgoB7fR4NxSQWmTPuTju0GBD5ByXg7Ec2KdPQ7YTVhNE8x0qwWy/fwpP+A2aKalmkZr+J05ognENhCVqassnEOkDyRf5pyr7I3XDKzXnQZWT21yVJOXx9qUlJP/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783564328; c=relaxed/simple; bh=wJjNXunTmN/MYe4oUjZRp/YGTs91QQlxjgUklhWSgMc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vb1u8qS33Uo3pd4sRmhqeZswAHcDd+Ki9mFZHFyT/3lL1Z+o990JQY09UlTDFp1LVcAieQ0znC8a8YRcNY4Y7RO2izH5M32kCY0Ml2N3smUYivRvfHRjvcYz9+cRncLPT/N++iT7n6gxMwciK3JTzV7qvoH8DJznu7IphXxh0lM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=rlyUsasN; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rlyUsasN" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-845b6d9bf39so458179b3a.1 for ; Wed, 08 Jul 2026 19:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783564326; x=1784169126; 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:content-type; bh=koaJY8MiU+/O0i7vIvjrCwskqgMmon3+CjPbqR68EWg=; b=rlyUsasNUaAQ1+Wv3XdCD9ACGWVmDCGLsIXL0w7IUT/4jk7x+kMhuGD3vpbe7jlj/r FZ6e9Tv0jFMcMWtRsp+V0KLyaMJYeB9cHI4azhadnOpru3/3pEf+Gxcr/xy53MRtdMsZ xeTlDkgGYE9MLrR6BcI7ebIZvhvrRKwiv07EQSfdpbHCShpBVen9nrNBlDhsv8u4LMcB z0giF/lqSNx7BSPMY4sCDtHuX2isn0IvPxMc+L3gGP8zPSrqgmWfh0FXK+11u+3VR94+ zdJ0QGtSX20oaiJ65vTUfUZfwzxoN/Y+fVTnXRYJkoabwaB5Tp0aQprYN0rItyhM+5ff 36dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783564326; x=1784169126; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=koaJY8MiU+/O0i7vIvjrCwskqgMmon3+CjPbqR68EWg=; b=bDnCYuHSfA7fJ6oiwoksD3pgDg6cVRkLB4c5sttlMVJ6NzQm4x7w2zxjz1FMNhZva0 bjYX+RB9RaMsCutCG295KHLdyXASOzbfAH3AyD0a9aCwuAlnZvlVDAqQVTr+ZJrjsL/s WU8JJJX+sKcIRheH/MS2hVbE9CiEZWJVxky/M8yFr5mL/WQSFwln3ZHn5pPAUtamRVPg Sj2mVVBtup7zwJH8BrmPz+5BsiWx9W16CydP0d9zT+jRbXV8L8UVL2CdyIZDo7vFBf1a QBPV9sGU3udPFiLjZ5XncsvgG53PA5yy7o4LAmDbghe8noYUjr8Qi1KsB0ALX/WZqbzO Icsg== X-Forwarded-Encrypted: i=1; AHgh+RqvyDeMLU/eUqS48UnLxqswcTZiVCHhhcesshKJI90ktJW7/IWty0wBdX9bm2B+/3gial98ENem+pFN444=@vger.kernel.org X-Gm-Message-State: AOJu0YxLPPq3UTG3tlze3F3z9BrHd5XBcvjA0p3BPFYsrlyO/LTaEKd3 6mXK5KQQL3lFyJw5Od+JSFFWjxloiBlf3eX3p/Dn50ZfDsqT64faNXPG X-Gm-Gg: AfdE7ck621IokP5xOCypEBmFuUE7gUBo9G7Kxid2Jd86L/owGojEVkoQqgmh5Co4MuN anMk9+1cMEm1JXKNhchwZ+hunOAbBPuU3McMmiJQSqLL2LR8hR31FZjFbTtisgDECVkML9389dP DHsBR6PWk1CevXV3j90OsfTp6V+v2Euw8R8N8Jg5oHMPyjcMh5xunrXT3kSdhFiw5tb4LGYOkh6 YCUC6W8E64zq03q6BOAl5jUI4OV3YLl3R5axC53oORFQaskeetVQPmsiLpaJSpVM3W7f1SV5hGQ v0NAys17gfhCqWlfDthRevAx8AyqVOcJbLq5g3I9BUR9Xf43roVX6BCfJ4Zf5oV1KVt0pLnuDUS wEpcE7V/YPv0sETbLNq0Qka/zYbW3DoDYlxyYgKb2OLLMghnR1Lrnh16M2AlxSHJyzf8iK3kRIr z7QvpVXepTiuVSSJx337SktxTt7zSSbYaTnZ3/p9cbRL4XoC/GkHxXKWlDfBTVWPBqFTFykehnC YU5wm26r/bJ4dV1wmEObcn8bOZqf/8Ho7qXZ+KTniOYHeUc7Ea+a0kEFF98xS2XBA== X-Received: by 2002:a05:6a00:139d:b0:848:50ef:4157 with SMTP id d2e1a72fcca58-8485acfe79cmr864072b3a.27.1783564326165; Wed, 08 Jul 2026 19:32:06 -0700 (PDT) Received: from ryzen.lan ([2601:644:8000:7a86::e35]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847f6b975a0sm7935954b3a.14.2026.07.08.19.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 19:32:05 -0700 (PDT) From: Rosen Penev To: linux-ide@vger.kernel.org Cc: Damien Le Moal , Niklas Cassel , Jeff Garzik , Prodyut Hazarika , Mark Miesfeld , Rupjyoti Sarmah , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv3 1/5] ata: sata_dwc_460ex: use platform_get_irq() Date: Wed, 8 Jul 2026 19:31:58 -0700 Message-ID: <20260709023202.2132165-2-rosenp@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260709023202.2132165-1-rosenp@gmail.com> References: <20260709023202.2132165-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Replace irq_of_parse_and_map() with platform_get_irq() in both sata_dwc_dma_init_old() and sata_dwc_probe(). This is the preferred way to obtain IRQs for platform devices and provides better error reporting. Remove the now-unnecessary #include . irq_of_parse_and_map() requires irq_dispose_mapping(), which is missing. Fixes: 62936009f35a ("[libata] Add 460EX on-chip SATA driver, sata_dwc_460ex") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev --- drivers/ata/sata_dwc_460ex.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 4fc22ce4bd9a..442c6e9d06e0 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -226,7 +225,6 @@ static int sata_dwc_dma_init_old(struct platform_device *pdev, struct sata_dwc_device *hsdev) { struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; hsdev->dma = devm_kzalloc(dev, sizeof(*hsdev->dma), GFP_KERNEL); if (!hsdev->dma) @@ -236,11 +234,9 @@ static int sata_dwc_dma_init_old(struct platform_device *pdev, hsdev->dma->id = pdev->id; /* Get SATA DMA interrupt number */ - hsdev->dma->irq = irq_of_parse_and_map(np, 1); - if (!hsdev->dma->irq) { - dev_err(dev, "no SATA DMA irq\n"); - return -ENODEV; - } + hsdev->dma->irq = platform_get_irq(pdev, 1); + if (hsdev->dma->irq < 0) + return hsdev->dma->irq; /* Get physical SATA DMA register base address */ hsdev->dma->regs = devm_platform_ioremap_resource(pdev, 1); @@ -1126,7 +1122,6 @@ static const struct ata_port_info sata_dwc_port_info[] = { static int sata_dwc_probe(struct platform_device *ofdev) { struct device *dev = &ofdev->dev; - struct device_node *np = dev->of_node; struct sata_dwc_device *hsdev; u32 idr, versionr; char *ver = (char *)&versionr; @@ -1173,11 +1168,9 @@ static int sata_dwc_probe(struct platform_device *ofdev) sata_dwc_enable_interrupts(hsdev); /* Get SATA interrupt number */ - irq = irq_of_parse_and_map(np, 0); - if (!irq) { - dev_err(dev, "no SATA DMA irq\n"); - return -ENODEV; - } + irq = platform_get_irq(ofdev, 0); + if (irq < 0) + return irq; #ifdef CONFIG_SATA_DWC_OLD_DMA if (!of_property_present(np, "dmas")) { -- 2.55.0