Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2827038rdb; Tue, 12 Sep 2023 13:24:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHX6eQRTKsRhBqIlQ67ZPaAUyLhINJrqNXeQebwSHKKPqiPNd9kVY124G4/w5k3h2uf0CWI X-Received: by 2002:a17:902:ecd0:b0:1c0:ceab:e9bd with SMTP id a16-20020a170902ecd000b001c0ceabe9bdmr765671plh.25.1694550254907; Tue, 12 Sep 2023 13:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694550254; cv=none; d=google.com; s=arc-20160816; b=eK1nn9Mbc9wImhUVqYdIrrkMqre3uLxmwllwa7LiuwBQ6pOHZIBrZJf6tWkVtrkkm2 w6yOZsy+0Qc7VrpIRWUS12hwH9cCkWkgtD5NQG4n6qn5En1oIAY7VZ+THEIPd3KvR8P/ YyDol0jrtuUDH4HcVp1qKFO4oY/nmvIQIbCHa4fTYtY3nr33IqnVVL+Gtl9yF4kX04l5 razmWi91Z0DdurrRIRmZ7tO8KkiRRqe01MihS6W0F7sfnMMlY8+2kyB86eozhQ4bY7G2 zlf/OFsHlU44UrPJzk4DoFOWc0+MNN71HJ/6/2YuU8ZDQJDuQEwe8vmejw7uzVW3DYoT LMgQ== 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 :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature:dkim-signature; bh=QsgcKrpCBQmwIVUIkIa0mU20jeiAaYjLhhAbrQIvNAM=; fh=GdxKyu6c/OtFfa08kiwQuf6h75OZkONQ07dd7vimvpI=; b=K8diJSo6eW5K+lVsi31kxxqnXRk0mekTpnV38/37Bi0PIaZZzwHmSoT8wxU+C1lO0V ARma6u/5nsGqS9ckNSLHlCks9fDgMei6j8BQ3w2G9Hq7BEeaAZvw+grUEn0KuT+J+HXI Imw32+Ya4vh623zZWUAIxb5oo+tz7FvZDh7oHEC2WO/djXCLtpFU7V1mcnv0UNbG9NEb DmdDZ7PZ2L6FbVLiqEO+mlMWwlBneCPbQpqKR6v90MGxA5eGNBATysXsUWVVToVlOqk7 HuJmjpBgeBP0apZCqlQX0N8Q1zkO5ebmy13b8ONqB+su6GGwbXDHlq5UZ30+X8pxqcXA P7DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=yQvOiNTp; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id kn12-20020a170903078c00b001bdb4827256si8266085plb.246.2023.09.12.13.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 13:24:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=yQvOiNTp; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 82E6E80758C8; Tue, 12 Sep 2023 06:31:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235491AbjILNbe (ORCPT + 99 others); Tue, 12 Sep 2023 09:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235447AbjILNbd (ORCPT ); Tue, 12 Sep 2023 09:31:33 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F05010D0 for ; Tue, 12 Sep 2023 06:31:29 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CA7DC1F45A; Tue, 12 Sep 2023 13:31:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1694525487; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QsgcKrpCBQmwIVUIkIa0mU20jeiAaYjLhhAbrQIvNAM=; b=yQvOiNTp0A3PZHjYu6gXqQ+UHmiwvE9aFTRQIflH0m3cwkmqOOFdauZEOQzfqVqn1Aa7b3 qtVyHChQCBd048K+rqtcQzaO9IBw96zvun8s2720rR4jT73HM+jbdrCikqk1Ue5APby+61 sh3xhcDK/OEDlO2df3spXOUznfPOvHw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1694525487; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QsgcKrpCBQmwIVUIkIa0mU20jeiAaYjLhhAbrQIvNAM=; b=dsZSMuAiQzaRzROLaJX4x1MDRmCBWp/xgSBwFWUGUa4+w9CDIf5YUVQS2squYzZZbJ5P4S jHG6DJUNowwYGFCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8EB0F139DB; Tue, 12 Sep 2023 13:31:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WB/dIS9oAGVUOQAAMHmgww (envelope-from ); Tue, 12 Sep 2023 13:31:27 +0000 Date: Tue, 12 Sep 2023 15:31:26 +0200 Message-ID: <87zg1r5xht.wl-tiwai@suse.de> From: Takashi Iwai To: Peter Ujfalusi Cc: tiwai@suse.com, perex@perex.cz, arnd@arndb.de, masahiroy@kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH] ALSA: core: Use dev_name of card_dev as debugfs directory name In-Reply-To: <20230912110113.3166-1-peter.ujfalusi@linux.intel.com> References: <20230912110113.3166-1-peter.ujfalusi@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: 8bit 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 (morse.vger.email [0.0.0.0]); Tue, 12 Sep 2023 06:31:49 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email On Tue, 12 Sep 2023 13:01:13 +0200, Peter Ujfalusi wrote: > > There is no need to use temporary string for the debugfs directory name as > we can use the device name of the card. > > This change will also fixes the following compiler warning/error (W=1): > > sound/core/init.c: In function ?snd_card_init?: > sound/core/init.c:367:28: error: ?%d? directive writing between 1 and 10 bytes into a region of size 4 [-Werror=format-overflow=] > 367 | sprintf(name, "card%d", idx); > | ^~ > sound/core/init.c:367:23: note: directive argument in the range [0, 2147483646] > 367 | sprintf(name, "card%d", idx); > | ^~~~~~~~ > sound/core/init.c:367:9: note: ?sprintf? output between 6 and 15 bytes into a destination of size 8 > 367 | sprintf(name, "card%d", idx); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > The idx is guarantied to be less than SNDRV_CARDS (max 256 or 8) by the > code in snd_card_init(), however the compiler does not see that. > > The warnings got brought to light by a recent patch upstream: > commit 6d4ab2e97dcf ("extrawarn: enable format and stringop overflow warnings in W=1") > > Suggested-by: Arnd Bergmann > Suggested-by: Takashi Iwai > Signed-off-by: Peter Ujfalusi Thanks, applied now. Takashi