From patchwork Mon Jul 29 09:37:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 815683 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 alsa0.perex.cz (unknown [77.48.224.243]) (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 A4A42C3DA64 for ; Wed, 31 Jul 2024 08:53:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 863BB2CC8; Wed, 31 Jul 2024 10:53:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 863BB2CC8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722416012; bh=dUb6XFAWURF5fTzbw/+1MFJZCob3+hK/YpTTVucusdc=; h=From:Subject:Date:To:Cc:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=MmIzCJrwuqvWh8GF+/9+czTv1pgxnZb/PGnRVjT5EoLJCfDjCtI+wBl13t8AHGmyX hvXkEdIjcC4QFDD4tG6eiedp1wVuH0SMC4pWlob7npLZEi26rn5Xx4uEfzvQjV3gDp rztOMPiTFrBExbRkZpJUsvhP1zpVD6gR5JdlHkFM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E2F01F80808; Wed, 31 Jul 2024 10:50:07 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 61278F80787; Wed, 31 Jul 2024 10:50:05 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7E3CBF802DB; Mon, 29 Jul 2024 11:40:40 +0200 (CEST) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 67DF5F800E3 for ; Mon, 29 Jul 2024 11:37:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 67DF5F800E3 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Gwqcdr5t Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5a10835487fso5214887a12.1 for ; Mon, 29 Jul 2024 02:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722245868; x=1722850668; darn=alsa-project.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=NR8EYDbZcj20ngdxq0iIEW20+Ft9Qj88x8IgpUrOrXQ=; b=Gwqcdr5tzW8hKlAUswuM4l5A3zun9SY8e0DyS3nrjeOLblpx0YBwwCLcCYsMT4+bmd 0IQQnvSmXwo2rWVsGU4w7f0Xz9COsY3WbAK4bzxYcGZlP/1rloOKUbEivzLcL2ik0HWK wLMLYhyU+aYM+C6i+Y98c++vrAHZtHDLkvqMeiE2aMzP5Mdkg3zWD9tcmQKSCLuwnFd+ dFJCW63r/B7/0Znv+7v5WMtFFdxz6AXKde0pPXdPmEVchClNpIOvBsNVaeZz4TLLoPKY ilHkjAO+Suxq9m7XozwBLk+rmheGki8s82vjlDMkZCspReuEqvFRMWWmChborJNWo9bb /75Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722245868; x=1722850668; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NR8EYDbZcj20ngdxq0iIEW20+Ft9Qj88x8IgpUrOrXQ=; b=QGYI+XF68fBVHYNa3MdT/UMMcbhTzLwC7k5snATdYb26IqEC85+yLwPXSW6drnFYI9 ioAzEs1gutSgkv8WACrf8Ly+3MDcQ5wG7ETOoIOoZ5yImkZd091cUstnPgg4NLe+PwpW QUCq7GV0B/2OJASiQNCbV3ogD4Ip0hr++J2nHx/Bg4OFCVBjulsUjMDn8z5ZXP6O7xBU g13tsVMzhjGRncOMic3u0CrTtTwIAviJeI+PNk5j89occg2CJjHwheJImHoMC2/dXo7r LyzO5eUYwbm1kDCoSX7rD87ycUYiPIm7Iwhqx1987q5+Q8ZLnwx+lLxwgkW3qwYJbXQ8 vPoA== X-Forwarded-Encrypted: i=1; AJvYcCXtJzZy9NzEJkn1CIaRoPqL46fb1oFgE3OX66aAO13wtoHwWc/wMUgNWOgBdhH3FEdhiCwqPRfQR47wHxu+5gAxeP2OpNWi0VVSu6Y= X-Gm-Message-State: AOJu0Yw6KaM4VES8VJcWLGEoMylixXHz9BQ/p2yhH6T5j7iS++yuwPtZ IB27+HcM+8hSRhVJ0Qg2onJXAgTeeJ6ZqUzqlYzD0v5NR3Rdtucn X-Google-Smtp-Source: AGHT+IGB+vRrdX/B/2dg/ESisrGwMj2AyPaJblfTpT4noAFpKg4KyVyg7wAt53T8pHgMroSEYzYs/Q== X-Received: by 2002:a17:907:96a0:b0:a7a:a0c9:124e with SMTP id a640c23a62f3a-a7d3ffadf1amr581593566b.4.1722245867939; Mon, 29 Jul 2024 02:37:47 -0700 (PDT) Received: from [127.0.1.1] (91-118-163-37.static.upcbusiness.at. [91.118.163.37]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad41b24sm481617966b.116.2024.07.29.02.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 02:37:47 -0700 (PDT) From: Javier Carrasco Subject: [PATCH v2 0/2] {ASoC,media}: constify snd_soc_component_driver when used as read-only Date: Mon, 29 Jul 2024 11:37:36 +0200 Message-Id: <20240729-const_snd_soc_component_driver-v2-0-1994f44f1ec2@gmail.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAOBip2YC/42NQQ6CMBBFr0JmbU2pINSV9zCkgXaESaQlHdJoC He3cgKX7+fnvQ0YIyHDrdggYiKm4DOoUwF26v2IglxmUFJVslG1sMHzatg7w8EaG+YlePSrcZE SRjHoq9K9rgddtZAlS8QnvY/Ao8s8Ea8hfo5eKn/r3+pUCikurkGULZZKD/dx7ul1zkfo9n3/A ucOmcHMAAAA To: Tim Harvey , Mauro Carvalho Chehab , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Ray Jui , Scott Branden , Broadcom internal kernel review list , Shenghao Ding , Kevin Lu , Baojun Xu , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue , Kunihiko Hayashi , Masami Hiramatsu Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, linux-stm32@st-md-mailman.stormreply.com, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1722245866; l=2529; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=dUb6XFAWURF5fTzbw/+1MFJZCob3+hK/YpTTVucusdc=; b=RPp7DAhUclessfFNFbcWgORq5LFwt1sEuXGSZwmnwQyt6PJKpGQSAD09Ku+TP7WOneIIyaxWv s/TEiuxzbZNCW6/irPcZOG1uLKlqLQvxJpgMvBhbXL3qIH7lZwJQGEF X-Developer-Key: i=javier.carrasco.cruz@gmail.com; a=ed25519; pk=lzSIvIzMz0JhJrzLXI0HAdPwsNPSSmEn6RbS+PTS9aQ= X-MailFrom: javier.carrasco.cruz@gmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 7R657DEJS4TJVVOGIZ2ZQSZZPVJEAFNH X-Message-ID-Hash: 7R657DEJS4TJVVOGIZ2ZQSZZPVJEAFNH X-Mailman-Approved-At: Wed, 31 Jul 2024 08:49:35 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Declare `snd_soc_component_driver` as const to move their declarations to read-only sections for the drivers that do not modify the struct after its declaration. Apart from a single case under media/, the affected drivers are members of the ASoC subsystem. To: Tim Harvey To: Mauro Carvalho Chehab To: Liam Girdwood To: Mark Brown To: Jaroslav Kysela To: Takashi Iwai To: Ray Jui To: Scott Branden To: Broadcom internal kernel review list To: Shenghao Ding To: Kevin Lu To: Baojun Xu To: Olivier Moysan To: Arnaud Pouliquen To: Maxime Coquelin To: Alexandre Torgue To: Kunihiko Hayashi To: Masami Hiramatsu Cc: linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-sound@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: alsa-devel@alsa-project.org Cc: linux-stm32@st-md-mailman.stormreply.com Signed-off-by: Javier Carrasco Changes in v2: - drop cs43130 and sti-sas, as they modifiy the struct in the probe function. - Link to v1: https://lore.kernel.org/r/20240725-const_snd_soc_component_driver-v1-0-3d7ee08e129b@gmail.com --- Javier Carrasco (2): media: i2c: tda1997x: constify snd_soc_component_driver struct ASoC: constify snd_soc_component_driver struct drivers/media/i2c/tda1997x.c | 2 +- sound/soc/au1x/dbdma2.c | 2 +- sound/soc/au1x/dma.c | 2 +- sound/soc/bcm/cygnus-pcm.c | 2 +- sound/soc/codecs/cpcap.c | 2 +- sound/soc/codecs/pcm186x.c | 4 ++-- sound/soc/codecs/pcm5102a.c | 2 +- sound/soc/codecs/spdif_receiver.c | 2 +- sound/soc/codecs/spdif_transmitter.c | 2 +- sound/soc/codecs/tas6424.c | 2 +- sound/soc/stm/stm32_adfsdm.c | 2 +- sound/soc/uniphier/evea.c | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) --- base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b change-id: 20240725-const_snd_soc_component_driver-b9629a95b948 Best regards,