Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp74994rdb; Wed, 1 Nov 2023 17:47:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDfHfVtIk/+GSkJTRuxYB/nJmPdgRdb7BNv4G6/21CeXb4yd1BLcD1W7/DRs+iFsDh6QBr X-Received: by 2002:a05:6a20:1456:b0:174:63a9:2aa with SMTP id a22-20020a056a20145600b0017463a902aamr17348854pzi.18.1698886056885; Wed, 01 Nov 2023 17:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698886056; cv=none; d=google.com; s=arc-20160816; b=noNDUSZg/JWKV/jjPGgPNvR4ZNJA7k1DcewzMC8uVn2cHqkXtbv0oLL4AEQRSBYN5G zx7tfKPA8bWfXDl10U7eBRCu+CTNh/9Ugkoz41YjCfHCj3O4rIekGrAYVL39Vej/q6PD A/3BpwqYwU/SWGOu2hU65vXk0TnyRcKj+JhQaCWsUeKR8HC+1czdirPnZLbJUVFiYuUm AUSQbUH/Bnswz+VmtfWCap0mppbwAM77e38PvBRJIXPN2xHQDmmVIEyGMKKjpnfhf0Vw 7UYEcs7qelRdQWdLSEWj/fwJs0HKibpVYYD7sWEOPdqcuwG3XjS3RER6lEqBTfwI6KLd ufsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=7LFBUw7IOy/OwvSAxmSaGTsDLoyG9P5+ptlgYHudkyc=; fh=6fLrpaGvy1ElwkOU+JMlCnqmqr+/ubd8uUIG2SIVerQ=; b=wGbV8jxE+kGfoXo7S4JGClVIt2/CnCrS0z1ZHz8tNgY2dMpHVj7o73OunC6SYcf/Wo nOAt/EpyhlaI5CbHeTdw76Mcq+pPsEyygOvksG174Iz/MN9WOQ2XnIV3kbHyDOEP6rIa Wb0CpQylZ20fpuQlYnbAlPTwFqMMUFx/ofKXx1Ww+7Eicp7LeAH87qt1hKj/sD7UODWk K9HyQH2J0EkMvhD+0qWCTPVsod1cIQM3pLVYfQ2klcGJ4YJ+/mWAvTL65etnwdUQb1wt kGGAnw2yDEz5c7loucz2Q8vjHz9EkADGrjDXaZ9W9M3+3ZDjkAvLdEjMZ6VZoQvKYFYn LHDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ck7-20020a056a00328700b0068780155ddbsi2736708pfb.131.2023.11.01.17.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 17:47:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 82C6E8106F65; Wed, 1 Nov 2023 17:47:33 -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 S234640AbjKBArP convert rfc822-to-8bit (ORCPT + 99 others); Wed, 1 Nov 2023 20:47:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234568AbjKBArO (ORCPT ); Wed, 1 Nov 2023 20:47:14 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1F61DE for ; Wed, 1 Nov 2023 17:47:11 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3A20kiqeF2130566, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.93/5.92) with ESMTPS id 3A20kiqeF2130566 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 Nov 2023 08:46:44 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Thu, 2 Nov 2023 08:46:45 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Thu, 2 Nov 2023 08:46:44 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Thu, 2 Nov 2023 08:46:44 +0800 From: Ping-Ke Shih To: kernel test robot CC: "oe-kbuild-all@lists.linux.dev" , "linux-kernel@vger.kernel.org" , Kalle Valo Subject: RE: drivers/net/wireless/realtek/rtw89/coex.c:1448:17: warning: writing 8 bytes into a region of size 0 Thread-Topic: drivers/net/wireless/realtek/rtw89/coex.c:1448:17: warning: writing 8 bytes into a region of size 0 Thread-Index: AQHaCyb77GwApLO1gkiavUd4YVAIPrBmM1uQ Date: Thu, 2 Nov 2023 00:46:44 +0000 Message-ID: <92fba00735f3483cbbc77ad986cd7c16@realtek.com> References: <202310301908.Wrj0diqe-lkp@intel.com> In-Reply-To: <202310301908.Wrj0diqe-lkp@intel.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-originating-ip: [172.21.69.94] x-kse-serverinfo: RTEXMBS04.realtek.com.tw, 9 x-kse-antivirus-attachment-filter-interceptor-info: license violation Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 01 Nov 2023 17:47:33 -0700 (PDT) > -----Original Message----- > From: kernel test robot > Sent: Monday, October 30, 2023 7:48 PM > To: Ping-Ke Shih > Cc: oe-kbuild-all@lists.linux.dev; linux-kernel@vger.kernel.org; Kalle Valo > Subject: drivers/net/wireless/realtek/rtw89/coex.c:1448:17: warning: writing 8 bytes into a region of size > 0 drivers/net/wireless/realtek/rtw89/coex.c: In function '_append_tdma': >> drivers/net/wireless/realtek/rtw89/coex.c:1448:17: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=] 1448 | memcpy(v, &dm->tdma, sizeof(*v)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > e3ec7017f6a20d Ping-Ke Shih 2021-10-11 1442 > e3ec7017f6a20d Ping-Ke Shih 2021-10-11 1443 tlv = (struct rtw89_btc_btf_tlv *)&btc->policy[len]; > e3ec7017f6a20d Ping-Ke Shih 2021-10-11 1444 tlv->type = CXPOLICY_TDMA; > ce986f3dc4fc69 Ching-Te Ku 2022-07-25 1445 if (chip->chip_id == RTL8852A) { > ce986f3dc4fc69 Ching-Te Ku 2022-07-25 1446 v = (struct rtw89_btc_fbtc_tdma *)&tlv->val[0]; > e3ec7017f6a20d Ping-Ke Shih 2021-10-11 1447 tlv->len = sizeof(*v); > e3ec7017f6a20d Ping-Ke Shih 2021-10-11 @1448 memcpy(v, &dm->tdma, sizeof(*v)); This statement is to append a struct named rtw89_btc_fbtc_tdma to value field of a TLV struct, but compiler warns dst of memcpy() because of tlv->val[]. Maybe, this is a false alarm? Anyway, for this case, a simple assignment "*v = dm->tdma;" would be easier to understand what it wants and also avoid compiler warnings. Then, I sent a patch [1] for this. [1] https://lore.kernel.org/linux-wireless/20231102003716.25815-1-pkshih@realtek.com/T/#u