From patchwork Tue Jan 14 10:55:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13938620 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC07AE77188 for ; Tue, 14 Jan 2025 10:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=w20vK13nhMzbjHJZSCggje7+hpPlrM9z3S//rlxScS4=; b=cfDKk9cNZNQuhx0+RTMGIgUuhc 1q9fulNqkegixN4yjbYlkMVBzjEY9iTWz9cAbzR0WnIPwKE8V7eG0S4Mi+CeO2v2vJdEx830UJG1i 6ikYlqMUF4l8hoWz34Uz/1+FHgp2qhixO5ERz5xRJVEDjTpHNVOrtFthw9alJyVOCBfjZRvhU1aED D+3yIXWyjxXcPjHwpw8Vz5VRP7TFJ8tZJt9VcgCkGHDhSri6cfODLWI2r9dA/Ue9CuDPvsfHLerXb frJkJdgAZWuPnxGXtf1P+eXXGOzuk7r5KWKmdfKtS5hlpib/pzRmG7i2fgtqAsu47oj9hu0Gh+8aY XSz6FwBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tXebW-00000008Ata-2p4e; Tue, 14 Jan 2025 10:57:02 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tXeaG-00000008AZ4-1LIV for linux-arm-kernel@lists.infradead.org; Tue, 14 Jan 2025 10:55:45 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5d3ce64e7e5so789810a12.0 for ; Tue, 14 Jan 2025 02:55:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736852143; x=1737456943; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=w20vK13nhMzbjHJZSCggje7+hpPlrM9z3S//rlxScS4=; b=nkciBBjCa2d2Db1divcVcl3X8QqEQke/YIOyn5EOeBy5MuC7mQTjLUetHMEwWLGT/D JKQzOfD3Na544gtwVsKT1jvdOnE6IlKR1q3YPA3JUaaob0wYGgv73Rk2s0v0+8J1ykTK Svo6LgFbFuM3zVF6MdPkji1l33nEhAlNJXKlPhxMQEw5NcmwkytPOo48FmvfA/sod2bB DlaFCyK1LG88OljXl20MniPqtsyxGpXBWd2pI+ZoA05Q0jvRhzQLrQt4iFqpoE9CjE7C op82Q9LI8KyQeEZ99WXU6ISkK0cEw+tXNejKWNm4MSL26TaW5WPKFvOX9znABJamog9C M7bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736852143; x=1737456943; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=w20vK13nhMzbjHJZSCggje7+hpPlrM9z3S//rlxScS4=; b=Mh6znw26gQguzOK07RHenAGk/Y0uv/hfw4tGCOSoZT0HesPd1vm+1fXCJOjYld6SDI OFeQQBg9hryCcLszcrXftelOkA3ktYRX6r6Zc3yl/bxVvp1NXyokhO0ZS1w5IyC0o1ly rzjqUC+aH6L1sYiloJ9N0/pGSCeb4GcyS2+J5ePPdPx0fr/aaJavwOP/Uq04tJ1X4+Ch /wb3Wg0or26qQ5aBbIzBU81Ma7IJrJcFKzGOO5PFGvc5q9T7pTnESiY+Y7cP2bO/hJ6r t+z5rMd3hZxu/6OwgncfAw7XSkYA/Gn6dnh0QJcZCm18iJH19ZeZNX222JsSQcoyzNGN fRnA== X-Forwarded-Encrypted: i=1; AJvYcCVN4msDNbgCqdAzo3uqAPz1AQW00jG/XlFRnmnTqkbQoFTLDptDx16+TYAGvaaecUUYFEbKuZBPgPEZPF4s8YGH@lists.infradead.org X-Gm-Message-State: AOJu0Yy33870j4p5rLgURacT3liW2XJ5sB8IzO/duraizDnLTqRmMeZl xCrIJAxlCHCNJ+NjiD3jdN5NaBwHtjy5KbJfvd4fBFJFMYYk2AZJFM3f0AYlA10= X-Gm-Gg: ASbGncuraC402tZuhA1cvH569XLB0bRX0TKlSZw0tIxhyYhXNQyBjYpQuJiBAvrJ5Na b8vO8cqTWVS/0fIx8sldmybpQ1UAcI3E3wdoFeDWMrM4aifyAeczcZ8xFbapTMSRMnt2ybkdaun VdJvZGO+l0OWwxOxCIMKRBn+qL1svKerHsHH5XtIDAd8Gc+oPsS3woUbwYqzvcV5i3xl9eg50fJ 3Gg5S/NtkYZeT9tpz/BRT8XGs1AFFNH0qieHIzj7Gv5zXGdwhk9OkAMnfDp3mrPIPoHKxg= X-Google-Smtp-Source: AGHT+IG+VYqAZEZjAkkDupQTvwlvu2SSq7a2Lp6yZVkX5waA19et6Qvi69lKI25WLQ+J8Hn9t77VNw== X-Received: by 2002:a17:906:c14b:b0:aac:619:6411 with SMTP id a640c23a62f3a-ab2abc6fd33mr825598566b.11.1736852142566; Tue, 14 Jan 2025 02:55:42 -0800 (PST) Received: from krzk-bin.. ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c95624e8sm611169266b.127.2025.01.14.02.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 02:55:42 -0800 (PST) From: Krzysztof Kozlowski To: Vinod Koul , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Peter Ujfalusi , Michal Simek , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] dmaengine: Use str_enable_disable-like helpers Date: Tue, 14 Jan 2025 11:55:37 +0100 Message-ID: <20250114105538.272963-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250114_025544_359436_6FC8CF64 X-CRM114-Status: GOOD ( 13.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski --- drivers/dma/imx-dma.c | 3 ++- drivers/dma/pxa_dma.c | 4 ++-- drivers/dma/ti/edma.c | 3 ++- drivers/dma/xilinx/xilinx_dma.c | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index a651e0995ce8..de8d7070904e 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -942,7 +943,7 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_interleaved( " src_sgl=%s dst_sgl=%s numf=%zu frame_size=%zu\n", __func__, imxdmac->channel, (unsigned long long)xt->src_start, (unsigned long long) xt->dst_start, - xt->src_sgl ? "true" : "false", xt->dst_sgl ? "true" : "false", + str_true_false(xt->src_sgl), str_true_false(xt->dst_sgl), xt->numf, xt->frame_size); if (list_empty(&imxdmac->ld_free) || diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c index e50cf3357e5e..249296389771 100644 --- a/drivers/dma/pxa_dma.c +++ b/drivers/dma/pxa_dma.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -277,8 +278,7 @@ static int chan_state_show(struct seq_file *s, void *p) seq_printf(s, "\tPriority : %s\n", str_prio[(phy->idx & 0xf) / 4]); seq_printf(s, "\tUnaligned transfer bit: %s\n", - _phy_readl_relaxed(phy, DALGN) & BIT(phy->idx) ? - "yes" : "no"); + str_yes_no(_phy_readl_relaxed(phy, DALGN) & BIT(phy->idx))); seq_printf(s, "\tDCSR = %08x (%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s)\n", dcsr, PXA_DCSR_STR(RUN), PXA_DCSR_STR(NODESC), PXA_DCSR_STR(STOPIRQEN), PXA_DCSR_STR(EORIRQEN), diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c index 4ece125b2ae7..b1a54655e6ce 100644 --- a/drivers/dma/ti/edma.c +++ b/drivers/dma/ti/edma.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -2047,7 +2048,7 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, dev_dbg(dev, "num_qchannels: %u\n", ecc->num_qchannels); dev_dbg(dev, "num_slots: %u\n", ecc->num_slots); dev_dbg(dev, "num_tc: %u\n", ecc->num_tc); - dev_dbg(dev, "chmap_exist: %s\n", ecc->chmap_exist ? "yes" : "no"); + dev_dbg(dev, "chmap_exist: %s\n", str_yes_no(ecc->chmap_exist)); /* Nothing need to be done if queue priority is provided */ if (pdata->queue_priority_mapping) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 108a7287f4cd..3ad44afd0e74 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -2940,7 +2941,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, XILINX_DMA_DMASR_SG_MASK) chan->has_sg = true; dev_dbg(chan->dev, "ch %d: SG %s\n", chan->id, - chan->has_sg ? "enabled" : "disabled"); + str_enabled_disabled(chan->has_sg)); } /* Initialize the tasklet */ From patchwork Tue Jan 14 10:55:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13938621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5824BE77188 for ; Tue, 14 Jan 2025 10:58:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+3rqPuNp/XAiHwmx1Pu2LDapqHlVBx3ScWZfxCOYmYA=; b=g0VJsPqHQanvjM1NSdlz0yDu/e QQ5WVTUe5sTLXTn/jRfEXHyuyVXIR/Npdrgg5v+fPLxAmu4PF3iiJBGzSGWPqGIBJT5FEIwtKDY9Z L9M0gzHbFSijUkuFXuAje72al/Rbgz7UT7TYN1h7Pwjg4W58OJmbl/OFihmxJ9n28xOJoWPv0uhLo FDhwElJ6nM//SdltCjvnbleiUuawpAf4yf45BYOF2dYDWPwRcvmFjTaQqshO2i7AvyZKL3BPjQSmr NfBsiRojOYH15AJDaj5TmCU10ZlVxhNV7xh/o8WU4NvVbheVwTuSZ8Eu4eV1PlYuxU/rbsL2LIc8m mZfU7EDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tXecj-00000008B5B-1EeJ; Tue, 14 Jan 2025 10:58:17 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tXeaI-00000008AZY-0HXz for linux-arm-kernel@lists.infradead.org; Tue, 14 Jan 2025 10:55:47 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-aa6b500a685so76783466b.2 for ; Tue, 14 Jan 2025 02:55:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736852144; x=1737456944; darn=lists.infradead.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=+3rqPuNp/XAiHwmx1Pu2LDapqHlVBx3ScWZfxCOYmYA=; b=j9eyOKDNWziwHTTIh1b2wxkdxeY+n3Bk21zNm++XnwLP8wGeycDZBJjRN5bqRkcq9u KOvUUG6HQ6pKQGaz6W3f2dhZ1rvfsdEsUKRaL2nkDIa4nZ/rq5QUm2GoQGSUbNlB7Y9r C9XyXgWvAq0BdOd925BeL/dJUW4YvkYjPK+QwsPWHQJ768gFopKMWlMTGXdfdhZIO5ez CKWX1kgStPTxLlycI6RD1d5+eE1+rjzG3g6vyFDeCzNf6bvnb4USP4egt+BzEBhEll6L ybo3x8qoE4MOEVCz2Ved0+B3HHKqatjjS/BcLrktm23E102xx/hnyaWFqTMixOr9kJ2T T9WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736852144; x=1737456944; 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=+3rqPuNp/XAiHwmx1Pu2LDapqHlVBx3ScWZfxCOYmYA=; b=WCm0pxhKbCmUcjFxZl+xs6+45ddFANVc0U9QdbJ2dj7jwG3DG1Gd06c1EtNmlzZST4 7g6PheNGqAW2cQOUOysGi9kspqF+ECMVjd/yGSqllaLl/DMUdZEDAHY5QNumEr4s6acR YNGG9hffVFRbuJi1EVXEfDnrMDH295/1HrT6X4Y12TnWceuAQHsoXq8g0CopfBYpLZUX Ph0iEhlHRlXOjgyhE+/r9gV/PYCTK3nda7slNQowGh0KlVloSITsDkPNK2W1lD8bcqgy 8nE/QEHm7M//geSicwr6p1rokoaMOgNDeC86D6VZ4LK400aLWxnZukJSwHvEbdiqicCV 1FJA== X-Forwarded-Encrypted: i=1; AJvYcCWVUxPGxzaFiTN7Yp5MYrsDTeJ7Dv/t4AMbo7GuMa6d44+4Xf0n0zkdQneJAxKs8d6x1o0SV5a6Zj7yFgGg0Ioq@lists.infradead.org X-Gm-Message-State: AOJu0YzVQTQUCly28Qdyi80XnKR4Cok0gLrTZOAV5gv1QQTPRH4gGjtU bgfCQf6dIw7M/hmVkH0ceVgPKCnp9wrduxsCK7bwPbugVPUEczjM5H1e1kmnwws= X-Gm-Gg: ASbGncuNMCKFCzsFpVFlTdqEDwRT8CvwEKOJVzVWh+DHNHQzRRWdTOkNGv1imYcVlp2 C8SFka7kEI4d0WHxBSZcP71txLHgDwr9yOp3Hsi83YQey5pTJldMl8WvfmYGapYk//aFOpuVbAw p20hHjd805cEEJ5xDFYfMflApou+9wrsd8ynN5TTG+zSQRXQ9OO+XEqxhMtzT7UFyZuLUmap2JG HvYTD4WaPsA3IqhjJIXiTqS1IQqP0vzGPqlCUBwNJNkZw76hO+1IOa0OdjZjjnM/WmU6Fw= X-Google-Smtp-Source: AGHT+IGGLNOo3Y6rZ9xm8aucjHmK0akRyTENMu3IpG6BrZjgAqoEyoZP/GxppQhWGAt606k5yDTcpQ== X-Received: by 2002:a17:907:2d8f:b0:aa6:6386:44de with SMTP id a640c23a62f3a-ab2ab73b693mr726196966b.8.1736852144389; Tue, 14 Jan 2025 02:55:44 -0800 (PST) Received: from krzk-bin.. ([178.197.223.165]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c95624e8sm611169266b.127.2025.01.14.02.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 02:55:43 -0800 (PST) From: Krzysztof Kozlowski To: Vinod Koul , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Peter Ujfalusi , Michal Simek , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] dmaengine: pxa: Enavle compile test Date: Tue, 14 Jan 2025 11:55:38 +0100 Message-ID: <20250114105538.272963-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250114105538.272963-1-krzysztof.kozlowski@linaro.org> References: <20250114105538.272963-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250114_025546_105271_A6522BBC X-CRM114-Status: GOOD ( 12.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The PXA_DMA driver does not include any asm/mach headers, so it can be compile tested for build coverage. Signed-off-by: Krzysztof Kozlowski --- drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index 8afea2e23360..cd856c990d17 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -546,7 +546,7 @@ config PL330_DMA config PXA_DMA bool "PXA DMA support" - depends on (ARCH_MMP || ARCH_PXA) + depends on (ARCH_MMP || ARCH_PXA) || COMPILE_TEST select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help