From patchwork Tue May 28 05:48:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 10963713 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A979E15E6 for ; Tue, 28 May 2019 05:48:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 989F0286BC for ; Tue, 28 May 2019 05:48:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CB50286BF; Tue, 28 May 2019 05:48:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 262FC286BD for ; Tue, 28 May 2019 05:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yg167FAlvk9bD+xugZO+Pr9T00XFZe1LKeeBEZ6kUG0=; b=kwa7Ei+P5wQv5g +mcgDqCtNyogvLFQAfTl6c8/w9e5liqHHFlGSeuoF8ICjgeSTEOlncx1PABwphSqJU3E5Cw9AGDoj UKJwVYqL/UQg9e+p4vzunlCKrSkiChdWvWjfa5Qs63eu96d54QC/qGgH6b9BdI9+TqWCapC+9nhWq /M3OyTBDtYGCP5On6C/cKZosa6LDlqU22M0xnH9x3UBj0oOmW7+lc5msR+Bwx6RlBJEU3Au6Wf7UQ VcfD50Byt34/uyqZiHHoG68uaJGN9zuSFGqSqVrEuJuxeXKqgGokNlGZWd73f6BTJR/jYEPzzIT3L 1p3IlA5NBYvQEvHFigkg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVUyL-0007Bt-R1; Tue, 28 May 2019 05:48:29 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVUyJ-0007AX-2d for ath11k@lists.infradead.org; Tue, 28 May 2019 05:48:28 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6A5EE607C3; Tue, 28 May 2019 05:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559022505; bh=MceRDbahM1MBZZnmB6sxD+GmTbpmCt9R8inXYch8PMc=; h=From:To:Subject:Date:From; b=hfLgQdI6f9JPwrD0j1tei7CnErZp8DTk6p9cik8ifXAdxPhomUEOZH1mtAlxO18Vq iMnP79d/uvzniWosOFkv7OIk2QZaVo2yruc86Ou9ZRRruaD8vSW/LkCcNdWwNP+8cF RJ7ytm4FrIqe8XEz9uzY5GiqSVH2JbFysk8SDOAc= Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7CF1260795 for ; Tue, 28 May 2019 05:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559022505; bh=MceRDbahM1MBZZnmB6sxD+GmTbpmCt9R8inXYch8PMc=; h=From:To:Subject:Date:From; b=hfLgQdI6f9JPwrD0j1tei7CnErZp8DTk6p9cik8ifXAdxPhomUEOZH1mtAlxO18Vq iMnP79d/uvzniWosOFkv7OIk2QZaVo2yruc86Ou9ZRRruaD8vSW/LkCcNdWwNP+8cF RJ7ytm4FrIqe8XEz9uzY5GiqSVH2JbFysk8SDOAc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7CF1260795 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH 1/4] ath11k: Fix endianness related sparse warnings Date: Tue, 28 May 2019 11:18:03 +0530 Message-Id: <1559022486-7073-1-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190527_224827_152737_1407D1C2 X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/net/wireless/ath/ath11k/hal_rx.c:1142:27: warning: cast to restricted __le32 drivers/net/wireless/ath/ath11k/hal_rx.c:1142:27: warning: cast to restricted __le32 drivers/net/wireless/ath/ath11k/dp_rx.c:3433:16: warning: Using plain integer as NULL pointer drivers/net/wireless/ath/ath11k/dp_rx.h:335:19: warning: cast to restricted __le32 drivers/net/wireless/ath/ath11k/dp_rx.h:335:19: warning: restricted __le32 degrades to integer drivers/net/wireless/ath/ath11k/dp_rx.h:335:19: warning: restricted __le32 degrades to integer drivers/net/wireless/ath/ath11k/dp_rx.h:344:35: warning: incorrect type in return expression (different base types) drivers/net/wireless/ath/ath11k/dp_rx.h:344:35: expected unsigned int drivers/net/wireless/ath/ath11k/dp_rx.h:344:35: got restricted __le16 [usertype] phy_ppdu_id drivers/net/wireless/ath/ath11k/dp_rx.h:306:16: warning: cast to restricted __le32 drivers/net/wireless/ath/ath11k/dp_rx.h:306:16: warning: restricted __le32 degrades to integer drivers/net/wireless/ath/ath11k/dp_rx.h:306:16: warning: restricted __le32 degrades to integer drivers/net/wireless/ath/ath11k/dp_rx.h:316:16: warning: cast to restricted __le32 drivers/net/wireless/ath/ath11k/dp_rx.h:316:16: warning: restricted __le32 degrades to integer drivers/net/wireless/ath/ath11k/dp_rx.h:316:16: warning: restricted __le32 degrades to integer Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/dp_rx.h | 10 ++++++---- drivers/net/wireless/ath/ath11k/hal_rx.h | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.h b/drivers/net/wireless/ath/ath11k/dp_rx.h index 5fe6e6d..75d9150 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.h +++ b/drivers/net/wireless/ath/ath11k/dp_rx.h @@ -303,7 +303,8 @@ static inline u32 ath11k_dp_rxdesc_get_mpdulen_err(void *hw_desc_addr) rx_attn = &rx_desc->attention; - return FIELD_GET(RX_ATTENTION_INFO1_MPDU_LEN_ERR, rx_attn->info1); + return FIELD_GET(RX_ATTENTION_INFO1_MPDU_LEN_ERR, + __le32_to_cpu(rx_attn->info1)); } static inline u32 ath11k_dp_rxdesc_get_decap_format(void *hw_desc_addr) @@ -314,7 +315,7 @@ static inline u32 ath11k_dp_rxdesc_get_decap_format(void *hw_desc_addr) rx_msdu_start = &rx_desc->msdu_start; return FIELD_GET(RX_MSDU_START_INFO2_DECAP_FORMAT, - rx_msdu_start->info2); + __le32_to_cpu(rx_msdu_start->info2)); } static inline u8 *ath11k_dp_rxdesc_get_80211hdr(void *hw_desc_addr) @@ -332,7 +333,8 @@ static inline bool ath11k_dp_rxdesc_mpdu_valid(void *hw_desc_addr) struct hal_rx_desc *rx_desc = (struct hal_rx_desc *)hw_desc_addr; u32 tlv_tag; - tlv_tag = FIELD_GET(HAL_TLV_HDR_TAG, rx_desc->mpdu_start_tag); + tlv_tag = FIELD_GET(HAL_TLV_HDR_TAG, + __le32_to_cpu(rx_desc->mpdu_start_tag)); return tlv_tag == HAL_RX_MPDU_START ? true : false; } @@ -341,7 +343,7 @@ static inline u32 ath11k_dp_rxdesc_get_ppduid(void *hw_desc_addr) { struct hal_rx_desc *rx_desc = (struct hal_rx_desc *)hw_desc_addr; - return rx_desc->mpdu_start.phy_ppdu_id; + return __le16_to_cpu(rx_desc->mpdu_start.phy_ppdu_id); } int ath11k_dp_rx_ampdu_start(struct ath11k *ar, diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.h b/drivers/net/wireless/ath/ath11k/hal_rx.h index 439a36f..650ebe5 100644 --- a/drivers/net/wireless/ath/ath11k/hal_rx.h +++ b/drivers/net/wireless/ath/ath11k/hal_rx.h @@ -270,9 +270,9 @@ struct hal_rx_phyrx_rssi_legacy_info { #define HAL_RX_MPDU_INFO_INFO0_PEERID GENMASK(31, 16) struct hal_rx_mpdu_info { - u32 rsvd0; - u32 info0; - u32 rsvd1[21]; + __le32 rsvd0; + __le32 info0; + __le32 rsvd1[21]; } __packed; struct hal_rx_rxpcu_classification_overview { From patchwork Tue May 28 05:48:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 10963711 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4BA2B6C5 for ; Tue, 28 May 2019 05:48:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 396A5286BC for ; Tue, 28 May 2019 05:48:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BC7F286CC; Tue, 28 May 2019 05:48:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D4E35286BC for ; Tue, 28 May 2019 05:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qFCsy/q6t1YojurBwJ5/mG0iq+tTNCGT7Qj5+hZC+uE=; b=b+yzt3UG4wKFCa 96wuHHZShOZQMpfz+aWb5RcQPYPsmwdbhhP/E1xwLk4TaamEYL0oXEWrLjx78dYcnIFj5xWkkHZ3F CQYjyHlXSHFZ1MYQuI+ZXpt85rik3A9efGxQ8CkYrXOdLCDCpVu+kpmQmTODO0uFwByVMTeWJuUOD woMz8rLnCunWHzu9poAEEYBvVXkOQ/1/DQP0zkbUB6Sn2Vm11fx1oa9KaucQDQqSNmtoB6gwZ4xnq F2dwO0MolmfbXXLYOU6F38CzHXj2SsSOYtsRcJDLSMjvvvyDQkxJ54zNxCiBLBo8etza3sgHa656T DN/7iIxH+c6/8/E+NZRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVUyL-0007Bm-Ld; Tue, 28 May 2019 05:48:29 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVUyJ-0007Aa-6a for ath11k@lists.infradead.org; Tue, 28 May 2019 05:48:28 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 97DD5607CA; Tue, 28 May 2019 05:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559022506; bh=g4E4UgIscyFaV3kfn0hQ1stDiRVOLpEZQ0cIVx0yJXA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Op3Ye4TaH9/Ywu20mPRoin5fzYY3n1etuT/0m2xvJf3FrJ3H6bT2OssSbyy368nWw 3KXjIVYAp+1KGTdk/TFD/gaoWPTpcc34DiCtqJMvlXZxiNmqRfkTA+VTmcWtA8PIBd 9bhvsaGoe40ky2R3lwf3W+uVvf99ZkZjq4p2geT0= Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8C3E060712 for ; Tue, 28 May 2019 05:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559022506; bh=g4E4UgIscyFaV3kfn0hQ1stDiRVOLpEZQ0cIVx0yJXA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Op3Ye4TaH9/Ywu20mPRoin5fzYY3n1etuT/0m2xvJf3FrJ3H6bT2OssSbyy368nWw 3KXjIVYAp+1KGTdk/TFD/gaoWPTpcc34DiCtqJMvlXZxiNmqRfkTA+VTmcWtA8PIBd 9bhvsaGoe40ky2R3lwf3W+uVvf99ZkZjq4p2geT0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8C3E060712 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH 2/4] ath11k: Fix sparse warnings for symbol not being static Date: Tue, 28 May 2019 11:18:04 +0530 Message-Id: <1559022486-7073-2-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559022486-7073-1-git-send-email-vthiagar@codeaurora.org> References: <1559022486-7073-1-git-send-email-vthiagar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190527_224827_257135_22BC474D X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/net/wireless/ath/ath11k/wmi.c:183:12: warning: symbol 'ath11k_wmi_tlv_parse_alloc' was not declared. Should it be static? drivers/net/wireless/ath/ath11k/qmi.c:505:22: warning: symbol 'qmi_wlanfw_ind_register_resp_msg_v01_ei' was not declared. Should it be static? Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/qmi.c | 2 +- drivers/net/wireless/ath/ath11k/wmi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index ecf09b8..4f3e25b 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -502,7 +502,7 @@ }, }; -struct qmi_elem_info qmi_wlanfw_ind_register_resp_msg_v01_ei[] = { +static struct qmi_elem_info qmi_wlanfw_ind_register_resp_msg_v01_ei[] = { { .data_type = QMI_STRUCT, .elem_len = 1, diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index 9ca44c4..50e6e31 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -180,7 +180,7 @@ static int ath11k_wmi_tlv_parse(struct ath11k_base *ar, const void **tb, (void *)tb); } -const void ** +static const void ** ath11k_wmi_tlv_parse_alloc(struct ath11k_base *ab, const void *ptr, size_t len, gfp_t gfp) { From patchwork Tue May 28 05:48:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 10963715 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E50318EC for ; Tue, 28 May 2019 05:48:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D747286BC for ; Tue, 28 May 2019 05:48:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02067286BF; Tue, 28 May 2019 05:48:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AEFA4286BC for ; Tue, 28 May 2019 05:48:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BbItcd8Y/B9ZMa8VAFvP/lUBABYFcBDIhHzt58FDlUI=; b=MUeWnNEvxJKhuf +25OzbB3vKTJPoY1wO+W36/PMRSxoN+OcqjoMYvTrvYPWGby8hTpx0TbVBGbUOwMnPJssSu6aAn3+ 7B6kEaZL+6D5bc5EpD7JnRwzOWIu8hy7BS0Fb4ioSlalv8U0JfnbGlKXEZrPTB7do92REeyhpYPVO mReGFWRuO+GFxTpdU70J55O/DvUZL5paTRVtjdd5hT8K38l+U3LQS5IdDOk179G4slYASQtbXDELl /cePgKOQiThiYhYah5l1TU6qNdXJIgU5TjaHZgqlEABWYehARXyl2KISds/M6yfKci8zwT/8iCG3j gjcglFUptEWAxCM202fA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVUyN-0007Cf-00; Tue, 28 May 2019 05:48:31 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVUyK-0007B2-5f for ath11k@lists.infradead.org; Tue, 28 May 2019 05:48:29 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E0FFC609CD; Tue, 28 May 2019 05:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559022507; bh=qyyZWYdgoLNxfwxe4pwjnWZX0GbuJ9JwDJnlxVSoqos=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kRZcoSIxPJzW8K2ee66Un+59ziX/VSgfXBeqTP2EkKBWcJ46vSwJs1JxEtZuLBnxi 8qjjZoZ8kMKrU1wuATjp+QZDUefRMHleWYU/ZsTDM/pQH/C4LBs7EAMdMaklsLba8i eurEnH8wWbYFvakMTM7Rnttz0loKSRtVzj3aXTNo= Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D6A53606FC for ; Tue, 28 May 2019 05:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559022507; bh=qyyZWYdgoLNxfwxe4pwjnWZX0GbuJ9JwDJnlxVSoqos=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kRZcoSIxPJzW8K2ee66Un+59ziX/VSgfXBeqTP2EkKBWcJ46vSwJs1JxEtZuLBnxi 8qjjZoZ8kMKrU1wuATjp+QZDUefRMHleWYU/ZsTDM/pQH/C4LBs7EAMdMaklsLba8i eurEnH8wWbYFvakMTM7Rnttz0loKSRtVzj3aXTNo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D6A53606FC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH 3/4] ath11k: Fix bug in accessing rcu protected wiphy->regd Date: Tue, 28 May 2019 11:18:05 +0530 Message-Id: <1559022486-7073-3-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559022486-7073-1-git-send-email-vthiagar@codeaurora.org> References: <1559022486-7073-1-git-send-email-vthiagar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190527_224828_224635_4211620F X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Access wiphy->regd through rcu dereference API. This also fixes below sparse warning drivers/net/wireless/ath/ath11k/reg.c:38:39: warning: incorrect type in argument 1 (different address spaces) drivers/net/wireless/ath/ath11k/reg.c:38:39: expected void const * drivers/net/wireless/ath/ath11k/reg.c:38:39: got char const [noderef] * Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/reg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c index 1fef688..ad87e9d 100644 --- a/drivers/net/wireless/ath/ath11k/reg.c +++ b/drivers/net/wireless/ath/ath11k/reg.c @@ -28,14 +28,17 @@ static bool ath11k_regdom_changes(struct ath11k *ar, char *alpha2) { + const struct ieee80211_regdomain *regd; + + regd = rcu_dereference_rtnl(ar->hw->wiphy->regd); /* This can happen during wiphy registration where the previous * user request is received before we update the regd received * from firmware. */ - if (!ar->hw->wiphy->regd) + if (!regd) return true; - return !!(memcmp(ar->hw->wiphy->regd->alpha2, alpha2, 2)); + return !!(memcmp(regd->alpha2, alpha2, 2)); } static void From patchwork Tue May 28 05:48:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 10963717 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9867C6C5 for ; Tue, 28 May 2019 05:48:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B89D286BC for ; Tue, 28 May 2019 05:48:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FF6B286BF; Tue, 28 May 2019 05:48:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 10568286BD for ; Tue, 28 May 2019 05:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9U4SOLtPRvhsMsUmNSSgz19myRcLbuHtJTVoqphPQd8=; b=MUAoLznUfEN9+P F2/c5W641qGwNxhpSPKp9RATJUUUPPNGCJJgQOxF0gJILVEqk55VO95O6IK4jiwXWuNL9yuJU6+Qi Umglr4nWYZ2/7Wem3Z4peNNEF45NyZYbL/r94Tes645Rs51reR+HW0R/CLsGA04wYPj4VHM+3iXs7 438GJZOGYawvEpS3ca9AHH2v0YolAJNU/IdcbcpsuPf/ya7zMWABta6Em0i484phkrgnLPnD73ZBs TxaRXbB348FS1xauGcW3b7DbnV7WlnGZ97NNBB+y2xHMj8Fv+EvionplOkBtev0uDIGqM7SE5m7dv l2Qww6p2vCdYehFNFF6A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVUyP-0007Dj-5K; Tue, 28 May 2019 05:48:33 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVUyL-0007BV-AN for ath11k@lists.infradead.org; Tue, 28 May 2019 05:48:30 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1323E60A24; Tue, 28 May 2019 05:48:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559022509; bh=0wRJbN7tMZEF1jVPGXPEU3OayGbxJfDcL/VkiLUUGOU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DMqq3MxRTYqe/knUA+4BZNqmHicICXEy0OBJw6ICVkHN5KvGqaUu/5M3xC4CnqiTg H8VZotJoRPZLpoBtdV+4YpqHr3X16DtTJjWzxwlpw1/P55whkA89+PaWp/QP86wdX+ cWiTMqWMRNbfD/4RxFXv8R3EwSHWTtjkit6w+xcY= Received: from vasanth-lnx.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vthiagar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2C09360712 for ; Tue, 28 May 2019 05:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559022508; bh=0wRJbN7tMZEF1jVPGXPEU3OayGbxJfDcL/VkiLUUGOU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eCJU4UVlpJdqmz5xx8blFyzYoeOySLit/M2hI4EmNqbBUPKCAhf+BTd0j7Xop56o5 2ElV73oC2u4Dd6QuQxQKnli7yilx2QwUoUopxjOzHwUkLWrkr9/95vCjeGCvAkZaNf dKHzlCD2idKuMmSaPHigxiJdsCh3DIeTETlwLSyQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2C09360712 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vthiagar@codeaurora.org From: Vasanthakumar Thiagarajan To: ath11k@lists.infradead.org Subject: [PATCH 4/4] ath11k: Fix sparse warning using palin integer as NULL pointer Date: Tue, 28 May 2019 11:18:06 +0530 Message-Id: <1559022486-7073-4-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559022486-7073-1-git-send-email-vthiagar@codeaurora.org> References: <1559022486-7073-1-git-send-email-vthiagar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190527_224829_389368_29BC3CA6 X-CRM114-Status: GOOD ( 11.31 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/net/wireless/ath/ath11k/qmi.c:1806:41: warning: Using plain integer as NULL pointer drivers/net/wireless/ath/ath11k/dp_rx.c:3433:16: warning: Using plain integer as NULL pointer drivers/net/wireless/ath/ath11k/debug_htt_stats.c:815:59: warning: Using plain integer as NULL pointer Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/debug_htt_stats.c | 2 +- drivers/net/wireless/ath/ath11k/dp_rx.c | 5 +---- drivers/net/wireless/ath/ath11k/qmi.c | 4 +++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/debug_htt_stats.c b/drivers/net/wireless/ath/ath11k/debug_htt_stats.c index 876134a..ac217d9 100644 --- a/drivers/net/wireless/ath/ath11k/debug_htt_stats.c +++ b/drivers/net/wireless/ath/ath11k/debug_htt_stats.c @@ -812,7 +812,7 @@ static inline void htt_print_tx_peer_rate_stats_tlv(const u32 *tag_buf, u8 *data u32 len = stats_req->buf_len; u32 buf_len = ATH11K_HTT_STATS_BUF_SIZE; char str_buf[HTT_MAX_STRING_LEN] = {0}; - char *tx_gi[HTT_TX_PEER_STATS_NUM_GI_COUNTERS] = {0}; + char *tx_gi[HTT_TX_PEER_STATS_NUM_GI_COUNTERS]; u8 j; for (j = 0; j < HTT_TX_PEER_STATS_NUM_GI_COUNTERS; j++) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 73865ce..2987c0a 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -3411,7 +3411,7 @@ static inline void ath11k_dp_mon_get_buf_len(struct hal_rx_msdu_desc_info *info, struct ath11k_pdev_dp *dp = &ar->dp; struct ath11k_mon_data *pmon = (struct ath11k_mon_data *)&dp->mon_data; struct dp_rxdma_ring *rx_ring = &dp->rxdma_mon_buf_ring; - struct sk_buff *msdu, *last; + struct sk_buff *msdu = NULL, *last = NULL; struct hal_rx_msdu_list msdu_list; void *p_buf_addr_info, *p_last_buf_addr_info; void *rx_desc; @@ -3430,9 +3430,6 @@ static inline void ath11k_dp_mon_get_buf_len(struct hal_rx_msdu_desc_info *info, (struct hal_reo_entrance_ring *)ring_entry; int buf_id; - msdu = 0; - last = NULL; - ath11k_hal_rx_reo_ent_buf_paddr_get(ring_entry, &paddr, &sw_cookie, &p_last_buf_addr_info, &msdu_cnt); diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index 4f3e25b..89ee81d 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -1803,10 +1803,12 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab) struct device *dev = ab->dev; char filename[ATH11K_QMI_MAX_BDF_FILE_NAME_SIZE]; const struct firmware *fw_entry; - struct ath11k_board_data bd = { 0 }; + struct ath11k_board_data bd; u32 fw_size; int ret = 0; + memset(&bd, 0, sizeof(bd)); + switch (type) { case ATH11K_QMI_FILE_TYPE_BDF_GOLDEN: ret = ath11k_core_fetch_bdf(ab, &bd);