Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1444045lqd; Thu, 25 Apr 2024 16:23:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+hcErXj2aeuWc8w0FV/+5Xk6V5A679MDkn5lCAmw7xsSM1YBfxWsT/NdSHCuTpA9/kjVdTsW9Ckd+mlAPDOrU0Lwuep8Y5tV/eizgLQ== X-Google-Smtp-Source: AGHT+IHHExOZbA2QUoV2cep4fMjVVhbZ4kuR4QaDPaJ8l0kqp6oWLTyNkTMsjngafiAHpqFJabpJ X-Received: by 2002:a17:902:7404:b0:1e2:76ad:cb2 with SMTP id g4-20020a170902740400b001e276ad0cb2mr974209pll.15.1714087402044; Thu, 25 Apr 2024 16:23:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714087402; cv=pass; d=google.com; s=arc-20160816; b=NWDPeNNVGOuW4Pxn3UKkGQs3ShcJ1B4C18o7+QHgW9X1u8UDuIyAGxCgez3hH0b+FC M8fzC7dq/whEs5CkhKMBsTMbc78xSblGX7wFSAQ2MHtM5x2QM2IjaCTBDyw77NfQk/Pa z2TtZ0bI6eNcr6nV0iC0n4JTr5AxGXEShwG2ef29+wzWBTmQTgVaTktXraioXUYKnMmB RB8TwcGQ9bF0V2+3zHKhRReAnMEhrdXqBRrkzQMIC/ttXgjr5SIsnWM4JTmnlWlfIlRw 97/qxcAxd0nQbCuOhjGgqyageEaJJhEPl/IsgJVw9ErzudZOs+LgqX/0No1Igwg0SE0m DvDg== 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:mail-followup-to :message-id:subject:cc:to:from:date:feedback-id:dkim-signature :dkim-signature; bh=bTVVtfOqbo6S/FLcC/gLjDKd/B98VKpL8AN5HW3FuHc=; fh=pURKtUkzl/SxdnQb7uKrWTngY6Mc5YPU4UO8qry+7u4=; b=p07+c8zxjP5TgJVFsMjARegZkVCuAEaOWOTgEeKQr6Od8DTISVUxKI+uzKZJS1Aeq9 EL3PwsZz5MEXoZqWhUhGvUuLY2AipW8bn4oTP3YQPA3AACxn2sZ+XPiZ1ZxsHk4ESC6p 2VELXb4zrNzvmF9YaY1xOu2oQ66SNVEggFqzC73DL2J9GZVxkn61luugiCVJwl12/JF+ XunPhpaMO/nmOAAeVB3NH0NcnWDNC3YCcoiurUMKj+QOsvo+LWOP3ejdIwWbpp6iNp4f hBNKB3yULv80HGyXu1wCmuacQefkKgPY6CaI2FQV2opUU3wV4+L8eHX8ttExn2gEXZaD V4mA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm3 header.b="eEt/3Q70"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Hysgz7YG; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-159358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159358-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l3-20020a170903244300b001ea37270d89si5110758pls.537.2024.04.25.16.23.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 16:23:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm3 header.b="eEt/3Q70"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Hysgz7YG; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-159358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159358-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DFAE1B217A7 for ; Thu, 25 Apr 2024 23:23:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21B9F15687B; Thu, 25 Apr 2024 23:23:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="eEt/3Q70"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Hysgz7YG" Received: from wfhigh1-smtp.messagingengine.com (wfhigh1-smtp.messagingengine.com [64.147.123.152]) (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 43C4E156655; Thu, 25 Apr 2024 23:22:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714087380; cv=none; b=uV97pae2zEX23BSaP9cLAfUvzTnAJNYaz+lXUNSvfW0e5tlQY+El8CAIlu1k4ZrGZspnLkpnvfT6JqzIW04aun6sGHEk4+zsCvB3awbvsClUIMjJRCp15GdTWyywBkPcVCzQvoUNfctwpReaHcZyD662vznVkgX9AjMIjHhIvo4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714087380; c=relaxed/simple; bh=AUPfJtbm2kSrH0QmczwP3g8eBPLF8qUBWjvy9grRqWA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MEXaG54wD3aD//IXr4Rev9Z1Z5HR7rjRPXKR9MhplZaRj+LDOchCZOoHLYGg0xtPaVHhzcWbQ57qYQcGaOiUH+2WyIH4elofYlmDIiLwPeqs/5SFfc3YKUDbszyGCnJn/WWfEK8PE250tH+U3mk6LR1KyUosHQ5YJUsj86pNvxg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=eEt/3Q70; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Hysgz7YG; arc=none smtp.client-ip=64.147.123.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.west.internal (Postfix) with ESMTP id AF36F18000A2; Thu, 25 Apr 2024 19:22:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 25 Apr 2024 19:22:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1714087376; x= 1714173776; bh=bTVVtfOqbo6S/FLcC/gLjDKd/B98VKpL8AN5HW3FuHc=; b=e Et/3Q70fUlgnT0ur+U4lzfdLo7twBI8/Z1I7G9NM20VLfY/U9XjGKScYWfBqoUml f26lMDnYqXHsdrycL0TcdeWrwWquvhGzrnrosr5WYZ77Snqq+2rO0Qg/2qlEcOSW V5yLGIqy8Pcqvcqex0CT2peylLH3boJKyphqqQVOJ1WfesaHaRf+aFsLno+s7xYI Cfkxsy6hfY/x7F+hU2IxdtvlW0Pq/aK53hV0nubeh9ceMXo+aXpiY8GNfraiMbzo m6KcGuyVoVlXw0IauaAccVXS+fDBHu0iyhRK7ZGtADc4PhwSDwYCn4MHXJFOCW/N UN7IM4PwAyMxEQVLckNKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1714087376; x=1714173776; bh=bTVVtfOqbo6S/FLcC/gLjDKd/B98 VKpL8AN5HW3FuHc=; b=Hysgz7YGzRDOXRxpOsWgNzJBu7NIsVWH2plmH5W4k3dQ phZp9XWf+XCfCm3y80RGCLE4e+LJ/nKnuAOsXDH2AAhHT0ga4o2+U+spVNqyxj9L vtKHhoZo81+rRDeLv+AsXQKAcC/sNWQ4wDf5UgGMfzxLYmzZ6WcV7RNfmRm2owqU iy7HDR3GkBbmKk2xJ8eCnB/IN1eoC/chl0oSMKz1z06Gyp59udc2/yrPqkJowZMa 6v32ACzZ93T/RFyW6taDAMZgF2XU0KazyZOq3M8rlzlCOJ+suAbY9jaAGvUlHB/k LH04nxIEuErGOBlcruCNeh+2xGNDh/UfXKZvJKdjkA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudelkedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfgrkhgr shhhihcuufgrkhgrmhhothhouceoohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhird hjpheqnecuggftrfgrthhtvghrnhephefhhfettefgkedvieeuffevveeufedtlefhjeei ieetvdelfedtgfefuedukeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Apr 2024 19:22:53 -0400 (EDT) Date: Fri, 26 Apr 2024 08:22:50 +0900 From: Takashi Sakamoto To: Colin Ian King Cc: Ivan Orlov , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] ALSA: kunit: make read-only array buf_samples static const Message-ID: <20240425232250.GA205425@workstation.local> Mail-Followup-To: Takashi Sakamoto , Colin Ian King , Ivan Orlov , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240425160754.114716-1-colin.i.king@gmail.com> 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: <20240425160754.114716-1-colin.i.king@gmail.com> Hi, On Thu, Apr 25, 2024 at 05:07:54PM +0100, Colin Ian King wrote: > Don't populate the read-only array buf_samples on the stack at > run time, instead make it static const. > > Signed-off-by: Colin Ian King > --- > sound/core/sound_kunit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/core/sound_kunit.c b/sound/core/sound_kunit.c > index eb90f62228c0..e34c4317f5eb 100644 > --- a/sound/core/sound_kunit.c > +++ b/sound/core/sound_kunit.c > @@ -167,7 +167,7 @@ static void _test_fill_silence(struct kunit *test, struct snd_format_test_data * > > static void test_format_fill_silence(struct kunit *test) > { > - u32 buf_samples[] = { 10, 20, 32, 64, 129, SILENCE_BUFFER_MAX_FRAMES }; > + static const u32 buf_samples[] = { 10, 20, 32, 64, 129, SILENCE_BUFFER_MAX_FRAMES }; > u8 *buffer; > u32 i, j; Reviewed-by: Takashi Sakamoto We can see the other similar cases in the kunit file. I'll post the fix later. Thanks Takashi Sakamoto