Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp479252lqh; Tue, 7 May 2024 05:26:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0Y9S4o3sgSZ+HKajNrx6DTkImePlc95KjZ0RXOWg5lx+qGFbsyyKCqoWYsnGtE4/WSMgSXVZis5kR/jDbIkWPUXzsnUbUxG5LivdZIw== X-Google-Smtp-Source: AGHT+IEGnB/BSjrDIr/AOH1m3awlKPngcIpER+7Iek4/aQgYnXxxvTjnV2nek7nK2ts4AEJTTga7 X-Received: by 2002:a05:620a:5790:b0:792:95e6:cde3 with SMTP id wk16-20020a05620a579000b0079295e6cde3mr6300431qkn.2.1715084771427; Tue, 07 May 2024 05:26:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715084771; cv=pass; d=google.com; s=arc-20160816; b=BXtK4/+wusVIPyj0sCldjpgxwTIEg+LC3rojSeI7gcDJAUQ23xPw9+7A90spJA3izO iVv3gCJjNP0eGKIITvn+Vzc+37pHdQNRre7xj9Q4bENjgxCHz55Bw9u7XdZJWWQdD6xw Csl9SnMZr2wJK/eVEsopmoOmwjKN1hVa0gYYH8NKrDXgbJtRH6OqB/x/uhoGdQi4B3vk HKgz7DJI6exe2enryEZHRiZMfu0CBdA4md1/+Nu0tGCWGZFlPjYjW4GcebBridk3n1NF bUMQsW0zUPcivarAbIFpC6LUf99S2U5sdWJy1hsLnf1cz155UySvAadbkfMogjkv/Hxi XbKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ftBlVY/8+8MJLqvhe1wF4ZSuv2MhawQfCqt8ygN3VQI=; fh=/SeSnfPugsx4PVKomm40o7wYbjFi8lo3CQdTAcrp3Uw=; b=TwPlVbMiLAd8kjX8O3Js6GBQrz/f6rKJFl8LxgvvDbl0k2uGmK3Yd4SElB08slKexM oMX2f3Grok+5MJEWnvuTEIlgGvNE0NfLlV174Hrz2YNwVKXKUwjnaqovygRwAgR2tg2D POvLX33w43TDV4YfaDi5qfut6qEsZDJ0dI5hYvEWZRAQefN0A9PwuoGCjrzAHiwIQpRy ql7Auiav3/KNodjWqhCVdGM/v9zggBNkPaxOnCTLVQCqAiiigutQZ1eFD9ljF83k/uZY BHbafNppqTbnl9WPSUAaGsNpsPmvMfLKxjblS6W91om/GvNQJcMNPMrpEpq0yPqh4A5L aLRA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=dj+djPZm; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-171271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d7-20020a05620a240700b00790f8c9dd95si12900530qkn.205.2024.05.07.05.26.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 05:26:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=dj+djPZm; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-171271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2DE461C2313F for ; Tue, 7 May 2024 12:26:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36FAB15CD76; Tue, 7 May 2024 12:25:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="dj+djPZm" Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (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 DA20E15B995; Tue, 7 May 2024 12:25:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715084704; cv=none; b=VtccfAYZQ0qjKj1ZkTc+oE1ee4u75SOv2ZSP/kW66Ym9jzlE9RMEtggKq8IXzt4NbGltrDkRYUmXbtuT48dwyzlFvThWXMAVIKC1TcWoHjP9GrWmFllUenVC8kyynv1l0usR6Fdam2tkuWw11igTNMNrCE9NHEhY0Ko/gMsyWfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715084704; c=relaxed/simple; bh=7SblqolKjySmEc6V7cBH+cBlOqX473FOdbBoGQaq4bk=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SMo+Ylvgm8p3tlpsLDi55vG+FA1vWY3SMkeAuOZILkzCVdgZIheg8cDSsXxr0BwNqQZkFAs/NuTQ0fYPbsrwKtS7LCO/DNqp5N2dZlZQzorCDwtqNm2a9v5H7Yv1kRrOMJnfrk+yzCVDVCUI1kxH7vEc1XFREfcCgIuQmWjcSjs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=dj+djPZm; arc=none smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4475oO0n004102; Tue, 7 May 2024 06:57:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=PODMain02222019; bh=ftBlVY/8+8MJLqv he1wF4ZSuv2MhawQfCqt8ygN3VQI=; b=dj+djPZm7UuJ4P1+gdmrC6npbftpIzV Cn7oGOBQ94BeHYmQqp5rYZKlYgM6FZqeYDcR0h4yd2qreGTqIAQFKVvlZe51PSn5 fEQEUE28InOBFMIi7968yoZkf1ecC/VLfi0Wa6UFogK6XdidF5inddpDg+ZBy5Pj yJs6PDiB+QDDarDxVILc53kk6pslk4FY7Sm5CZJWddfSLoTtXIrk2SVOXtLlwMew D3YprLNu8d+EHHyfaDiirnemaycRdSUB4Lg+wCPFoSWYmL2+WNGXYkPnu2UcNgHy Q/r7wIyubU0Csb6k0N7Oa6i30Lwmx9pmDSAl2j9uAPuPdcAIKsphE/w== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3xy2cmh154-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 May 2024 06:57:13 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 7 May 2024 12:57:11 +0100 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.9 via Frontend Transport; Tue, 7 May 2024 12:57:11 +0100 Received: from opensource.cirrus.com (ediswmail9.ad.cirrus.com [198.61.86.93]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTPS id F1C16820244; Tue, 7 May 2024 11:57:10 +0000 (UTC) Date: Tue, 7 May 2024 11:57:09 +0000 From: Charles Keepax To: Krzysztof Kozlowski CC: James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , "Liam Girdwood" , Mark Brown , "Lars-Peter Clausen" , Nuno =?iso-8859-1?Q?S=E1?= , Srinivas Kandagatla , Banajit Goswami , , , , Subject: Re: [PATCH 1/4] ASoC: Constify channel mapping array arguments in set_channel_map() Message-ID: References: <20240507-asoc-x1e80100-4-channel-mapping-v1-0-b12c13e0a55d@linaro.org> <20240507-asoc-x1e80100-4-channel-mapping-v1-1-b12c13e0a55d@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240507-asoc-x1e80100-4-channel-mapping-v1-1-b12c13e0a55d@linaro.org> X-Proofpoint-ORIG-GUID: _LFPFoz0pvkHmcCFOZwADU6UMjJP1mf7 X-Proofpoint-GUID: _LFPFoz0pvkHmcCFOZwADU6UMjJP1mf7 X-Proofpoint-Spam-Reason: safe On Tue, May 07, 2024 at 12:27:30PM +0200, Krzysztof Kozlowski wrote: > There is no need for implementations of DAI set_channel_map() to modify > contents of passed arrays with actual channel mapping. Additionally, > the caller keeps full ownership of the array. > > Constify these pointer arguments so the code will be safer and easier to > read (documenting the caller's ownership). > > Signed-off-by: Krzysztof Kozlowski > --- > include/sound/cs35l41.h | 4 ++-- > include/sound/soc-dai.h | 8 ++++---- > sound/soc/codecs/adau7118.c | 6 ++++-- > sound/soc/codecs/cs35l41-lib.c | 4 ++-- > sound/soc/codecs/cs35l41.c | 3 ++- For the cs35l41 bits: Acked-by: Charles Keepax Thanks, Charles