From patchwork Tue Jun 18 04:41:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 11000885 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 2239476 for ; Tue, 18 Jun 2019 04:41:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12955289FF for ; Tue, 18 Jun 2019 04:41:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06BE728A00; Tue, 18 Jun 2019 04:41:48 +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 22A7828A01 for ; Tue, 18 Jun 2019 04:41:47 +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=aLLMTnf3E1oNoOmooIy4/qIq0GHzUdozRn5WCfl6fMA=; b=Rcvg7xCgmqTKRl s7fnt+8+w02EQQoDtCZ2eXowrvOd1+oLrdEWxH82YOW/SlVpEPbrf28fb7w0cmnDXb07lisjRAkIQ z0AkZiKbQeCEqvzPfUlFOEQF2A7WdnLFkZMGS6Nj33sOeNJAto+YkpcRV8YqlliCrSoKGc2bseqLW Zx1n6LDqFNnZVRO7kAwvAfDkAECE5PE+naBpicfwkrmOcBqcBFxJjjsm5ZHgOf9FS7gm7MgFmanel yHGIsEvYHZsOf0Zjgl6hWz8mORZFjQbAyGPyvQ8z2+wm4vRp9xctrZuV2i5gd9D2DKKJMgWCwKGsf IGE4sTyxF5U7+TPnvRVg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hd5wH-0007Cy-Te; Tue, 18 Jun 2019 04:41:46 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hd5wE-0007B7-TJ for ath11k@lists.infradead.org; Tue, 18 Jun 2019 04:41:44 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A129F60770; Tue, 18 Jun 2019 04:41:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1560832902; bh=U+CDqB60t7sABG8co2NVlwcTVtcvaoqE4ghjGBOISRk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZV3Gp74fkEPPsjnZs29EPBvBbcDaJ5hkVsBlMit6o8gBC4Yn6u4izpBExz/dJlGOE U3+M2rzwSbSYlNShQl4PxbEG9IzEZfa5ep11hozZ5W+s0ilaOTw7S9KCFmPWLPOm9+ 6g1Cf9ZrwfbrU/ZNJgiH+94lSjSX9P5JeCji+Uro= 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 C558A602FE for ; Tue, 18 Jun 2019 04:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1560832902; bh=U+CDqB60t7sABG8co2NVlwcTVtcvaoqE4ghjGBOISRk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZV3Gp74fkEPPsjnZs29EPBvBbcDaJ5hkVsBlMit6o8gBC4Yn6u4izpBExz/dJlGOE U3+M2rzwSbSYlNShQl4PxbEG9IzEZfa5ep11hozZ5W+s0ilaOTw7S9KCFmPWLPOm9+ 6g1Cf9ZrwfbrU/ZNJgiH+94lSjSX9P5JeCji+Uro= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C558A602FE 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/5] ath11k: Clean up link_desc_addr buffer typecast Date: Tue, 18 Jun 2019 10:11:28 +0530 Message-Id: <1560832889-14129-4-git-send-email-vthiagar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1560832889-14129-1-git-send-email-vthiagar@codeaurora.org> References: <1560832889-14129-1-git-send-email-vthiagar@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190617_214142_974847_0018B33F X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 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 It is not necessary to typecast scatter_buf while calling ath11k_hal_set_link_desc_addr(). Few more trivial clean ups related to scatter_buf typecast. Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath11k/dp.c | 11 +++-------- drivers/net/wireless/ath/ath11k/hal.c | 2 +- drivers/net/wireless/ath/ath11k/hal.h | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c index 815a343..e565638 100644 --- a/drivers/net/wireless/ath/ath11k/dp.c +++ b/drivers/net/wireless/ath/ath11k/dp.c @@ -372,9 +372,7 @@ static int ath11k_dp_scatter_idle_link_desc_setup(struct ath11k_base *ab, HAL_LINK_DESC_SIZE; paddr = link_desc_banks[i].paddr; while (n_entries) { - ath11k_hal_set_link_desc_addr( - (struct buffer_addr *)scatter_buf, i, - paddr); + ath11k_hal_set_link_desc_addr(scatter_buf, i, paddr); n_entries--; paddr += HAL_LINK_DESC_SIZE; if (rem_entries) { @@ -391,8 +389,7 @@ static int ath11k_dp_scatter_idle_link_desc_setup(struct ath11k_base *ab, } ath11k_hal_setup_link_idle_list(ab, slist, num_scatter_buf, - n_link_desc, - (u8 *)scatter_buf - + n_link_desc, (u8 *)scatter_buf - (u8 *)slist[scatter_idx].vaddr); return 0; @@ -576,9 +573,7 @@ int ath11k_dp_link_desc_setup(struct ath11k_base *ab, paddr = link_desc_banks[i].paddr; while (n_entries && (desc = ath11k_hal_srng_src_get_next_entry(ab, srng))) { - ath11k_hal_set_link_desc_addr( - (struct buffer_addr *)desc, i, - paddr); + ath11k_hal_set_link_desc_addr(desc, i, paddr); n_entries--; paddr += HAL_LINK_DESC_SIZE; } diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c index b7b9b9c..6c8e37f 100644 --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c @@ -689,7 +689,7 @@ u32 ath11k_hal_ce_dst_status_get_length(void *buf) return len; } -void ath11k_hal_set_link_desc_addr(void *buf, u32 cookie, dma_addr_t paddr) +void ath11k_hal_set_link_desc_addr(u32 *buf, u32 cookie, dma_addr_t paddr) { struct buffer_addr *desc = (struct buffer_addr *)buf; diff --git a/drivers/net/wireless/ath/ath11k/hal.h b/drivers/net/wireless/ath/ath11k/hal.h index 6649dd2..f1b4157 100644 --- a/drivers/net/wireless/ath/ath11k/hal.h +++ b/drivers/net/wireless/ath/ath11k/hal.h @@ -875,7 +875,7 @@ dma_addr_t ath11k_hal_srng_get_tp_addr(struct ath11k_base *ab, struct hal_srng *srng); dma_addr_t ath11k_hal_srng_get_hp_addr(struct ath11k_base *ab, struct hal_srng *srng); -void ath11k_hal_set_link_desc_addr(void *buf, u32 cookie, dma_addr_t paddr); +void ath11k_hal_set_link_desc_addr(u32 *buf, u32 cookie, dma_addr_t paddr); u32 ath11k_hal_ce_get_desc_size(enum hal_ce_desc type); void ath11k_hal_ce_src_set_desc(void *buf, dma_addr_t paddr, u32 len, u32 id, u8 byte_swap_data);