From patchwork Thu Feb 8 20:27:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13550442 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 0DB53383AC for ; Thu, 8 Feb 2024 20:27:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707424075; cv=none; b=sRQfPE9larejlEpLS5AVgXK1BopcrG9tPD6Se4/0+c35bYDy6mSrijLMS+mLJRigiMlBQbcTcqCSvnLcqgwwV5Gb9VNs1Jgs/dME2D8wQX6StaoeGcEIRd3/LhUxm8BsuUc2Cy//ZWoIwPZu9X52ZPXccwhlVvaPEZJJmj1A+Vs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707424075; c=relaxed/simple; bh=gpdmiFJjJucd1Zl9QhqyKAFaEgPM4+P1pUU2iwmfaAg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=U3NHEnRYAtT06wuEqDuFV3l0LhjK3T9TaVfqPQwUO8D5Woprsg4fwxziRFl3wNaqW2w9sfsf7x7Ch8VWxnjBUOMlacH6x+pCDW6BFE0B17hcUZCOrXrkVlhzIqd115C8s2DZOXDuXoRcxQeTOb1dv9T5IYDn/Dh6Klge8S1iY94= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=M1LVfB1q; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="M1LVfB1q" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-41059577fc1so2177955e9.1 for ; Thu, 08 Feb 2024 12:27:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707424067; x=1708028867; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NIl3nKoqWKpsBAq33qAsQr6tTJHAtXKfr8vYfHmeqPU=; b=M1LVfB1qw6VDUQWfzOeWtNkxTDOBjJc5nexd8cTg4vzFlCsetjtOrdpXerWVT3oIYF X07CWoTa/Zh4fwyRz/mFNgC7X8kuBgBCaqtFKNzTXhZWZ8eMCs5Aj4bW7EFFGHA2+O7d TqsAsn/IIXD7gPcGkPwkpXyLFaEMzIl8KDWVyluXjqCDWABI3JxfB18RP1nJCOYDOI5G 2CtUhuMiWjCK+f9AZmiV47QaF21HZuIsyoqVo5hSV2fw7esSgirG5aDAg/WlIGjLUbfs QxPxeCj62iiZQ9QXwjG/HcM8ChdVqvWogP2DKm6SzeBBT/JmjiW5zhO7Kw1igY3GCBcj T7LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707424067; x=1708028867; 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=NIl3nKoqWKpsBAq33qAsQr6tTJHAtXKfr8vYfHmeqPU=; b=Nzexv37id3m9FTmAZOoeItmPLckw0May5X3uHD3Nun9OJc7exOSdLBqmRarGF+wuY6 HNSqIICzFZourx9OLU3VLvxuYCM73HUopFoHVLFZFS94Q1Z42ioK7OumMw49jDfG8cbx oB/cbWZ8Q04Orthb/kik/7qT99ZAUFH5VCc12GZIbxtBP3rQC6XvZQcBpITDzLLdW4f0 N07Qr3hszYlGaNZudwtCIP5FAO5NRdeSviaXYNK+sUO0cpRuxQ7OyNJ5jmtxAWZVMFL0 jP+/5gLHSdw3ew7NggqqJ7WBOB+HtuS496usZ+/hUEdzJl6BINwhb20tcDYzIAj73MKa xGpw== X-Gm-Message-State: AOJu0YwlVqSS5s74r9BiIjLgrHLvGt7TZXhB05eZyon+L4//dFUNS5T7 6s8YcX8xqq9GSvxzl8STfluPwS0nAB02F+rRKlrZDpULNuxzOkjY/ixMrBU6f3E= X-Google-Smtp-Source: AGHT+IH9x0C9PHX8twbeNoIdkRdFmX3e8OorcM8cAuSlloGIaF6SLoCL2BKVtZXrEwAi2LAn8VUSTQ== X-Received: by 2002:a05:600c:3595:b0:40f:df2d:870f with SMTP id p21-20020a05600c359500b0040fdf2d870fmr299007wmq.41.1707424067333; Thu, 08 Feb 2024 12:27:47 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXKOn7hUxxacPQonDj1sCI1q2P7LYutfLlDrjtemlI58fVapiIBWbUo6U/jxDBTKWpqnF5Z0hXAvytErcEB/L0izRsYp7DjWKZtHWvMQRN/9tJrr24vx5ngkgreIs01drwRCsdzxNXv Received: from krzk-bin.. ([178.197.222.62]) by smtp.gmail.com with ESMTPSA id a18-20020a05600c349200b0040fa661ee82sm368027wmq.44.2024.02.08.12.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 12:27:46 -0800 (PST) From: Krzysztof Kozlowski To: Vinod Koul , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] dmaengine: pl08x: constify pointer to char in filter function Date: Thu, 8 Feb 2024 21:27:41 +0100 Message-Id: <20240208202742.631307-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The opaque argument chan_id passed to filter function is actually pointer to const memory, so make that obvious in the filter for code readability and safety. Signed-off-by: Krzysztof Kozlowski --- drivers/dma/amba-pl08x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index eea8bd33b4b7..fbf048f432bf 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -2239,7 +2239,7 @@ static int pl08x_resume(struct dma_chan *chan) bool pl08x_filter_id(struct dma_chan *chan, void *chan_id) { struct pl08x_dma_chan *plchan; - char *name = chan_id; + const char *name = chan_id; /* Reject channels for devices not bound to this driver */ if (chan->device->dev->driver != &pl08x_amba_driver.drv) From patchwork Thu Feb 8 20:27:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13550441 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 6E66E38DE7 for ; Thu, 8 Feb 2024 20:27:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707424072; cv=none; b=iF0y4vGl1DGB5oX1I7xl8p41Gk/R3inT6BkEZXYGS4OK5s5gYOlPEXvctSHMfh/JmWdv+8DldhM7a0JVJfMJLgeeoCauGy2nO3/TOy2iMwc++zFK9w06uYTDJD0NYTsjwZpASHF2jdsgMw5n5j9dVDM2L8FENpkN7GrzYSFh9Qs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707424072; c=relaxed/simple; bh=vFxXV0CMitFA5HtWV0cE6DuKRu++Rris7YbjEufvo3I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gVtgB9MfC5WFb0NfQ9UVm6I25uU5jLKXTrWo94leNKti8XdwMb/S9qMLQfkqXX55UT3JpyZH93RzQCMSYlN27286AbKvEDuMcpC3DLX9j1110wR/gS8QhuXYrwwh2JZDhaP0LWfX0Ttct0tWuL3ln7dEOQg1sr77CTb5XTIf7W0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=moaMQX58; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="moaMQX58" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-410489e1a63so2020265e9.3 for ; Thu, 08 Feb 2024 12:27:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707424068; x=1708028868; 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; bh=4JuiKd4Pqu+cNXuLAtoDDjFiKegltder1S+vVqg9Rbg=; b=moaMQX58ofWGF0zC2+Kql5ILkzmCYwS1sUVwT3uG/MMtZPbmdt6kQg9IXFmpynFijZ CZ6Y8dik8WtylJ0T/qByUNT3zmE/5cnlrFoBoii6LoX3jQKurkw5x6g2/KUZ7QzhCzB0 m4F7liWYu8ep5mwGN2XlPWemNuVKng99Nx4kzrU1cOn/CQK98EibSS+OqRidz3XbmyK5 Kn0ECEej+qaec3vY/o5/NzsKnMRCHjfqf+9yLmRKTkuhUpbX8hSYRL3MLHVL2RthVSaQ GClFpkREHU7f2gjHjAf+JHjiZ9fPsxNiJQ5yUbO8HqiMOuxEcIfpOKQTM8AIDuSggJtF MXCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707424068; x=1708028868; 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=4JuiKd4Pqu+cNXuLAtoDDjFiKegltder1S+vVqg9Rbg=; b=fFCYeX51AFPpKsA+vl+H+urhHuvkUsDt5RieA9JiJo9s77K6hzOgEw764hHOv+YWwN FXn2oHJSAqqNyjMg1ZcEYpsV0U9+f0mC2/QWxllIyH4YGYPNyMTCQfLjiLREaQtz0DUx 88xakRxduozrCrWdt+X7OlDbGnGCHzQ5PNs4ZbFQrFv179X8m2hJqM1IgROeGYIy091G df2XOJD/dm5MQ3pu2kDfTpZTOsjBuzyzNMNbIjCRCmdDr/Fz4R3yWcku8y4gpGzmP6sH do6bMv1/WPjwuuyPIIlvduYqSwRBeByUS5l58UazpMIxDRmYgLisfOg+DLJReRAvmNqn 3VFg== X-Forwarded-Encrypted: i=1; AJvYcCXjEVq3gLSVR75JXE3/1ciBUtC79j8HWZYlgo2D4s13w0Wrsffx5OyVIBMUWpSMmxpK5yZREv/M5e392bHWRxNnW6bSs5kuDQRg X-Gm-Message-State: AOJu0YxnPkfxwPSJ+peXBVWBNqLxostpGOHLb0lkgneB/Z7VQ9+8XO2q II6SchOuDmhXnsQ3b3WmqxQtoUtvm2AC8LTc7/jZlF4frY3Jw6BfPMBVUuip6jc= X-Google-Smtp-Source: AGHT+IHrg09/crGsPn7Yv0ifeRJcFeNOIWdggXx/AD6AvYfYliE0xR5RyJWvAN1mLuWDbNUmwria2Q== X-Received: by 2002:a05:600c:4f8d:b0:40f:b166:7688 with SMTP id n13-20020a05600c4f8d00b0040fb1667688mr339622wmq.15.1707424068763; Thu, 08 Feb 2024 12:27:48 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWhjwHl5cnxJuvqsCCefS/vwqiR7V/KJk9qJX1AzhVUqLI1edCldqbn/2tW2G4yxAwdmnkRVixnmeP9M2toQqqYF2wGMygKsdGyxfogumQ+mwUcpQqbeE4zGvhPGMpK16a/bu/ubuQo Received: from krzk-bin.. ([178.197.222.62]) by smtp.gmail.com with ESMTPSA id a18-20020a05600c349200b0040fa661ee82sm368027wmq.44.2024.02.08.12.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 12:27:48 -0800 (PST) From: Krzysztof Kozlowski To: Vinod Koul , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] dmaengine: of: constify of_phandle_args in of_dma_find_controller() Date: Thu, 8 Feb 2024 21:27:42 +0100 Message-Id: <20240208202742.631307-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240208202742.631307-1-krzysztof.kozlowski@linaro.org> References: <20240208202742.631307-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 of_dma_find_controller() does not modify passed of_phandle_args so the argument can be made pointer to const for code safety. Signed-off-by: Krzysztof Kozlowski --- drivers/dma/of-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 775a7f408b9a..e588fff9f21d 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma/of-dma.c @@ -29,7 +29,7 @@ static DEFINE_MUTEX(of_dma_lock); * to the DMA data stored is retuned. A NULL pointer is returned if no match is * found. */ -static struct of_dma *of_dma_find_controller(struct of_phandle_args *dma_spec) +static struct of_dma *of_dma_find_controller(const struct of_phandle_args *dma_spec) { struct of_dma *ofdma;