Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3674404rdb; Wed, 13 Sep 2023 21:42:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGzg2pZVjug3Mp9c988udUGFh+ZrV0Os5Fr1sBk/Mh7gjEa/+dgSy07LDi2I2xNqB3sQEED X-Received: by 2002:a05:620a:2fa:b0:76c:ea00:e5d7 with SMTP id a26-20020a05620a02fa00b0076cea00e5d7mr4478031qko.12.1694666566429; Wed, 13 Sep 2023 21:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694666566; cv=none; d=google.com; s=arc-20160816; b=C2FZGJtdwKyUwui9yUW+eRuHn+ohZxNqR/aMSN+8+hPG+qr+GSlhsC4sWhOWo/l8mJ TZuyKgcEa7d0my/YPhjOaaRIp1gMrcnnwN8ppEbDLhGPQls9Vjsf6ekLJuXWWM1Th9I3 6tPofDNnnK2BTy6maVwaihxNae+I169NCjLWBXWEgCQsJrN4kTHQFCWSEx9EjPgLDBiC qzHAf+TwAyD6wGAeoOGiC78eLod0bTdI7MRnm5SN9L14fzyYLLtmvnyt754dStpFAOK3 lzDX/23yMcf43Fr0BCjty++prQxTgNx2bC7egwRuOPpx07z/8wUD7F8PFLdXUVaqFHTj FN7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=cbdBfaty/ytFyOIPE9e58qmd9dLFbaqJlmad7CMFmEM=; fh=htdTUHZk0QLt7oaMVbL8H5emKKGk/a6XJPktagPdVIs=; b=fCYphvBy6268qw8t4lauNPoCcn14vjNO/HavTKT+/0sYTHvGwtGdO5UEUXwOfF7AI6 2/Uv2iUJ2O8sBpfrEX5Wf6YV6JTBu8NlH0QW+Q5SfWu6VcAoYdW77BKG9hojTQqDU2BJ mY/qcrduvTZvgeOTgtQAORCwa7oItK7prW34l6EPdt+jRMQXai7z7yGW7LWqi4AeSyVP XqvVKbHVa8K/hrXud1CMgI6yKX7dzacIPymwC/Wlc5bw7AOoG4t9kNQvWP6RHgTgcXGV BfN0c39y3qM7tN56MNnfsUyPqVM6XWG141dRCr9r7DI331O3FmkndmYGbO7XCEKUvihZ xqTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JUEWMTyA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h19-20020a056a001a5300b00690258a977bsi775416pfv.354.2023.09.13.21.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 21:42:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JUEWMTyA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E55B7822CF13; Wed, 13 Sep 2023 10:46:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231474AbjIMRqq (ORCPT + 99 others); Wed, 13 Sep 2023 13:46:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231452AbjIMRqq (ORCPT ); Wed, 13 Sep 2023 13:46:46 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E6DE19AC for ; Wed, 13 Sep 2023 10:46:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AAABC433C9; Wed, 13 Sep 2023 17:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694627202; bh=C69XA7WhlnFGCOFGMTb5QDKicj6hLtK+9Kr20IL8P4Y=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=JUEWMTyAew0CYabud9NhLZvJlGPjv1y/e2NNN95RAQicKEpm6NXCVijFlNqp/Ab0Q gsh+0ltas9250WlXXupFNGTQghBTWk+fNRtKklquF6b+MVyAwaNxqoKgcsO0i6RxN9 FltuYHu3jK6IV9ebTncvGo7deftNOWM+bIvLetqPsYGJ6qqq8dC9KiJBeLisAlf18j 4iKOjE2GxpJepr6iNgoIkTSxHi1eKjAAidGIx0Z9pYOrAuvfkhIv1eb3DiaiADHff+ /aUMY0w3S7gJX31TRd8d10Jfwag9pnI9xNBj52ki2ZuarAYfsoPxISpY35/3PlI6H4 hvrtn+Ynv/RQQ== From: Mark Brown To: lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, tiwai@suse.com, perex@perex.cz, arnd@arndb.de, Peter Ujfalusi Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, masahiroy@kernel.org In-Reply-To: <20230913091325.16877-1-peter.ujfalusi@linux.intel.com> References: <20230913091325.16877-1-peter.ujfalusi@linux.intel.com> Subject: Re: [PATCH] ASoC: hdac_hdmi: Remove temporary string use in create_fill_jack_kcontrols Message-Id: <169462719996.54382.1348437312266956494.b4-ty@kernel.org> Date: Wed, 13 Sep 2023 18:46:39 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailer: b4 0.13-dev-034f2 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Sep 2023 10:46:52 -0700 (PDT) On Wed, 13 Sep 2023 12:13:25 +0300, Peter Ujfalusi wrote: > There is no need to use temporary strings to construct the kcontrol names, > devm_kasprintf can be used to replace the snprintf + devm_kstrdup pairs. > > This change will also fixes the following compiler warning/error (W=1): > > sound/soc/codecs/hdac_hdmi.c: In function ‘hdac_hdmi_jack_port_init’: > sound/soc/codecs/hdac_hdmi.c:1793:63: error: ‘ Switch’ directive output may be truncated writing 7 bytes into a region of size between 1 and 32 [-Werror=format-truncation=] > 1793 | snprintf(kc_name, sizeof(kc_name), "%s Switch", xname); > | ^~~~~~~ > In function ‘create_fill_jack_kcontrols’, > inlined from ‘hdac_hdmi_jack_port_init’ at sound/soc/codecs/hdac_hdmi.c:1871:8: > sound/soc/codecs/hdac_hdmi.c:1793:25: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32 > 1793 | snprintf(kc_name, sizeof(kc_name), "%s Switch", xname); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: hdac_hdmi: Remove temporary string use in create_fill_jack_kcontrols commit: 67a810b6f37a7805474add2d003034a288b94fa4 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark