Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2321843iof; Wed, 8 Jun 2022 02:25:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUCREVL3Klr13gl6hxrjz09wwY2tU3YQcSJpm0l5XmXUeABYQ/UKyaqSd1RYbUVX5j8/e+ X-Received: by 2002:a05:6a00:10cc:b0:4fe:3f1c:2d1 with SMTP id d12-20020a056a0010cc00b004fe3f1c02d1mr101314816pfu.0.1654680300771; Wed, 08 Jun 2022 02:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654680300; cv=none; d=google.com; s=arc-20160816; b=mb0sHC1l0RppHQf2l6bdV+Unuj1H2MrvIBA65BXBiy7rjCCHo6Vf5pBCAWoYogS8bz XWIYf0KpVnThvwps09jE6K1ogmaXHNgpqGXDXF6CE3qDY0Kh3PUXdWdd3lglgjn2equi LgS3N+cbUpYQmodbGfPhi6u2UuvdXdljM/kqSWMNnVRo/MytCSm6OdZbWQm+rbMzZXLq GtPT8I1JUF1fEX+fSaF7yuttMcMDeLyiomXWkP+IY3BTVcI7RiVaFStiCTC3FXWvUYBN 5A89ITbi64y/6/5qX5tU8Q5cw23BIfQ3qTD/QRxrRv/IBzMZCC7GfkoEG+kdAyeD3KPu KstQ== 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=pvseqOtjsUTPBrXAVqcSNTE291Ux8an25WbtStWgjVg=; b=Mb5Medu8bGOGxznvRPk+cU55W1h7Ddwge8+l1iSI62hI5eFlf8clpRw/DTUHceVfii cymwqm9UgJvTsMT+d4z4mNJe4o+KLmhZNgyQkODXjUZOf/ndwdQSTEMWBcGAZwPpNu15 ff5bNcOrr3CZV/e7HGBTt97Y2aCQImTZ7ShF/dPtXmCTLkBxoECkQhXCKN04cKM5PDqm uoCHgUY1PGFVXr8p3nVVU6dTqv3sXMWNbcNW18AbkxqH4m2SkIGCStMAQ7Az7zzirRzO mMR4BCWCCdy4IJNlmsNrQ/Peup0DZ4V32jywrCZGfoWvEu3sqIRSHkKYKCgo65OxX7sx iYxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j22-20020a17090ae61600b001d934c0fbfesi9856593pjy.77.2022.06.08.02.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 02:25:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 92E6F12FB1C; Wed, 8 Jun 2022 01:55:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233106AbiFHIzK convert rfc822-to-8bit (ORCPT + 67 others); Wed, 8 Jun 2022 04:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232823AbiFHIyZ (ORCPT ); Wed, 8 Jun 2022 04:54:25 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 708183B172B for ; Wed, 8 Jun 2022 01:14:58 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 25885kkaE020259, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36504.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.71/5.88) with ESMTPS id 25885kkaE020259 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 8 Jun 2022 16:05:46 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36504.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.2308.27; Wed, 8 Jun 2022 16:05:46 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 8 Jun 2022 16:05:46 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::34e7:ab63:3da4:27c6]) by RTEXMBS04.realtek.com.tw ([fe80::34e7:ab63:3da4:27c6%5]) with mapi id 15.01.2308.021; Wed, 8 Jun 2022 16:05:46 +0800 From: Ping-Ke Shih To: Kalle Valo CC: Larry Finger , Nathan Chancellor , Johannes Berg , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH v3 4/4] rtw88: Fix Sparse warning for rtw8821c_hw_spec Thread-Topic: [PATCH v3 4/4] rtw88: Fix Sparse warning for rtw8821c_hw_spec Thread-Index: AQHYb4QquNlgqX2VSESbLHcGkKULkq1D3fwAgAAnIgCAALd/MP//hVkAgACHK4CAAG9Eq4AAAM7w Date: Wed, 8 Jun 2022 08:05:46 +0000 Message-ID: <5c48cda63e844e3f9703506309854a63@realtek.com> References: <20220524153716.20450-1-Larry.Finger@lwfinger.net> <45a6b6ea84c74ffeafff1b68c2e1c5e3@realtek.com> <764fc8f115dc411e82938311273d9b51@realtek.com> <87bkv3r43b.fsf@kernel.org> In-Reply-To: <87bkv3r43b.fsf@kernel.org> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXDAG02.realtek.com.tw, 9 x-kse-attachmentfiltering-interceptor-info: no applicable attachment filtering rules found x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2022/6/8_=3F=3F_06:01:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-ServerInfo: RTEXH36504.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Kalle Valo > Sent: Wednesday, June 8, 2022 3:45 PM > To: Ping-Ke Shih > Cc: Larry Finger ; Nathan Chancellor ; Johannes Berg > ; linux-wireless@vger.kernel.org > Subject: Re: [PATCH v3 4/4] rtw88: Fix Sparse warning for rtw8821c_hw_spec > > Ping-Ke Shih writes: > > > > > The ch_param[3] is only used by 8821c, so it doesn't affect other devices. > > I will prepare a patch to fix it. > > But why didn't the compiler catch this? Is there some evil cast > somewhere which removes the const? We should fix that as well (in a > separate patch). > This is because we assign a const to .driver_data that is non-const kernel_ulong_t: static const struct pci_device_id rtw_8821ce_id_table[] = { { .driver_data = (kernel_ulong_t)&rtw8821c_hw_spec }, When casting it back in pci_probe(), we need to add 'const' after Larry's patches: rtwdev->chip = (struct rtw_chip_info *)id->driver_data; I will prepare another patch to fix that. Ping-Ke