Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2253424iof; Wed, 8 Jun 2022 00:34:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBsiaGEBYjN1YxIDKmW6XAdtstOYxS2fX+uP/xB1v7JpmVG+bDqRhGRybsJvrHGhDiQeId X-Received: by 2002:a05:6a00:84b:b0:51c:21e3:b542 with SMTP id q11-20020a056a00084b00b0051c21e3b542mr12983386pfk.31.1654673670951; Wed, 08 Jun 2022 00:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654673670; cv=none; d=google.com; s=arc-20160816; b=jquTj9uYCMS5eOQvvRLMs0CS+riyGRyR0yUAP879AYkQOmjf75T8bwOtqnpO6bign3 Otk8jtL7CmKmnjJeE7yM/tDcNhyq0H0aq2TmosM7vNeURV57+QhCw5zZ1nOEeEuWJwjV BAahHsAYYqDLkalOZDBgnoUO19mD7PgjDHaLxIytxagsk9mCMhKsSIc1bUEM71KicQlj eSj5r2+pucjM/jAz3E2NMiQM7LodioT8SW2J0RM4bfycmgAml8AW2S4zgkSOA7nIktyG Vfel5IVpgYj3dwY/ZJpb1+wwc/xoqEqgnKT94U3OzZ+VLLKd9i59VQG9BJwrfmAXOSrW gOBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=7xE5uLkT//96EF3wJ5+yMU2MvyoX0Nb5hjXmGn0XY6U=; b=CBJNhlpDr4Fg1E5jwBj/QRA2HAFg5l5nacbd0hVdL/WGWwh9FWmJlkiLZXk/P+3i8x Mj0eRc16llDLG2cdEDbzhDwmfbQNbf2IKCv4Pgeayyv9f0AFkKLWc4UZs48Z4Tt/SUBQ q+9WGIHB8gia8vnh91L8u9AKR9o6la4008au63XrinGHZ2/a+h5kOYtVw4XepRYcXQPo II436/f/BjtY8k9shMBVuhMq4qCQLRnPu3f/yu1GZ2SLmIGeFOaJfdVgsPJ323vMdmf+ ybWTOrWBYxcNYOpnvwPXNDBsbbHXy0dmjqJb7YWmERGrceAi2aoi6RfomMC5CdZVRP78 rNIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MdR2LSaG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u8-20020a634708000000b003f61070e884si27127516pga.628.2022.06.08.00.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 00:34:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MdR2LSaG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 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 2D32022A601; Wed, 8 Jun 2022 00:06:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbiFHEqr (ORCPT + 67 others); Wed, 8 Jun 2022 00:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbiFHEp4 (ORCPT ); Wed, 8 Jun 2022 00:45:56 -0400 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C06623C65A for ; Tue, 7 Jun 2022 18:03:48 -0700 (PDT) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-f2a4c51c45so25376404fac.9 for ; Tue, 07 Jun 2022 18:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=7xE5uLkT//96EF3wJ5+yMU2MvyoX0Nb5hjXmGn0XY6U=; b=MdR2LSaGaZAXlxOy0gAfkyDFeIDWxNQJRT44FnG8fiCycUwE1BnC3ElPMoM8HcDnmU yMNI7o6eb4WhDzGBLYiuNFVIKkQBMMxansx8QFCAUBJzJKEXS9Y4YIaF1Im7b9FpFQHa qHWi5ATQ4gTxW/j+QXYLF8JI5EBPVbDHRK3Uj4/Flm7DfdXVg26REJcR9s5x64k9XcHl +ozCTuuQpaucjB0lMd8qgRtYr4Qf0I2NWy+HoLRBiI/gXe1BK0x8cFQD1SfYuwQKEngG vHd1YzWMbrU++SxTblAmfx9CuUyGjaiNnzKMbhWihaHn1uNxtLYEUxRZkMAOeCQJe3+8 GgSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=7xE5uLkT//96EF3wJ5+yMU2MvyoX0Nb5hjXmGn0XY6U=; b=YRhkj5OJoagcjTTWLWhQn3/5y+6G8R4dvoUZHof3burWSX05XwcwYXfrAfKdj65+GD sSFSFYJMLQsAYSsAJ4YoVMzMr+/kbF8MEi1SYRB4WV1RL+AfUS1IKPm1d8k8/y3WqC/A RBbYz3MnWh1jnBxcIwxrfwU/lpf1uq49IIIZ0t2FVINvvTs65JZxjpXnPUH/FGjOlFv4 4MvisOBGSftDhtvfnThUvU/yt4XOwGQ8jmUnf1fHUbw/1QtpaBx1Ahhp4sGPCW/gk69P h0h1dnZDiU/I/FjtSjXxvv68z4dIpUDtk3hJ/2S4jMLS/BJEIE5doiyL1mzk4o1iCWjs DJSA== X-Gm-Message-State: AOAM5332mCeEU0KgUXED+bzkwjqCS1kbMmEntFBarD0Xd+R0m7OyI78l DwJ+MiTlc+7DGeDCrapIpYk= X-Received: by 2002:a05:6870:f698:b0:f2:cbde:a121 with SMTP id el24-20020a056870f69800b000f2cbdea121mr1003984oab.149.1654650206496; Tue, 07 Jun 2022 18:03:26 -0700 (PDT) Received: from ?IPV6:2603:8090:2005:39b3::100e? (2603-8090-2005-39b3-0000-0000-0000-100e.res6.spectrum.com. [2603:8090:2005:39b3::100e]) by smtp.gmail.com with ESMTPSA id l14-20020a0568302b0e00b0060b66e2eaaesm10119282otv.38.2022.06.07.18.03.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jun 2022 18:03:25 -0700 (PDT) Sender: Larry Finger Message-ID: Date: Tue, 7 Jun 2022 20:03:24 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v3 4/4] rtw88: Fix Sparse warning for rtw8821c_hw_spec Content-Language: en-US To: Ping-Ke Shih , Nathan Chancellor Cc: Kalle Valo , Johannes Berg , "linux-wireless@vger.kernel.org" References: <20220524153716.20450-1-Larry.Finger@lwfinger.net> <45a6b6ea84c74ffeafff1b68c2e1c5e3@realtek.com> From: Larry Finger In-Reply-To: <45a6b6ea84c74ffeafff1b68c2e1c5e3@realtek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 6/7/22 19:25, Ping-Ke Shih wrote: > >> -----Original Message----- >> From: Larry Finger On Behalf Of Larry Finger >> Sent: Wednesday, June 8, 2022 5:26 AM >> To: Nathan Chancellor >> Cc: Kalle Valo ; Johannes Berg ; >> linux-wireless@vger.kernel.org; Ping-Ke Shih >> Subject: Re: [PATCH v3 4/4] rtw88: Fix Sparse warning for rtw8821c_hw_spec >> >> On 6/7/22 14:05, Nathan Chancellor wrote: >>> Hi Larry, >>> >>> On Tue, May 24, 2022 at 10:37:16AM -0500, Larry Finger wrote: >>>> Sparse lists the following: >>>> >>>> CHECK drivers/net/wireless/realtek/rtw88/rtw8821c.c >>>> drivers/net/wireless/realtek/rtw88/rtw8821c.c:1880:22: warning: symbol 'rtw8821c_hw_spec' was not >> declared. Should it be static? >>>> >>>> The warning arises because the external declaration for rtw8821c_hw_spec >>>> occurs in rtw8821ce.h, which is not included in rtw8821c.h. That line is >>>> moved, and the now empty file rtw8821ce.h is deleted. >>>> >>>> Symbol 'rtw8821c_hw_spec' can be made constant. >>>> >>>> Signed-off-by: Larry Finger >>> >>> I bisected this change as commit 89d8f53ff6e7 ("wifi: rtw88: Fix Sparse >>> warning for rtw8821c_hw_spec") in linux-next as the cause of one of my >>> test machines failing to boot with the following stacktrace: >>> >>> BUG: unable to handle page fault for address: ffffffffc09f52f4 >>> #PF: supervisor write access in kernel mode >> >> Nathan, >> >> Thanks for your excellent report. Does the attached patch fix your issue? >> > > Hi Larry, > > How about keeping rtw8821c_hw_spec const, but move ch_param[3] from > 'struct rtw_chip_info' to 'struct rtw_hal'? > > If you agree this, I can prepare a patch. > If that fixes the crashes, that is fine with me. The other 3 devices will need the same fix. Larry