From patchwork Thu Jul 25 10:31:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 816346 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 E7B57C3DA7F for ; Wed, 31 Jul 2024 08:46:22 +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 1DE9F16B7; Wed, 31 Jul 2024 10:46:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1DE9F16B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722415574; bh=htIX0gNZEQ2pwJvqGxD+l3IATOPpwVwt2PCD5KSSKn4=; h=From:Subject:Date:To:Cc:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=pUh/8evwazxgU28kVNHa/6+DqpueTmJOWykBZvNMHIXhx+H2GmcPj+DekPGY1TpKp upaYrH+szQR0rxpz6wzkUqssvS+ECkHOzsGSfqsDcKYAXQiV2ZsyGXklZfybEEJCQJ dP92yBqjyTjdDdssVO4cSOSMGhU+4XGOV1WohuUk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64EC8F805E3; Wed, 31 Jul 2024 10:45:23 +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 56EAEF805C7; Wed, 31 Jul 2024 10:45:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EB531F80579; Thu, 25 Jul 2024 12:31:50 +0200 (CEST) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 A17C0F8007E for ; Thu, 25 Jul 2024 12:31:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A17C0F8007E 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=afbY4/GX Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5a10bb7bcd0so971987a12.3 for ; Thu, 25 Jul 2024 03:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721903502; x=1722508302; 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=W+agGw5RSx4JruLXCZ7PbUeM/c19vYS06rQLvWj4eOM=; b=afbY4/GXeOdRpy9Sr3o2PbXwmo52wEMC1E4mV9cjMOJN+GJt94eubKyw/8/qirw2by TNKMUzyVRtNCJJckMucjVK7QgddWQ2yxqBCILlWQ1hYo6tLw0gLKOxnp3IDA90nt6gT0 f9fh106DsK6OELHs8C2RZW+/EA8yWvjrjdbQUmmZkt/oGj2s9tw8epLIsc0LH+ucksFL Au1tYPyjz6lhl0H7gPuVejfWvTA9cuMZY0ONkS85ShJWChF/7m2HAuv1QB3EF97tsvZJ I6WLZ/6i0gUrGUH+7ltX8HCUnNbVEd7P3WSKasRif68UAlZsaN9yYiv5adgU5bNcOdbg lleA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721903502; x=1722508302; 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=W+agGw5RSx4JruLXCZ7PbUeM/c19vYS06rQLvWj4eOM=; b=iqneVXFcuQ3rQIN8vA7Jch8jAoDQO7LTTHQxI+bqoLsfvhJUgneSs7m03VaFF1ZR7k rtxyaRWGV0W22l3W9ZvqJlQQeSUpyF0v/NRew5klglVNCyJ5se/cepmY8VzC1gTIs1GE Oyz0mTa+KJ5v3GaKYjzthN+ogUrAunmXxHnZCk2EgHTEDsNarvaucmXYib+spBqT2j15 Va0dMVIWaAaaTkkNXcoiPwcMz0Ytfm+Ncs+Wen/mE+RPw4KRes5y5QPdXte43QQ0qNq0 I5MRVyaHEQQ5SIpB2uHNT+28imeLAWh2FLx7y1J2l09mdLzQx+GnGQ3vn8BJI9POsDMM yf5A== X-Forwarded-Encrypted: i=1; AJvYcCWoNvg8PnEi7i4dnjVb/FlkNqS3cQxsdRUW1bIu+uMOifMwpPmLIC202X38Yyw6jQko5e7E5eT3R1kCTQRBQQ+gA9W4GvrweBlcov4= X-Gm-Message-State: AOJu0Ywq2GmQH1Fd3hIOZe/B/F10wlMofuCpxbCHiiZglxDkG3SGxtPf 2UiIBqPCGL/QfTLmzcJEH++JTRjh+6kH9/0HCnJdsqo92hNfkcefjNrI7KL3 X-Google-Smtp-Source: AGHT+IGAu3zvUQHfsTC/UTH4WJiceuCvU2xMUjNKMn2kBRL9RuFZai32Qp0okX0mkrFdHSC/S11Q/A== X-Received: by 2002:a17:907:97d0:b0:a7a:ab1a:2d64 with SMTP id a640c23a62f3a-a7ac506f3a4mr176339666b.58.1721903501593; Thu, 25 Jul 2024 03:31:41 -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-a7acad903f1sm57280766b.152.2024.07.25.03.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 03:31:41 -0700 (PDT) From: Javier Carrasco Subject: [PATCH 0/2] {ASoC,media}: constify snd_soc_component_driver struct Date: Thu, 25 Jul 2024 12:31:38 +0200 Message-Id: <20240725-const_snd_soc_component_driver-v1-0-3d7ee08e129b@gmail.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAIopomYC/x3NwQqDMAyA4VeRnC24os7uVUSKttmWg4kkIgPx3 Vc8fpf/P8FQCQ1e1QmKBxkJFzzqCtJ35g86ysXgG982T9+5JGx7NM7RJMUk6yaMvMesdKC6JfQ +zKFbQjtAiWyKb/rdg3G6rj8V+brQcAAAAA== To: Tim Harvey , Mauro Carvalho Chehab , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Ray Jui , Scott Branden , Broadcom internal kernel review list , David Rhodes , Richard Fitzgerald , 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, patches@opensource.cirrus.com, linux-stm32@st-md-mailman.stormreply.com, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1721903500; l=1490; i=javier.carrasco.cruz@gmail.com; s=20240312; h=from:subject:message-id; bh=htIX0gNZEQ2pwJvqGxD+l3IATOPpwVwt2PCD5KSSKn4=; b=vBDKmvKNwCIRMMTYycPXUCa0VMk1znrRDaTVxp1ewj0Yo659ha2gfmiErmmqJzC2lEeS99wV6 S0Y8WTWXCEJB+QZG9JPwzy0tFzzO75Pecq8vABwhbjWvw6sKrkIMHfw 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: RPGC4BKBH2OMNAJL7XIZGJTVGKZKEAO5 X-Message-ID-Hash: RPGC4BKBH2OMNAJL7XIZGJTVGKZKEAO5 X-Mailman-Approved-At: Wed, 31 Jul 2024 08:42:23 +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: The `snd_soc_component_driver` struct is never modified after its declaration, and its only direct user `devm_snd_soc_register_component()` expects a constant value anyway. Declare `snd_soc_component_driver` as const to move their declarations to read-only sections. Apart from a single case under media/, the affected drivers are members of the ASoC subsystem. Signed-off-by: Javier Carrasco --- 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/cs43130.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/sti-sas.c | 2 +- sound/soc/codecs/tas6424.c | 2 +- sound/soc/stm/stm32_adfsdm.c | 2 +- sound/soc/uniphier/evea.c | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) --- base-commit: 864b1099d16fc7e332c3ad7823058c65f890486c change-id: 20240725-const_snd_soc_component_driver-b9629a95b948 Best regards,