From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A0B0CA5500 for ; Wed, 13 Sep 2023 07:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238635AbjIMHnm (ORCPT ); Wed, 13 Sep 2023 03:43:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238601AbjIMHnk (ORCPT ); Wed, 13 Sep 2023 03:43:40 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CFC11986 for ; Wed, 13 Sep 2023 00:43:36 -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 319D01F45B; Wed, 13 Sep 2023 07:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1694591015; 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=LqGSMVkAA4Ewp/wOJFgzYA6OwmPk0CC2NscF4DotmQA=; b=ZAi7Bt/464oMhiiIs39kEjyATKaMlSMniG38aSFc9vmPpFCEPg3BbJBAXzFApg4em+prlk ukmbUJ7ahsCkbYs/fO8zHJ3+l9bb3G1S17FFVd/zqZwkov94Ijbdos8BrA7UouSqOuCccc Saod/u0m5THe+YzVFzv2f4H76d1I5bA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1694591015; 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=LqGSMVkAA4Ewp/wOJFgzYA6OwmPk0CC2NscF4DotmQA=; b=fQquTscPU1Y2kAIPsR1Xt6FzlLFQAVMs4Z6gbNDTTTiR1tM5XjwuKiXeD+n0+f1+gLaKS/ ByxttswjXYqI+dCg== 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 0140013582; Wed, 13 Sep 2023 07:43:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +vz0OiZoAWURDgAAMHmgww (envelope-from ); Wed, 13 Sep 2023 07:43:34 +0000 Date: Wed, 13 Sep 2023 09:43:34 +0200 Message-ID: <87y1ha4ixl.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, pierre-louis.bossart@linux.intel.com Subject: Re: [PATCH] ALSA: hda: intel-sdw-acpi: Use u8 type for link index In-Reply-To: <20230912162617.29178-1-peter.ujfalusi@linux.intel.com> References: <20230912162617.29178-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 On Tue, 12 Sep 2023 18:26:17 +0200, Peter Ujfalusi wrote: > > Use consistently u8 for sdw link index. The id is limited to 4, u8 is > adequate in size to store it. > > This change will also fixes the following compiler warning/error (W=1): > > sound/hda/intel-sdw-acpi.c: In function ¡sdw_intel_acpi_scan¢: > sound/hda/intel-sdw-acpi.c:34:35: error: ¡-subproperties¢ directive output may be truncated writing 14 bytes into a region of size between 7 and 17 [-Werror=format-truncation=] > 34 | "mipi-sdw-link-%d-subproperties", i); > | ^~~~~~~~~~~~~~ > In function ¡is_link_enabled¢, > inlined from ¡sdw_intel_scan_controller¢ at sound/hda/intel-sdw-acpi.c:106:8, > inlined from ¡sdw_intel_acpi_scan¢ at sound/hda/intel-sdw-acpi.c:180:9: > sound/hda/intel-sdw-acpi.c:33:9: note: ¡snprintf¢ output between 30 and 40 bytes into a destination of size 32 > 33 | snprintf(name, sizeof(name), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 34 | "mipi-sdw-link-%d-subproperties", i); > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > The warnings got brought to light by a recent patch upstream: > commit 6d4ab2e97dcf ("extrawarn: enable format and stringop overflow warnings in W=1") > > Signed-off-by: Peter Ujfalusi Thanks, applied now. Takashi