From nobody Sun Feb 8 02:22:16 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 D25B52FCC17; Mon, 10 Nov 2025 08:53:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762764834; cv=none; b=qJ1KJ+aiK/WsRq4K4Qe+XXx/yD4y5WE6rue+a/c3ArWBsyA1RQM6ddfkdAPRYpUHQ0NOaWhhSyWE/UdeWe75kspWaaPxtblFQuURi9qJMfFvXayG+bn2zTjDklJtSTfgeqftxue5HEWFh8H6d7u4mvteSRIakn30oZyp794pDrQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762764834; c=relaxed/simple; bh=crbMG+pzsPkQNipuqRNtjlB6OdHSkO2qYPLzI5EzOjw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RsXrQgX3//dO6IfYyLioN6ZN2PlYRyMhfjpdbIkkozO8ITRoSXxF5zy4FULqVFFOqO4P4/PKmhh79WrRTIUtCsUKIpEwV1RJjaZdkK+8qcKZDAIEDhsvqqIc934Upx/gCFFaXSACR8e06oI60DfuZzZRQRN20/+kpaz/pAgjmgw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=lx6z4nC+; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lx6z4nC+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1762764833; x=1794300833; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=crbMG+pzsPkQNipuqRNtjlB6OdHSkO2qYPLzI5EzOjw=; b=lx6z4nC+DGiRyZjpcEQpTs0EMn03TMazLDWoTPGnyQj4ML0ab/PUF7gl sDZFai+L6ttAXEuKNm347LIQAuaKfKBM8SXGLtoRuRAnob4RZRRBqqOCa wL8ACkJc7I0/Pkd40fOt+o8EejLp1yRgoDJ2RAk0BpKNKjPsKA3iqtUJ4 IalsTT37mS+7S102f2c5KfMQ7jaEeDIlDotO2EcQy0yCnWx8wk+qqVWXP pa9xtXXnooGRvHbtX3De5QrDJzQTnhghQ7hKmZX8mhmXpIBwyNxyfkC2k tiL/EtO9ZTkYfxjFiVgbeu/nsE2g+onIGF2eSV8iVNKnQ7lBNKVZDUXC+ g==; X-CSE-ConnectionGUID: Ew4XA0lgS+2nFUrJbvaQPw== X-CSE-MsgGUID: khTRkNzGQje7mbrzEmE4GA== X-IronPort-AV: E=McAfee;i="6800,10657,11608"; a="63818366" X-IronPort-AV: E=Sophos;i="6.19,293,1754982000"; d="scan'208";a="63818366" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2025 00:53:52 -0800 X-CSE-ConnectionGUID: exRcMnyPTmWxGv7zlDb7Lg== X-CSE-MsgGUID: OGo+ISxGTIq097lQk77ysA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,293,1754982000"; d="scan'208";a="187927395" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa010.jf.intel.com with ESMTP; 10 Nov 2025 00:53:51 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 2449096; Mon, 10 Nov 2025 09:53:50 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vinod Koul Subject: [PATCH v2 1/3] dmaengine: Refactor devm_dma_request_chan() for readability Date: Mon, 10 Nov 2025 09:47:43 +0100 Message-ID: <20251110085349.3414507-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251110085349.3414507-1-andriy.shevchenko@linux.intel.com> References: <20251110085349.3414507-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Yes, while it's a bit longer in terms of LoCs, it's more readable when we use the usual patter to check for errors, and not for a success). This eliminates unneeded assignment and moves the needed one closer to its user which is better programming pattern because it allows avoiding potential errors in case the variable is getting reused. Also note that the same pattern have been used already in dmaenginem_async_device_register(). Signed-off-by: Andy Shevchenko --- drivers/dma/dmaengine.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index ca13cd39330b..eb27a72cd4c5 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -943,12 +943,14 @@ static void dmaenginem_release_channel(void *chan) =20 struct dma_chan *devm_dma_request_chan(struct device *dev, const char *nam= e) { - struct dma_chan *chan =3D dma_request_chan(dev, name); - int ret =3D 0; + struct dma_chan *chan; + int ret; =20 - if (!IS_ERR(chan)) - ret =3D devm_add_action_or_reset(dev, dmaenginem_release_channel, chan); + chan =3D dma_request_chan(dev, name); + if (IS_ERR(chan)) + return chan; =20 + ret =3D devm_add_action_or_reset(dev, dmaenginem_release_channel, chan); if (ret) return ERR_PTR(ret); =20 --=20 2.50.1 From nobody Sun Feb 8 02:22:16 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 C986E2F8BCD; Mon, 10 Nov 2025 08:53:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762764834; cv=none; b=KHD3bAyn+KiyJa7S4rovMf6yjCr8Rz50Ghp5z8lFPZveK34m+w1ZuCf739gL8xCF4CBrIgyzw9Y6K40UbQjwVb0B4JcyHm2n6RsxHemC41OimEpI255fjv0wSPHlbjMpaHGQUyeM9JgViSjb7sWQvlvbsJaPsXTdtZJbVacc/tI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762764834; c=relaxed/simple; bh=qwht3GzK11wQ8hpSg6RKkjg8kNqA3LIUGM0DR5z5u2A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aIXjWzlL/oh4+NgVSZ5vfFKWYGRdnYKziUUNAi8qbl5gEex+uyDUJCV1o/94F0R6PzYPG9ZnNoGAUtF3J3J/ZsJz8hQnfO5UIS0Ifx4KoSYzVhzXAFUsttiVedQVI1kf3sYiHlUm8FRxke69w5msGLnu+I7ycVK+T5BYCYfJL78= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Cxicmgdv; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Cxicmgdv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1762764832; x=1794300832; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qwht3GzK11wQ8hpSg6RKkjg8kNqA3LIUGM0DR5z5u2A=; b=CxicmgdvZYzlRTER+7w5ovS+gIrpKmil3CzpxAuhhB5eN88u7QKr12Xx HDXtwSgGlLSckmFWjnCaEE/nHSj6MAQYJzyraMsi5/aUMDjifRdvHCPZT MVJ3Dmp0M3uky9bcSmMnXGwY+EPBa1ukGpysaIp4h87//4MUjTM5FYWr2 ne6T9BOqZR5uCM0nMsUNmS53GBjy0rROObHKey7CbFfm/xpPp5fh1vg4u Y6tShqFAYFvLPiNdq15tRPSZUbkwyJiNYwZ9bAWMVbAT813Jt1mWwqd4n wZ1ov/2naVNdVnBalsRPEt2IrM54S7EihhGlz32PkM/Iq5UCN4aB8mz4W w==; X-CSE-ConnectionGUID: QyJSBxITTLeDJQ1hHkRhcQ== X-CSE-MsgGUID: K+qudybDRlKnALkrd8iGnw== X-IronPort-AV: E=McAfee;i="6800,10657,11608"; a="64017089" X-IronPort-AV: E=Sophos;i="6.19,293,1754982000"; d="scan'208";a="64017089" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2025 00:53:52 -0800 X-CSE-ConnectionGUID: o9AiBZPKRO2n8vqBDBx1lg== X-CSE-MsgGUID: fzkoiaKCQTmzb1KC7Hjptg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,293,1754982000"; d="scan'208";a="188575529" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa007.jf.intel.com with ESMTP; 10 Nov 2025 00:53:51 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 28F7E97; Mon, 10 Nov 2025 09:53:50 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vinod Koul Subject: [PATCH v2 2/3] dmaengine: Use device_match_of_node() helper Date: Mon, 10 Nov 2025 09:47:44 +0100 Message-ID: <20251110085349.3414507-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251110085349.3414507-1-andriy.shevchenko@linux.intel.com> References: <20251110085349.3414507-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Instead of open coding, use device_match_of_node() helper. Signed-off-by: Andy Shevchenko --- drivers/dma/dmaengine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index eb27a72cd4c5..e89280587d5d 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -765,7 +765,7 @@ struct dma_chan *__dma_request_channel(const dma_cap_ma= sk_t *mask, mutex_lock(&dma_list_mutex); list_for_each_entry_safe(device, _d, &dma_device_list, global_node) { /* Finds a DMA controller with matching device node */ - if (np && device->dev->of_node && np !=3D device->dev->of_node) + if (np && !device_match_of_node(device->dev, np)) continue; =20 chan =3D find_candidate(device, mask, fn, fn_param); --=20 2.50.1 From nobody Sun Feb 8 02:22:16 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 753ED254AFF; Mon, 10 Nov 2025 08:53:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762764834; cv=none; b=LZwTgpGTpp1EOuIqAUST0chSfR+dfOQKZj3K9G+aPBfR7vxFbuKBjhmhhw8YE98f/Hruhu/hzDnjy7NbJgTGuL5d0LK6oBZ2trnnm6w5oI0YineQZAN7UF+XjN1Hu2J1pBtqGJduifmgpSXSE5F+zqzuQTqa2rpBQ0QebV7imtw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762764834; c=relaxed/simple; bh=H2Ut4C47TjTTWAEiAZB6fT+V+Bi06YVKL5a7Ju+hC+U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QvXzOsuK+nE95BQGT0JRqtV7O6whC78V2NNPg7TlMYJ5KtdYA7YsuEWj9QGf6og2ztB6vIiPumdvSSPar+VOQPQkO6uPfpZp5UeX4INSY7oXww0JXCrSU5+oDKI+HlPNl5M8zKVE0KWNBS0CJp7TJKpp3aRvAsdC1EYWno8fmMM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TbqrNStJ; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TbqrNStJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1762764832; x=1794300832; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H2Ut4C47TjTTWAEiAZB6fT+V+Bi06YVKL5a7Ju+hC+U=; b=TbqrNStJKBAG17ubxWqsCUFYljUjKDba5yJSh+lcSwHObgS33aCYIfVf k9qj9/Xoi1ESugE9HRYKEH+v/scQRT8MDyww81rbfTG60Kj+k6ksxqRYB eZLgxoAAkNmsOUfxhT5Ee60/vPUfegPD5SFw6bFE3rbo402QvkKjXVtmF JS/7Zy50Rl/92fdOLB4CjFHduBcetgfo6ZEa1Xqc5T1If9zyCBPCnjUjo noYwtVAi0v+BssOMqyORYg0XqWvL6kEmTDnZXywvb1UrPBNgr16IMhCLb miKl7U20xxygjpIwaQFrDBGXTH6H8jmE6FVrjrBa2pAsz2rHyThnpaFWB A==; X-CSE-ConnectionGUID: /lrjNrGAQTqFwOH7sxoenQ== X-CSE-MsgGUID: s3n+L3x9TXSrMyBOd2gJzA== X-IronPort-AV: E=McAfee;i="6800,10657,11608"; a="67417845" X-IronPort-AV: E=Sophos;i="6.19,293,1754982000"; d="scan'208";a="67417845" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2025 00:53:52 -0800 X-CSE-ConnectionGUID: J5AWogJfSsCj2ztNDCWb9A== X-CSE-MsgGUID: WjtjAC/mSKekqckoNB02QQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,293,1754982000"; d="scan'208";a="188458045" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa006.fm.intel.com with ESMTP; 10 Nov 2025 00:53:50 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 2DCC698; Mon, 10 Nov 2025 09:53:50 +0100 (CET) From: Andy Shevchenko To: Andy Shevchenko , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vinod Koul Subject: [PATCH v2 3/3] dmaengine: Sort headers alphabetically Date: Mon, 10 Nov 2025 09:47:45 +0100 Message-ID: <20251110085349.3414507-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251110085349.3414507-1-andriy.shevchenko@linux.intel.com> References: <20251110085349.3414507-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For better maintenance sort headers alphabetically. Signed-off-by: Andy Shevchenko --- drivers/dma/dmaengine.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index e89280587d5d..5bc38424398b 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -31,29 +31,29 @@ =20 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt =20 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include =20 #include "dmaengine.h" =20 --=20 2.50.1