From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (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 668F1372EF7 for ; Thu, 16 Jul 2026 20:30:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784233805; cv=none; b=tID3GBt6EoTQGpyftK3gSWhFRPcZoL+RWGYu9WkigiL5+gPTbJHu6lDbicdun0srheudS3GFBLXVUTnsmFebUw/qEI+wo4sk+AyvZNt4oZk7boihCwQRBrwLhz1IpgmUlCGP0ZLBZXPqZv24ptsjqCeD3o8L16bh/x3C6GCj1iw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784233805; c=relaxed/simple; bh=aiUf3J/DMgL7A60YXutHrKt7mc+0jAQzbAUeMGys5WI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bg5SQb0yjjHz+f4KcKZ8KXw7vKRbFK5XR68du0ifJZQN/mWe2XZdu2FjluAUHUxHz5BYCs68an6rI0RyjZ95BpEK3ybnKRBAOxxxUuAHnmbofxdD+twaev4aOzmoRysbtYLSTx7mDAcusp+eU4DE/29qvNf9G0V9kh2RcjHj1KA= 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=YsJPRtSV; arc=none smtp.client-ip=209.85.210.181 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="YsJPRtSV" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-8485ef63b68so6581729b3a.1 for ; Thu, 16 Jul 2026 13:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784233801; x=1784838601; 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=j86JWTDEYzHZnOUJNqNzQRfU3fCHXDlbngSp/YHU0R4=; b=YsJPRtSVBWH+IFzozQT0+qPD8jorJwKOEuJy3ptMJmJqC4rawgSgbrrK++wI5PTb+Z VMp05bXXMC0p2Pf4+/wMwmGebT0tJ+wIjZ0QC2TxFceblvUgsLil9C3Av137LDo9Q2q+ Es81T2fxhY0MNfDf47QKieK6T5NDrbmnLEGQoTjM6NXJnu+l6xkrzM7lJiSeVNI5fPOt bDrVeuHERr4+myV9Qjn/pBYDBgz4lHk1U48CzT2BUqBlcxcIi6YVwkEco4ElxcvxoW4J QE62N/SXN2jNqVZMk9w0qMDBMrS4kf6pRWZJe6+K1AfxPtc1OjHibIO5+Jhsou0k2daj qGkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784233801; x=1784838601; 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=j86JWTDEYzHZnOUJNqNzQRfU3fCHXDlbngSp/YHU0R4=; b=XzBegcNi0aVXirR+b/3t61dD1Zf8cfKmrh0Hq8lbR8caqc0BStRFZSdSSeyXhYQQen B3v0qiHWog7mCmTgSlcdDYpLzFpzIzC6th1cRzjun/4VX+dTcp/D8eN6itZGsiw6i5FZ /rRmcd4c9+iA4cI27evgotNXSudQxW5hyRkKfmCj4dkLN0yQsM/KXwlkDbCRGtaTnvso h0IbIds5NVtI2HTBIo5z3r3qIextPQ7QWJTnkNKm28nUsZrE/JacIQ/Ef5mC1mKTIdWF AS3VhN5jo1Bx41mHSGRDty8dapVnNBGSRfGfP9nzNqd2qAcprOMikovhYmk0z6K1LSMp RluQ== X-Forwarded-Encrypted: i=1; AHgh+RpzYbNFpnOe+WYXG4pg00JKJKqR1D9zScRZn+ZihXWlAU14P1S05MmbWprKgIiBY6m2ox2IWbr8pDi2SeQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyO1jgNnbJUlzKt8omnQ1zqywCFeM4fbKWW6MYQ7+mC9qg/wpkS 7ECSPp/okcF9gdXNs8bTmtv9ctfHX4csNyR1N8enxC5nvUu27FHpukw5 X-Gm-Gg: AfdE7cnEwu1wvfPRhNFfq0ZvvHu3gqaPJH4XY5wjLl6dErLkNFsRzinAe6XZs0QGdlj MMVDz+wnyIju5mruI6NXuxUqRk1aK8aOj1ZUo/X85ugpcjWofOA3R/zWlVDrdJDRUmgj4k0VtyJ xad+Yuydlt3b+yqRY5CHZu3f9Ds1EzJ1zybkGcTaEuS9/qwH3NfvmeKPE+mluBXipMndgOJ2WDS R4ZvIcwlqEGjKzhECMAWPcHH3Q0WRSgBblVN3LtDr03CJFRuLUIY6SFmKhIzxmKV3PXSw8oyEq8 HuhRu9jd5TfDVhlB4rr+yc+XMynaJ6HZZNcap94aHwVoDWL8ORawu766TorYmbmPeYcheCeoLgN +7PCPORHV1T8qd9ncPq9d6qMGBPsIrsz5gPVr1fwammLP7IYUCj6Edqp+5nbc8D09qfYBtTNvTq Z/SgpeTNIHLlk0VarvxNMNMkyqzVp8r4K8y/KB2zKIC9Yf5oPqIqTSfQqpZFaUindR0pNhLMM25 IXpJtr4ixQpec2DZNFVw0VX1fmutN13pPg7sCiZuuv+JDxpwAGqWy0= X-Received: by 2002:a05:6a00:6c86:b0:848:60d5:9526 with SMTP id d2e1a72fcca58-84a558201c9mr11417799b3a.43.1784233801270; Thu, 16 Jul 2026 13:30:01 -0700 (PDT) Received: from ryzen.lan ([2601:644:8000:7a86::e35]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84a4f26f703sm5536776b3a.17.2026.07.16.13.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2026 13:30:00 -0700 (PDT) From: Rosen Penev To: dmaengine@vger.kernel.org Cc: Vinod Koul , Frank Li , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv2 4/4] dma: fsl_raid: use devm_platform_ioremap_resource Date: Thu, 16 Jul 2026 13:29:49 -0700 Message-ID: <20260716202949.677290-5-rosenp@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260716202949.677290-1-rosenp@gmail.com> References: <20260716202949.677290-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 the open-coded platform_get_resource() plus devm_ioremap() sequence with devm_platform_ioremap_resource(), which fetches the resource, requests the region and maps it in one call. Switch the error check to IS_ERR()/PTR_ERR() and drop the now-unused struct resource pointer. The raideng node has a single reg region (0x320000, 0x10000); the job-queue/ring children are separate OF devices probed independently, so the region reservation added by devm_ioremap_resource() is exclusive and does not introduce overlap failures. Assisted-by: opencode:hy3-free Signed-off-by: Rosen Penev Reviewed-by: Frank Li --- drivers/dma/fsl_raid.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c index 524f83faf3da..2d86f61105e5 100644 --- a/drivers/dma/fsl_raid.c +++ b/drivers/dma/fsl_raid.c @@ -751,22 +751,18 @@ static int fsl_re_probe(struct platform_device *ofdev) u32 off; u8 ridx = 0; struct dma_device *dma_dev; - struct resource *res; int rc; struct device *dev = &ofdev->dev; + /* IOMAP the entire RAID Engine region */ + re_regs = devm_platform_ioremap_resource(ofdev, 0); + if (IS_ERR(re_regs)) + return PTR_ERR(re_regs); + re_priv = devm_kzalloc(dev, sizeof(*re_priv), GFP_KERNEL); if (!re_priv) return -ENOMEM; - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - - /* IOMAP the entire RAID Engine region */ - re_regs = devm_ioremap(dev, res->start, resource_size(res)); - if (!re_regs) - return -EBUSY; re_priv->base = re_regs; /* Program the RE mode */ -- 2.55.0