Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1371466rda; Mon, 23 Oct 2023 10:25:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGsvBl/d2NP2a1OYNH5AVnWjwq7fFbI1ZN7/IQdmwwR6zW6kqEDzXpYQvQQrrf4F608ZXUe X-Received: by 2002:aa7:988c:0:b0:6b5:ec98:427d with SMTP id r12-20020aa7988c000000b006b5ec98427dmr6629924pfl.17.1698081932136; Mon, 23 Oct 2023 10:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698081932; cv=none; d=google.com; s=arc-20160816; b=dul5QFAEuKS8zzrN5Ar77GTexNrFSw50yX0dTBXdWvC/NJSWwcsNX65ovTpkBC0IvF c0g5X63vRKesW0KEwWmabQLXKvgtldQg4lVi0dMiq6jwk6NTtByFV3f8LXsQ2EXqloZ5 kqsi0mxlhqyCGurXZPFcBrkQqbjLNrXGvsKQ9VTUu1qRn2WUER/TX5ypgzWKjm4uOmyg Cg1mq8FYeyvuVK+Kaq1qIeKFR2vyGxXZZkc53I2b4HhW9EYjR2jd+rnrpYc8QHce06o8 qoQ4bCknO4OV6cfKLYuVfLPPAQEy7QRHHhly2SQAQ5Uwb1u2Buy9xM0UNVJOAnOOHTFi whRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=4UpBI/43f2U26AaqJ8nap5UJHBxRV+0z3pcbGDY5hDI=; fh=Stt4tO5RDO3ypHUI82wMoPEI1zbIEdbNkG8EnOlaEew=; b=gZU+k9n414QE3TjLhZYSie11hf9jaJpjwn+fcJJ+MJNvG8KFwxnJ8ivjboSQIKuE9U fIAlooH+pxwL99XD2Ie6xtbsVabTwwWrrv9OgSvJ6Ou0TSEMUO6ktuOO5yNLe7hSMsTG Mcfp6DTH4607S5NUkoNHWeCMrjmIskxPGcYjksRV45nqtA4Z15C5YMNCRMFqNv6E9y54 +eY/0w3hgmJArtX/Yzmz/cMyJoQcBiwqwQbm5vHwRpN1CoM8amJW5cGgw0uviwifKvWm DUs1lNdPsARdm1AR8do4YfIhC/inm4xdQH0chWi9f3o13v0yT6srrhflZuyM22M8ixlP YmNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sNyapKAO; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id i192-20020a636dc9000000b00565342470c4si6617930pgc.801.2023.10.23.10.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 10:25:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sNyapKAO; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-wireless-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 pete.vger.email (Postfix) with ESMTP id 295A1807FD55; Mon, 23 Oct 2023 10:25:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbjJWRZX (ORCPT + 52 others); Mon, 23 Oct 2023 13:25:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbjJWRZV (ORCPT ); Mon, 23 Oct 2023 13:25:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D8DDEE for ; Mon, 23 Oct 2023 10:25:19 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AC7CC433C7; Mon, 23 Oct 2023 17:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698081918; bh=GuXXS31t9Vtcv709kb40Xj2GJgjFOUYLP5P+8DuT3Sg=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=sNyapKAOoOG9tFjmBkut+3WREuKr1pZo8F139z1GUIeeNQw5OrX5riUop2C8mL0kk cSVNvgj288NFdOGcQDxYymCy3lYEPxT+31PMcyCRBnF0W+a7rX9leG+6a+W6RObBVQ BCmHqElb9SY5hWA9x3lZkczvK/mhcO+yX86RsuRKUKM0b6oKjkLOaQo+4NtIZ5D6CX P9jbIP28F4WQTABSS3B2R3BMX1Ze2xrPilD9/u6JekkecnNPnxw3vhkbPsDn49xuF5 SAA1Nl22m3LBUDajJZzAMdzQSLvilnmteh2KaaKc797QOxG8Fm1VptkYD1CIyOxxYN 490HtW0KC8xAQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 1/3] wifi: brcmfmac: fix format-truncation warnings From: Kalle Valo In-Reply-To: <20231012135854.3473332-1-kvalo@kernel.org> References: <20231012135854.3473332-1-kvalo@kernel.org> To: Kalle Valo Cc: linux-wireless@vger.kernel.org User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169808191584.695306.1796980160191200158.kvalo@kernel.org> Date: Mon, 23 Oct 2023 17:25:17 +0000 (UTC) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 23 Oct 2023 10:25:23 -0700 (PDT) Kalle Valo wrote: > On v6.6-rc4 with GCC 13.2 I see: > > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:262:52: warning: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size 4 [-Wformat-truncation=] > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:262:46: note: directive argument in the range [0, 65535] > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:262:46: note: directive argument in the range [0, 65535] > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:262:9: note: 'snprintf' output between 9 and 17 bytes into a destination of size 9 > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:265:55: warning: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size 4 [-Wformat-truncation=] > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:265:48: note: directive argument in the range [0, 65535] > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:265:48: note: directive argument in the range [0, 65535] > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:265:9: note: 'snprintf' output between 10 and 18 bytes into a destination of size 10 > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:342:50: warning: '/' directive output may be truncated writing 1 byte into a region of size between 0 and 4 [-Wformat-truncation=] > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:342:42: note: directive argument in the range [0, 65535] > drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:342:9: note: 'snprintf' output between 10 and 18 bytes into a destination of size 10 > > Fix these by increasing the buffer sizes to 20 bytes to make sure there's enough space. > > Compile tested only. > > Signed-off-by: Kalle Valo 3 patches applied to wireless-next.git, thanks. fab22496c982 wifi: brcmfmac: fix format-truncation warnings c253e43e1078 wifi: ipw2x00: fix format-truncation warnings 359342795d62 wifi: ath9k_htc: fix format-truncation warning -- https://patchwork.kernel.org/project/linux-wireless/patch/20231012135854.3473332-1-kvalo@kernel.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches