Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2343036rdh; Tue, 26 Sep 2023 22:41:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGb04INK333p8iGHoy0k7go2CV11SeGLeAHCaOTkSLdpHrBm2Ou3llPRWJOHfD/rWGP3cXe X-Received: by 2002:a9d:7dd1:0:b0:6b9:a192:aaf3 with SMTP id k17-20020a9d7dd1000000b006b9a192aaf3mr1212678otn.17.1695793292344; Tue, 26 Sep 2023 22:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695793292; cv=none; d=google.com; s=arc-20160816; b=lAP8n/kUqeGeuIRmAvfMpilyQ39SQwJJT+K0DcRguaeAXoOOgJjWDSXDERCM8kJMz+ Bj0t/j9ot5u1a+o4ojvIB2gh8JpvzNt0c62xDsmsPuacWCcF1XxIDDqkzlU9hqFEtXwi aJmpvu/k/wKTQpaBoGsuHe5kSRgAZjeiRxl6MSlmlsi+4Ruyg4d3WkjQKt0GAYunOovC ZYGPxYFSKfOLtxo+b5vLp8+jrXI947qUuh/eHgmW5SLkD+nNPADtKyJhKwG6S1Rs0b5z IhGfYCN755nWXIH6FoILJVln0pXwKIhqwW/nMt7dtfLZz8FNxRJC+tE8TLFvVV+cK6Db no+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=QTZ2vFeWOoL1QOl9HT6GDUPtC4hI0Gz0vgGQ0/fooCc=; fh=rT+wgTT1xt/kdN2zITX1rWh4K7qfLSo9U1szLFovOeQ=; b=mmsCKddzc6Hx7ZtebMh08yz7BWpyVZSIL5jgIU14vZZCpIC/6eI+96zmuAC8uZwaT9 iOQEVl+yxQL4QSdNp6pSQu6EVyY0691t44nDZisL6oK/MKFiXvp4C3u5btLlffcop9Jo xg8+rcvmKPehymOV+wqQ6qT2WIYJdYz8RGywf7ONpELLuBFTvORs9IAQcnmsh/0TjISl +bceYDgU5TK2ipi5IV5ys3vBEV1fhKNYZwnhGRKY9eIe9oSQhAcGfvQDGXjbS5Cl5w4j QvelFY3qDliQatuEM3iKK1BQGRbWZysGYHh86NTGISM0aFIAAjTOcz536Cn3+PAPoix9 JGxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AK2QOuvc; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id h70-20020a638349000000b00573f885c4edsi14326391pge.368.2023.09.26.22.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 22:41:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AK2QOuvc; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id E6DB0824BAE0; Tue, 26 Sep 2023 22:19:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229504AbjI0FTs (ORCPT + 56 others); Wed, 27 Sep 2023 01:19:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbjI0FTC (ORCPT ); Wed, 27 Sep 2023 01:19:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D7255FD4 for ; Tue, 26 Sep 2023 22:10:02 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBEFAC433C8; Wed, 27 Sep 2023 05:10:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695791401; bh=3pSV5XDCtO13XD805MCW3In/6s76oMfmdYsUpvAdOyM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=AK2QOuvcVVw+pxKtJ84KNEyQO4DNRx4GB5YCYP06T8SLD2mf6jjJ4IQfeaMMb/J5f X6vUeOiVGJoajSD1nVB6aO6APV9I5yQlWclpG3CyEmYPMQVIklnBExfb/EEnnjCVoY ppCPTfkZn2q3ChU4DJJBACwNqLM4JWQQte7zKpCJxV0CItSS7fV9+zAk4ynrgPLBtI muiRGpMOd3isP2+Tnw+22Mo/FXyhH7w3Po+qTer4lUPr5G5ZN5WEPZ5hDSBI9hIKfu AOK7/1Zp6iaADKdoLNhq/OrhpGu3t5Xcjlsyu00DVN4T7zBCaBIa/puN1kyOttAQYn 6Nm70KrZvwI7Q== From: Kalle Valo To: Jeff Johnson Cc: , Subject: Re: [PATCH v2] wifi: ath11k: mac: fix struct ieee80211_sband_iftype_data handling References: <20230926163350.2641064-1-kvalo@kernel.org> <70a75205-8f27-4e73-9d32-d92b6f7bec68@quicinc.com> Date: Wed, 27 Sep 2023 08:12:04 +0300 In-Reply-To: <70a75205-8f27-4e73-9d32-d92b6f7bec68@quicinc.com> (Jeff Johnson's message of "Tue, 26 Sep 2023 13:55:16 -0700") Message-ID: <874jjgjj2z.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 26 Sep 2023 22:19:53 -0700 (PDT) Jeff Johnson writes: > On 9/26/2023 9:33 AM, Kalle Valo wrote: >> From: Kalle Valo >> Commit e8c1841278a7 ("wifi: cfg80211: annotate iftype_data pointer >> with >> sparse") added sparse checks for struct ieee80211_sband_iftype_data handling >> which immediately found an issue in ath11k: >> drivers/net/wireless/ath/ath11k/mac.c:7952:22: warning: incorrect >> type in argument 1 (different address spaces) >> drivers/net/wireless/ath/ath11k/mac.c:7952:22: expected struct ieee80211_sta_he_cap const *he_cap >> drivers/net/wireless/ath/ath11k/mac.c:7952:22: got struct ieee80211_sta_he_cap const [noderef] __iftype_data * >> The problem here is that we are accessing sband->iftype_data >> directly even >> though we should use for_each_sband_iftype_data() or similar. Fortunately >> there's ieee80211_get_he_iftype_cap_vif() which is just we need here so use it > > nit: just *what* we need I'll add that, thanks. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches