From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D7F13806BD; Thu, 30 Jul 2026 15:52:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785426751; cv=none; b=RLKvYY850Xdwnb67ys/wobKY/1UVZlDgD62IM3tjhym5FgPsqPzAwEJuN4mxgwGE99xjEvU3iPhxs56I8hTEo8Dvcxy5UXrg/Zjw3JYg4d2Qk3N/p5NBAhvd10o2MgePvxjnc5vrbdWFx7Ol9vDPRXG5x2Eja2euQLhA8HB9+I8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785426751; c=relaxed/simple; bh=UZVUMriEtrw+UsP8hLKmtO/6SnsuSq8HTRR5UTMRikg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tRratqcvBzFCShl1ihAxKc9ElQKuI7X86WK0wc5BqJiO57czt+aP6Jr+BmmIALjOev3bQ/Asgtab/dTQMJUUtp8o8P/FtrQrA3HrbIXV9UV3uB1AJ1AZ169L5dUSq1y+eu3qQKoGqJ4ygHyaaUA3vXLw4B9ICRND3Debq6yYIpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Qp40Pftc; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Qp40Pftc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0BB01F000E9; Thu, 30 Jul 2026 15:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785426750; bh=w6ABnsv2+7HUkOMZJdYvDrPdIVIly8WsIOWAQva6FTk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Qp40PftcOyp4/5hyW9DHb2p6Nnw2aEzqqrG7iLsiAbhiIV1Brx3EDrgcEnGkUro2Y ma2kJT4x0Z6MsoZaBss4iOEqJggagpGbaseC9uaE9vt6xailRrcvvkoKqOJc5gk9eh +n27br8PNcNBM8kq9tr6POX5HqEDntB86sZUoUzo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Krzysztof Kozlowski , Manivannan Sadhasivam , Vinod Koul , Sasha Levin Subject: [PATCH 6.12 530/602] dmaengine: dw-edma: Fix confusing cleanup.h syntax Date: Thu, 30 Jul 2026 16:15:22 +0200 Message-ID: <20260730141447.151570992@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141435.976815864@linuxfoundation.org> References: <20260730141435.976815864@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Krzysztof Kozlowski [ Upstream commit f9ef8dedee34e2d7828d5a6a0643cd969aaa8437 ] Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this potential interdependency problem the recommendation is to always define and assign variables in one statement and not group variable definitions at the top of the function when __free() is used." Code does not have a bug, but is less readable and uses discouraged coding practice, so fix that by moving declaration to the place of assignment. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20251208020729.4654-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Vinod Koul Stable-dep-of: 11d7cfe0c119 ("dmaengine: dw-edma-pcie: Reject devices without driver data") Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/dma/dw-edma/dw-edma-pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/dma/dw-edma/dw-edma-pcie.c +++ b/drivers/dma/dw-edma/dw-edma-pcie.c @@ -160,13 +160,13 @@ static int dw_edma_pcie_probe(struct pci const struct pci_device_id *pid) { struct dw_edma_pcie_data *pdata = (void *)pid->driver_data; - struct dw_edma_pcie_data *vsec_data __free(kfree) = NULL; struct device *dev = &pdev->dev; struct dw_edma_chip *chip; int err, nr_irqs; int i, mask; - vsec_data = kmalloc(sizeof(*vsec_data), GFP_KERNEL); + struct dw_edma_pcie_data *vsec_data __free(kfree) = + kmalloc(sizeof(*vsec_data), GFP_KERNEL); if (!vsec_data) return -ENOMEM;