From patchwork Fri Mar 16 10:11:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 10286841 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.web.codeaurora.org (Postfix) with ESMTP id B6091601A0 for ; Fri, 16 Mar 2018 10:12:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A58DF28E0A for ; Fri, 16 Mar 2018 10:12:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A32828E0F; Fri, 16 Mar 2018 10:12:15 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6A0928E0A for ; Fri, 16 Mar 2018 10:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbeCPKMN (ORCPT ); Fri, 16 Mar 2018 06:12:13 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:46096 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbeCPKMJ (ORCPT ); Fri, 16 Mar 2018 06:12:09 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 7A74730C00F; Fri, 16 Mar 2018 03:11:35 -0700 (PDT) Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 1D53181EC4; Fri, 16 Mar 2018 03:11:35 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id 6598BB05207; Fri, 16 Mar 2018 11:11:32 +0100 (CET) From: Arend van Spriel To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Arend van Spriel Subject: [PATCH 10/12] brcmfmac: get rid of brcmf_fw_map_chip_to_name() Date: Fri, 16 Mar 2018 11:11:23 +0100 Message-Id: <1521195085-439-11-git-send-email-arend.vanspriel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1521195085-439-1-git-send-email-arend.vanspriel@broadcom.com> References: <1521195085-439-1-git-send-email-arend.vanspriel@broadcom.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function is no longer used so removing it. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- .../broadcom/brcm80211/brcmfmac/firmware.c | 53 ---------------------- .../broadcom/brcm80211/brcmfmac/firmware.h | 4 -- 2 files changed, 57 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c index 598cdb1..1ea9451 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c @@ -635,59 +635,6 @@ static void brcmf_fw_get_full_name(char fw_name[BRCMF_FW_NAME_LEN], strlcat(fw_name, extension, BRCMF_FW_NAME_LEN); } -int brcmf_fw_map_chip_to_name(u32 chip, u32 chiprev, - struct brcmf_firmware_mapping mapping_table[], - u32 table_size, char fw_name[BRCMF_FW_NAME_LEN], - char nvram_name[BRCMF_FW_NAME_LEN]) -{ - char chipname[12]; - u32 i; - char end; - - for (i = 0; i < table_size; i++) { - if (mapping_table[i].chipid == chip && - mapping_table[i].revmask & BIT(chiprev)) - break; - } - - if (i == table_size) { - brcmf_err("Unknown chipid %d [%d]\n", chip, chiprev); - return -ENODEV; - } - - brcmf_chip_name(chip, chiprev, chipname, sizeof(chipname)); - - /* check if firmware path is provided by module parameter */ - if (brcmf_mp_global.firmware_path[0] != '\0') { - if (fw_name) - strlcpy(fw_name, brcmf_mp_global.firmware_path, - BRCMF_FW_NAME_LEN); - if (nvram_name) - strlcpy(nvram_name, brcmf_mp_global.firmware_path, - BRCMF_FW_NAME_LEN); - - end = brcmf_mp_global.firmware_path[ - strlen(brcmf_mp_global.firmware_path) - 1]; - if (end != '/') { - if (fw_name) - strlcat(fw_name, "/", BRCMF_FW_NAME_LEN); - if (nvram_name) - strlcat(nvram_name, "/", BRCMF_FW_NAME_LEN); - } - } - - brcmf_info("using %s for chip %s\n", - mapping_table[i].fw_base, chipname); - if (fw_name) - brcmf_fw_get_full_name(fw_name, - mapping_table[i].fw_base, ".bin"); - if (nvram_name) - brcmf_fw_get_full_name(nvram_name, - mapping_table[i].fw_base, ".txt"); - - return 0; -} - struct brcmf_fw_request * brcmf_fw_alloc_request(u32 chip, u32 chiprev, struct brcmf_firmware_mapping mapping_table[], diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h index 1416fbb..79a2109 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h @@ -46,10 +46,6 @@ struct brcmf_firmware_mapping { #define BRCMF_FW_ENTRY(chipid, mask, name) \ { chipid, mask, BRCM_ ## name ## _FIRMWARE_BASENAME } -int brcmf_fw_map_chip_to_name(u32 chip, u32 chiprev, - struct brcmf_firmware_mapping mapping_table[], - u32 table_size, char fw_name[BRCMF_FW_NAME_LEN], - char nvram_name[BRCMF_FW_NAME_LEN]); void brcmf_fw_nvram_free(void *nvram); enum brcmf_fw_type {