From patchwork Sun Jan 31 00:12:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12057437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59CDDC433E0 for ; Sun, 31 Jan 2021 00:15:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B54464E0F for ; Sun, 31 Jan 2021 00:15:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B54464E0F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DCABB1767; Sun, 31 Jan 2021 01:14:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DCABB1767 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1612052112; bh=2Zk5RvqspPd7hFW2Hc9ksc8we6KixQ9Rn/RGzCRjHNk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sILlTNVZ+XTbm1YkJEQibmB4IJfZcZflxpLiKKMLTakgf52V3JBdUIG6+suBy9oYg BUsuVsaFP45XU3FaGg37O9VQBGbnin5ghJAp7Z3ANYSwTA5Qb/pYr0CGQqe99G/M6o RjkoflvZpuEGU4Zt3Ory7lmvn05hTNg+PNdPjqoI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9A2C8F8029B; Sun, 31 Jan 2021 01:13:30 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 19878F8015B; Sun, 31 Jan 2021 01:13:11 +0100 (CET) Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 36B3FF80158 for ; Sun, 31 Jan 2021 01:12:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 36B3FF80158 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VG60oQQV" Received: by mail-lj1-x230.google.com with SMTP id f2so15001077ljp.11 for ; Sat, 30 Jan 2021 16:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TNULYoCFMxkvIYfnPGwrWYt25AhtkOvu532DvQKjYIE=; b=VG60oQQVAtnPDp8YE7K73mpWCbyNFQFLV6fLCs9quGtY+kJB+yHj/ArUzYJT7T2ouB JDvO3SjJbgmBZ8gnubAECrtIvksq34OB69sgM3Ha/NL89/BKba0LPfApnzt7IOBUXN1G 2UYYP4zYoX7CaRziUWviEwen3/sy45iCTDE2qlF6ZM+g/hZgdEhRYOMBZr9U7uCtCQih 3K4R406nh9cFiT/9/1nIIUdy8SSqF8OHRmBuwdQ7A+ehgL39coJ1DLgwPKKgAIdPeeGy +g+RPt0s9Ay4dmdAKkLyWpkDVC1lJ4z8fAFIB1aRDSgoTbGDc7fgEv3IWzmZOBqS24qf zaig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TNULYoCFMxkvIYfnPGwrWYt25AhtkOvu532DvQKjYIE=; b=h3WsmmlHGLT22G7zW3iMu8WURCdnmRIOU6qXSv7d1Sc5zjEFxBQEq/uOW7j1sX12nm JK7tE3v6O9LX8v+J/ckmOu1wpKrJwharVxujyy5N19XWSbW2iZVybuCQjMDqAnvtWNxa uo5vsi6dpQ85GkN1clUXsqKql55D1gJYS4e2h0FuzJcoN4JdW90rB7PBJu6rPvTankZ7 LX5XphwY49WLBVPiH0oGJympCp+09S4xBf9mqNRhPSmsNpLetrE5IlNQKQw5btbR+2gH FbuaKGlk6c2XBuF68hfuqXSJcxUgs7zaV6GaImNOTMBzngnkFteOXtpCfZYwMdBofnu/ RB9A== X-Gm-Message-State: AOAM531LvKxaLenbhh2/uyYjv1HOpUEA5ze67HQnZzWdC4X/PWyEBSDM zntPapOzw0oqdr7w8VB5bxI= X-Google-Smtp-Source: ABdhPJwIwCCAqBgXPZ9A9uAUMWI5/ecyMgpwRPG/qFkbheuq32Wzct8Jlte+Q4yIT7dMt69pOf3tJw== X-Received: by 2002:a2e:99d3:: with SMTP id l19mr6144824ljj.132.1612051969926; Sat, 30 Jan 2021 16:12:49 -0800 (PST) Received: from localhost.localdomain (h-158-174-22-164.NA.cust.bahnhof.se. [158.174.22.164]) by smtp.gmail.com with ESMTPSA id t2sm2503716lfl.141.2021.01.30.16.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 16:12:49 -0800 (PST) From: Rikard Falkeborn To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 1/2] ALSA: ac97: Constify static struct attribute_group Date: Sun, 31 Jan 2021 01:12:40 +0100 Message-Id: <20210131001241.2278-2-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210131001241.2278-1-rikard.falkeborn@gmail.com> References: <20210131001241.2278-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Rikard Falkeborn X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The only usage of ac97_adapter_attr_group is to put its address in an array of pointers to const attribute_group structs. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/ac97/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index 7985dd8198b6..d9077e91382b 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -273,7 +273,7 @@ static struct attribute *ac97_controller_device_attrs[] = { NULL }; -static struct attribute_group ac97_adapter_attr_group = { +static const struct attribute_group ac97_adapter_attr_group = { .name = "ac97_operations", .attrs = ac97_controller_device_attrs, }; From patchwork Sun Jan 31 00:12:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 12057435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25A6FC433DB for ; Sun, 31 Jan 2021 00:15:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EA57964E17 for ; Sun, 31 Jan 2021 00:15:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA57964E17 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CDF071766; Sun, 31 Jan 2021 01:14:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CDF071766 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1612052107; bh=FYBClFVODkmK5At+DBGbTm1eUTvqwZHVh/lb5Sd0sbA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Igm+CSq0SQBY2Bj57oZ+SRZkgfIdTQC9d6soc0671Kc3GvT7MCYO183F3sOXGczQm GhoyeneFJ7Ks9OpmfTlQeKJrzSKXBmT1TVjk9gUQAt1MDrXDcgSAlcxznJb/UYAVbG rsyQrtipWlTpjjEB08iWU/YGjFp72QJuOGVhGRvA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F0554F801ED; Sun, 31 Jan 2021 01:13:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F1806F801D8; Sun, 31 Jan 2021 01:12:59 +0100 (CET) Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F0EFDF8015B for ; Sun, 31 Jan 2021 01:12:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F0EFDF8015B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N0Vw6MDT" Received: by mail-lj1-x233.google.com with SMTP id r14so15044210ljc.2 for ; Sat, 30 Jan 2021 16:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=batmuya7co49qkeSt7rrFXuUKreU4NnJ2KEEv73JYWE=; b=N0Vw6MDTg3MmEUEM+hsk5w+E42bPcuteYfxeiCXtQlJhfysYBf6F1bwNX6K2/ol9lr B0dvXiBwRWcYze3Z8zbQLJWoiqu2tcI48i/Hprge8E/0JSEwXILtznma+VmymPNiqkM7 IXlLDS86Hkhup1wFZEchkUUFQQlHDfH9oadUWwQD/VhYSMrBGHZzx3/3UH1Vl6CcL7Qd CIo9JoTeTwUJubikMXXp1EeDoBPogYAbJ7e99aeXUJjvsK3fR2NVQIZXXEdBiKmwcFDp CHVz2APc8Y3Q5/w6ZOIOpsNNcqWXJe6SDNurmfiJEcoyhE2CzzTyAkDXsQkUFnMq8Zea rZBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=batmuya7co49qkeSt7rrFXuUKreU4NnJ2KEEv73JYWE=; b=XiSh6VhYVIZaqfJ6vx/sCkTW4xatrpKXStyMDu/V5PMjivGdUeEJvG3v5Pn/HfMIEE 7PXc8OtMuY/6uRtfk5VmH4sqdbT8UB6j6bPFkkPUuglb3wKn23UJUwiRYMgD04R55QKf 7k1lbTda04KqyxTUl7ERlwNni1ZXPCXmDY3ty5uCgTcsNdieHCYJJmCAmHzoirwZZZYP LLLacjBDTk5yp6+tdFJHdnOBsznH/P0k/WjIGy0MSgt9b+MKVXkWCoEPK3ugH+W/O9g0 aqnng2PIOMb3ALdf+0S+/rfKeJI1hHpOV09a6XsxUFKFBD5eg+YVexxtGVpGZLxOc9Cp PmUQ== X-Gm-Message-State: AOAM530Wo4JQqEzAO60bQGutpTmjSHM0vvoa1rka7obFbgK6JEG7gzU2 KPthl9K4Gkq3OpsRDaVPtrw= X-Google-Smtp-Source: ABdhPJzqdfGT0I5FjeX+bddT2YdZRIrkK9noae0FfxIJ5yXOyUWdWRzU5toIGWdCbQFzZHTJ6XJRSg== X-Received: by 2002:a2e:86d0:: with SMTP id n16mr6250660ljj.51.1612051970975; Sat, 30 Jan 2021 16:12:50 -0800 (PST) Received: from localhost.localdomain (h-158-174-22-164.NA.cust.bahnhof.se. [158.174.22.164]) by smtp.gmail.com with ESMTPSA id t2sm2503716lfl.141.2021.01.30.16.12.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 16:12:50 -0800 (PST) From: Rikard Falkeborn To: Jaroslav Kysela , Takashi Iwai Subject: [PATCH 2/2] ALSA: hda: Constify static attribute_group Date: Sun, 31 Jan 2021 01:12:41 +0100 Message-Id: <20210131001241.2278-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210131001241.2278-1-rikard.falkeborn@gmail.com> References: <20210131001241.2278-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Rikard Falkeborn X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The only usage of hdac_dev_attr_group is to put its address in an array of pointers to const attribute_group structs. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/hda/hdac_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/hda/hdac_sysfs.c b/sound/hda/hdac_sysfs.c index e56e83325903..0d7771fca9f0 100644 --- a/sound/hda/hdac_sysfs.c +++ b/sound/hda/hdac_sysfs.c @@ -66,7 +66,7 @@ static struct attribute *hdac_dev_attrs[] = { NULL }; -static struct attribute_group hdac_dev_attr_group = { +static const struct attribute_group hdac_dev_attr_group = { .attrs = hdac_dev_attrs, };