From patchwork Sun Sep 9 20:32:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10593441 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 BD2D213AC for ; Sun, 9 Sep 2018 20:33:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD19528451 for ; Sun, 9 Sep 2018 20:33:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A16A528528; Sun, 9 Sep 2018 20:33:10 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 522CA28451 for ; Sun, 9 Sep 2018 20:33:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726884AbeIJBX7 (ORCPT ); Sun, 9 Sep 2018 21:23:59 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41730 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbeIJBX6 (ORCPT ); Sun, 9 Sep 2018 21:23:58 -0400 Received: by mail-wr1-f66.google.com with SMTP id z96-v6so19761385wrb.8 for ; Sun, 09 Sep 2018 13:33:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+8Dng/jD0Pt3ikRmSa3f4mSfCtyBTo5n2eVdp2MuwbY=; b=DcqJ2NgmZLmgwU3QR92w0JS694crfC0l4E6lITCzNBQDnNY8oOJ+PKl/7WhL0uZxFH wJBZVRcbIJUJuHuxHCaOsjutCyQ9cQDGjoXgF59p/3FTonIl8Nwdket25MqDD0gJx+j+ NeVB/9Zi+sDv02FP7XYun2/D1WS4+sQtSZlsB1moP4o7tHbJhb+QG5FDO+4rbdqYuM6h b/nQJbwbjjYkQ3BumBImU95MHISwQGDui/XfS8NeERC5F8zmwxv9vrA5FMKeyME1TK7e FmUz3OqJqNVdCdCqKjRw1xm88gCRGNZjbbxK0Gk8M/UV4PP+Z4QxVV5aA1gaxdgtG4ki W/1Q== X-Gm-Message-State: APzg51D0oyzV4xoY8EX7cHH0KOHQNDcvQ8fAhDiO+RYD8wAMDmkZtxB8 6SrDctn/ssZrBWrI/WGtDMS2uA== X-Google-Smtp-Source: ANB0VdYMrsbCTcu2tr3e3jWZk6qKHYHqcEC1/eJbbdvk5nUhyOt8tsB3qi1sxut5aGJcz3QHOXq6hA== X-Received: by 2002:adf:f608:: with SMTP id t8-v6mr12669309wrp.186.1536525185016; Sun, 09 Sep 2018 13:33:05 -0700 (PDT) Received: from localhost.localdomain ([151.66.53.29]) by smtp.gmail.com with ESMTPSA id y184-v6sm13652006wmg.17.2018.09.09.13.33.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 13:33:04 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: sgruszka@redhat.com, linux-wireless@vger.kernel.org Subject: [PATCH 10/11] mt76x0: remove unused mt76x0_burst_read_regs Date: Sun, 9 Sep 2018 22:32:45 +0200 Message-Id: <20180909203246.21608-11-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.18.0 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 From: Stanislaw Gruszka mt76x0_burst_read_regs is not used, but keep it for eventual use. Since we have this function now in the driver git history, we can remove it and eventually revert this commit it the function will be needed. Signed-off-by: Stanislaw Gruszka Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/mcu.c | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c index 7baa9a45bd84..c14ae6c3e863 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c @@ -106,49 +106,6 @@ int mt76x0_burst_write_regs(struct mt76x0_dev *dev, u32 offset, data + cnt, n - cnt); } -#if 0 -static int mt76x0_burst_read_regs(struct mt76x0_dev *dev, u32 base, - struct mt76_reg_pair *data, int n) -{ - const int max_vals_per_cmd = MT_INBAND_PACKET_MAX_LEN / 4 - 1; - struct mt76_usb *usb = &dev->mt76.usb; - struct sk_buff *skb; - int cnt, ret; - - if (!n) - return 0; - - cnt = min(max_vals_per_cmd, n); - if (cnt != n) - return -EINVAL; - - skb = alloc_skb(cnt * 4 + MT_DMA_HDR_LEN + 4, GFP_KERNEL); - if (!skb) - return -ENOMEM; - skb_reserve(skb, MT_DMA_HDR_LEN); - - skb_put_le32(skb, base + data[0].reg); - skb_put_le32(skb, n); - - mutex_lock(&usb->mcu.mutex); - - usb->mcu.rp = data; - usb->mcu.rp_len = n; - usb->mcu.base = base; - usb->mcu.burst = false; - - ret = __mt76u_mcu_send_msg(&dev->mt76, skb, CMD_BURST_READ, true); - - usb->mcu.rp = NULL; - - mutex_unlock(&usb->mcu.mutex); - - consume_skb(skb); - - return ret; -} -#endif - struct mt76_fw_header { __le32 ilm_len; __le32 dlm_len;