Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1746622rdb; Thu, 7 Dec 2023 07:47:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFk3xb/rO0bjGvxzgxE6hNO4Q0o4/lC3UsBNCuMMjCWaoFHB63VUFtoI9VNhBFtuCX8L17 X-Received: by 2002:a17:90b:30cb:b0:286:c398:841b with SMTP id hi11-20020a17090b30cb00b00286c398841bmr2650266pjb.58.1701964061764; Thu, 07 Dec 2023 07:47:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701964061; cv=none; d=google.com; s=arc-20160816; b=n02W3kDoI7wgZRsCLYDBbW/TTvRVQoQ5OKlKKfgkuIJavW7Ho9z0nbt/EdIvyGJ3DF HEqElIOEAIei95JEaMtY7ceZIdqhck/x1niLhbfM3oLQ7wCIKlTaiO4AzAiIfXOcVMGG VslfGlTVWrDmyH/OBF7My8ki605ChCC5fjh9LkIo6wFspuVwwwBOrGbb/Qu/QVjyXwK6 YHJu2HTzW37VE5W70QCf52ryx6i/ggfDBjEYacLcj2yxPnxYD/U4R0bO5z98DV320yRJ QwhaPYcDWsgUa9snhtCyxQUE5E5hitEJCqSoGqwhN9ySOYHm9qfrSnbBzxExrCxfrnFz 00EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=gD0ug+Hib+it3pKgoQEtwPF2ZkegWmBcPlmSj1fEI/M=; fh=Ojww7EQTTGy3jOXTQAkfsMKXyXuyUh/m9Y9Q3mC/yKc=; b=Kuu9BfjZXvwYfsUW3+uaNhrJJcmudAdIrnywvJljVjFr1Et4L7Dk3lGAaQ/HEBPXZb 1x4ZZE3N2cbXoGtb9AsUUOTGUA/SR3dsd3lRah/HPIVXAbC8mvoO7nCF6V+zRjNzpDYH DozaSKxKFaOLiDQeu/C88sNQ6pRDn/BzDnDFZSBuQX0qwnPLPFc0q8pgJb0vYV48AAmN xF7Axdgq9hpFDHylopBNb/12IMOT5j4JN4nFO5OASvhxJSjz2mB1CkvZK2gAg/AWkN4U kh4sGzuN2DzFK1JWr1T0D3/vQb6ELLsJi7OdxAuVx5eXrnk8U+K1djGe8dANAtQfMjQX MDaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="E0d1vBL/"; spf=pass (google.com: domain of linux-wireless+bounces-549-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p16-20020a17090a931000b002869df977ddsi1301969pjo.79.2023.12.07.07.47.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 07:47:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-549-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="E0d1vBL/"; spf=pass (google.com: domain of linux-wireless+bounces-549-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id ED9ED281741 for ; Thu, 7 Dec 2023 15:47:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2E8544C8D; Thu, 7 Dec 2023 15:47:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E0d1vBL/" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8CE41D54E for ; Thu, 7 Dec 2023 15:47:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFE7CC433C7; Thu, 7 Dec 2023 15:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701964057; bh=/ZDHgbY7Qojq5NSOaS3ODtQuPI8wdf01S4O6ylvQ4SI=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=E0d1vBL/4aGpOEQtNh5W274I6t+fB4VirOSjzn/XML6rDD+UnjGgt3ohtFvMsmqNk ULIKqdgiezEcVjB0XHj11u352aB1aytMQu4vUdVvuHkRoJ+aFKF4McyjRL4VEi1Qhl xrFBVyfCJSKpeTDlKEeCrfFNDc4OlG4SZXUGmBUvnr2TNKnRInua8KVfQPBLX55c0Y dLfr4vcVFqJaJGI9Zds4Yttd65AJ4Dl/0bW2mVjBTz6+GsqH5+yqLRrIneEjby7zWw hDBvMB8lIsM50U0q+QYzni0m5RLobflwPK90M9v64AtEGugT6ItS5d1VUWSmrcEjlC htfNe6paRjfsA== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] rtw89: avoid stringop-overflow warning From: Kalle Valo In-Reply-To: <20231204073020.1105416-1-arnd@kernel.org> References: <20231204073020.1105416-1-arnd@kernel.org> To: Arnd Bergmann Cc: Ping-Ke Shih , "Gustavo A. R. Silva" , Arnd Bergmann , Ching-Te Ku , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <170196405395.2897000.836367709392997740.kvalo@kernel.org> Date: Thu, 7 Dec 2023 15:47:35 +0000 (UTC) Arnd Bergmann wrote: > From: Arnd Bergmann > > After -Wstringop-overflow got enabled, the rtw89 driver produced > two odd warnings with gcc-13: > > drivers/net/wireless/realtek/rtw89/coex.c: In function 'rtw89_btc_ntfy_scan_start': > drivers/net/wireless/realtek/rtw89/coex.c:5362:50: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] > 5362 | wl->dbcc_info.scan_band[phy_idx] = band; > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ > In file included from drivers/net/wireless/realtek/rtw89/coex.h:8, > from drivers/net/wireless/realtek/rtw89/coex.c:5: > drivers/net/wireless/realtek/rtw89/core.h:1441:12: note: at offset [64, 255] into destination object 'scan_band' of size 2 > 1441 | u8 scan_band[RTW89_PHY_MAX]; /* scan band in each phy */ > | ^~~~~~~~~ > drivers/net/wireless/realtek/rtw89/coex.c: In function 'rtw89_btc_ntfy_switch_band': > drivers/net/wireless/realtek/rtw89/coex.c:5406:50: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] > 5406 | wl->dbcc_info.scan_band[phy_idx] = band; > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ > drivers/net/wireless/realtek/rtw89/core.h:1441:12: note: at offset [64, 255] into destination object 'scan_band' of size 2 > 1441 | u8 scan_band[RTW89_PHY_MAX]; /* scan band in each phy */ > | ^~~~~~~~~ > > I don't know what happened here, but adding an explicit range check > shuts up the output. > > Fixes: 89741e7e42f6 ("Makefile: Enable -Wstringop-overflow globally") > Signed-off-by: Arnd Bergmann ERROR: 'wifi:' prefix missing: '[PATCH] rtw89: avoid stringop-overflow warning' ERROR: Failed to find commit id: Fixes: 89741e7e42f6 ("Makefile: Enable -Wstringop-overflow globally") I can add the "wifi:" prefix but where can I find the commit 89741e7e42f6? -- https://patchwork.kernel.org/project/linux-wireless/patch/20231204073020.1105416-1-arnd@kernel.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches