Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1073118rdb; Fri, 20 Oct 2023 07:46:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHw0JVjUG0YyrBSId3/2KBtAWTXVqw0rEYRvqP4vaKCtu0EApAeHzuAQBfC9pbCw2ksi5LZ X-Received: by 2002:a05:6870:a114:b0:1ea:131f:5fb7 with SMTP id m20-20020a056870a11400b001ea131f5fb7mr2416992oae.26.1697813199673; Fri, 20 Oct 2023 07:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697813199; cv=none; d=google.com; s=arc-20160816; b=Q184qwFC5iWBglGMEFRuCmK5kIOMaZWVTRD+FpqDY0yJnBZNft1gMYYqWtbcJhRKh2 oz0ixM/xn31eUK8HWHb6QrrEvYvflbLjqhsOSBPL3udXmApBchfuHz8FUDopy9f/1P67 lX+0KUc5AYZDyX4MqcW4LP35ZHTZjqz84xjtfWVSL0eHLz6fupU/8aaf23qsyg64Jk3a 2XQGuZNhdKM344aAnyeF9cxYTKasz4YObETSLP/4haUzDGW6ROpMPd/52Crqp5G3m8iP dEHzq6Ds8A04fgauSlhBOqhkRFr6aHyWCa+0KtqNIgj8VB1vdRk1YqfhesiZgpG0uVsa XLLQ== 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=cJOWRLwEOTU4KKl+V+ETXhiY44A47kegjLibPXm2/rM=; fh=/D+/N9nOwII8W7TblKMD67Va5CE1GlljOR3RXb7tg7w=; b=ILO+S6A47BaFlTvQhWPBRIOcLNTeAzRF5z1SWp7s7z9XwjqZyE0nBkuNfYlXHGx/Ee hiIFncgU646r5/gKPpMWUebe2rr09L9xKdGoOv5zBwJPs+pCFO0Zx2CfWpGEdcDpBKKb vsDWcD8nsIMzLVNXZyF2IbNEXoxVyf1sBBH8zlhZ+6HZkOAS4BGJk887U2VRkf2hkEzL WbVK4ky4+t/h6d1SGVM+pdqhFQmYCF2hdqNVe51agJO8V9LLZbd7lq60+bUsIEaRdOSc kuOofWZAgL3RufO/l8HXuJB/6z0LvosQVkYr8BlkQo4Cxml3d2ns66Favol8zzI0MxtS xkhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FJL8v259; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id d38-20020a631d66000000b005781e99d048si1931464pgm.889.2023.10.20.07.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 07:46:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FJL8v259; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 3DEFB8217DFE; Fri, 20 Oct 2023 07:46:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377584AbjJTOpq (ORCPT + 52 others); Fri, 20 Oct 2023 10:45:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377429AbjJTOpm (ORCPT ); Fri, 20 Oct 2023 10:45:42 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E066BCF for ; Fri, 20 Oct 2023 07:45:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92F63C433C8; Fri, 20 Oct 2023 14:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697813140; bh=acLf+2NzwVyM5VvEjG3zF0YK+qyKObTQSHvqW8DXLi8=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=FJL8v259AXA+TKgmPtKfArUQilQbmbKFk2oSKh3RUsUBNQEe2H3jcawmi56H2VQBP Zh/XBSh5vJ5a1G9sYcRe0pLvrsx4K+bN/7j5q3zMalqdS/2GSMVWVBLLiIXXH4VTZX OuLSUET62Xrr/F4P0mA/V4zYIejbElRLpPsvc2qBV5esmSSos8kAusRfNBce3/dYzT 1A2iUmrL7sF46EebE0e57dCA1em2hz6OGh9opqIeRm1JBet02Lpi8zkqHzPmzf0JG9 c3irOvTKF3+6L7f6quI1KpV3PJ/pYA8EiaJx8UVxj8817IfsxUhEkegxaT6EuJsZdF f3tP1GFhitPHw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] wifi: ath9k: fix -Wformat-truncation warning From: Kalle Valo In-Reply-To: <20231017155201.111950-1-dmantipov@yandex.ru> References: <20231017155201.111950-1-dmantipov@yandex.ru> To: Dmitry Antipov Cc: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , linux-wireless@vger.kernel.org, Dmitry Antipov User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169781313737.352343.12523599682050042172.kvalo@kernel.org> Date: Fri, 20 Oct 2023 14:45:39 +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 fry.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 (fry.vger.email [0.0.0.0]); Fri, 20 Oct 2023 07:46:05 -0700 (PDT) Dmitry Antipov wrote: > Fix the following warning observed with GCC 13.2 and -Wformat-truncation: > > drivers/net/wireless/ath/ath9k/hif_usb.c: In function ‘ath9k_hif_request_firmware’: > drivers/net/wireless/ath/ath9k/hif_usb.c:1223:42: warning: ‘.0.fw’ directive output > may be truncated writing 5 bytes into a region of size between 4 and 11 [-Wformat-truncation=] > 1223 | "%s/htc_%s-%d.%s.0.fw", HTC_FW_PATH, > | ^~~~~ > drivers/net/wireless/ath/ath9k/hif_usb.c:1222:17: note: ‘snprintf’ output between > 27 and 34 bytes into a destination of size 32 > 1222 | snprintf(hif_dev->fw_name, sizeof(hif_dev->fw_name), > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1223 | "%s/htc_%s-%d.%s.0.fw", HTC_FW_PATH, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 1224 | chip, MAJOR_VERSION_REQ, index); > > According to the comment in 'ath9k_hif_request_firmware()', 36 bytes should be enough. > > Suggested-by: Kalle Valo > Signed-off-by: Dmitry Antipov As I didn't get any replies to my RFH I unfortunately already fixed this myself: https://patchwork.kernel.org/project/linux-wireless/patch/20231012135854.3473332-3-kvalo@kernel.org/ I just used a bigger buffer than you. -- https://patchwork.kernel.org/project/linux-wireless/patch/20231017155201.111950-1-dmantipov@yandex.ru/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches