From patchwork Tue Oct 17 19:05:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 154436 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4353482vqb; Tue, 17 Oct 2023 12:28:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJnPX2gvIx5e71EfoYt4aekAMSaXeG4t+NwoJB0diSRA1XoriUe/zItKX1MFfdeGt53J/n X-Received: by 2002:a17:90b:3b81:b0:27d:2261:73e4 with SMTP id pc1-20020a17090b3b8100b0027d226173e4mr3406389pjb.2.1697570894806; Tue, 17 Oct 2023 12:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697570894; cv=none; d=google.com; s=arc-20160816; b=m+BbkOL+WKzZkjU37KG2ypj6R7YfUHsd1zJ7Mcg4ImfIWO18HHC9BkQ8/tYLAIi66H j/dwSeT5+CK8u/NQW6bDQu8ihU3/6pAivSN5SGFw5p+gwrjDMV/prCFA8wkWqYJqTLoI U6ybsD+d2rJm9itRfXeUryAdOlXE19ayVIYSNlCy+kR+LTfbqZ3mc29eCuw9YXAegknJ cPdiR5nDwBZCRYQeYUtga0V6q/0yNKRDkUTswrNUXDJmVQGklU9HhblHTeXsGUewMtZc /f6B1QMacfwecDkVEMn/KQy8fz63GD5JYQDkAC0olQOUF7lNAC3s/8DGoExTNXomfT0C /ITA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3IL6KY3EzM2BxcqkNoWLsWmWA0zN5X5Kl3affJBzO2c=; fh=RU/yUUaKKFh3rc/HtcjFaUjlbCuX5eKd8IdkxbaL3k4=; b=vrWgTCCOsHOvyialv7cJ3KIoTOvwV5Kb9ZTToO4gaOnb1KhX/wkOG1nsn3VmfiyTii YqHJq4zZyC6rXFd8YVtHc7dDjPRztqWwLKPN1wCrI2ao0Gn68PKpLUmUpFJAwss7i1UO JVisve0QOsicFH0AHm6CY37T0GbtyulCI1yDaTvr4+tXh0yPPpp51gpJb9diqQOs50jM /as9XbSN7NOKfUY2t1gZwR1dBx0ROPbN2CbRlf24ZohornWzsF01dADq7w8jIYduppIw azj2jkY71ydmrBazdGiT1O4Hkqnrkdf0hm4MPW5U1X3o3CPAuWDK7OApV30E7fwG7cR0 TCmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mIlJcPAr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 23-20020a17090a005700b00276945c92c1si2253082pjb.36.2023.10.17.12.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 12:28:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mIlJcPAr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2A75180FA9C2; Tue, 17 Oct 2023 12:28:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344261AbjJQT2F (ORCPT + 21 others); Tue, 17 Oct 2023 15:28:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344217AbjJQT14 (ORCPT ); Tue, 17 Oct 2023 15:27:56 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9814CC4; Tue, 17 Oct 2023 12:27:54 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32d9552d765so4721360f8f.2; Tue, 17 Oct 2023 12:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697570873; x=1698175673; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3IL6KY3EzM2BxcqkNoWLsWmWA0zN5X5Kl3affJBzO2c=; b=mIlJcPArnJgQomXy/OLwHjgp6ApElaFgJHcObYMEtxFUgwJOpXYr2JHGHWfHQ08GCC RLN68dcLJMnYlUsSArEQVAenJxuj+uvaVgKqlxsQ87TNQpP81aDPPQklYBnMKwim0nqm r/ZyC5FCVhtwFRtMDjYIwTxlDTozXcRo328GuYQTV6mbqq6kDpeTrLBUcALG1BROc3zk OUPpv67bSS/hvEUlqY+XqeljTk4cIHFZmFqESf+6qv7i6Y9G6pEI1rjEiqoaefRys8HF Z5hD3afBL59x/UsT63BPl912RF3uZ6Zb6lyyCbUy6GQ5+kDfcO2RPvQRTtKovGJswTpS Vfvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697570873; x=1698175673; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3IL6KY3EzM2BxcqkNoWLsWmWA0zN5X5Kl3affJBzO2c=; b=Zq+wIvdpD+/KkMNKwDQLnZttTz3OnFAtd4aTfQNajBBpESmyogLEahs54hvS0BsTQQ +bIha4fiabVACWT/bxOg34pYgpgIikqlOF60DX9B2boAhlD/AQA4x8dGANdb0YTD+ub9 ErjsJ+oDUenOrH3OSpQbj0gdUmjzXNwIq6eAFcDn0xFnhCd545f0Sw7bUQvoskJS4Adu 1Lg1c21kMr+2539ZTnw7TFenIsVgWTwmjFOOHAr9ySxY1tLVOLyVGNgGbPblNyf5ILKp rhsuLr6HMXK3x9+5CfOUVnUXfiqKGhDFps2vRY0Jj82YfucxOVvPtfNV0ihZOmfFw1tA Wkzg== X-Gm-Message-State: AOJu0Yz7edBWlNjr7qmHN87FXZrKlPx0IO7kK7AOb3942q1Ggs9GeUrx x75XpdtNRSleeKGC80VVLHA= X-Received: by 2002:adf:f982:0:b0:32d:b06c:80b2 with SMTP id f2-20020adff982000000b0032db06c80b2mr2969857wrr.0.1697570872715; Tue, 17 Oct 2023 12:27:52 -0700 (PDT) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id o2-20020adfeac2000000b0032cc35c2ef7sm435897wrn.29.2023.10.17.12.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 12:27:52 -0700 (PDT) From: Christian Marangi To: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Kalle Valo , Matthias Brugger , AngeloGioacchino Del Regno , Christian Marangi , Simon Horman , Alexander Couzens , Nicolas Cavallari , Daniel Golle , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [net-next RFC PATCH 4/6] wifi: mt76: make mt76_get_of_eeprom static again Date: Tue, 17 Oct 2023 21:05:08 +0200 Message-Id: <20231017190510.27163-4-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231017190510.27163-1-ansuelsmth@gmail.com> References: <20231017190510.27163-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 17 Oct 2023 12:28:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780032098279693404 X-GMAIL-MSGID: 1780032098279693404 Since mt76_get_of_eeprom is not used by mt7915 anymore, unexport it and make it static again. Also drop offset arg as it's only supported for MTD and was always set to 0, hardcode the MTD functio instead. Signed-off-by: Christian Marangi --- drivers/net/wireless/mediatek/mt76/eeprom.c | 7 +++---- drivers/net/wireless/mediatek/mt76/mt76.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c index 817074a5d2fc..748f4b643a5e 100644 --- a/drivers/net/wireless/mediatek/mt76/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/eeprom.c @@ -138,7 +138,7 @@ static int mt76_get_of_eeprom_from_nvmem(struct mt76_dev *dev, void *eep, int le return ret; } -int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len) +static int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int len) { struct device_node *np = dev->dev->of_node; int ret; @@ -150,13 +150,12 @@ int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len) if (!ret) return 0; - ret = mt76_get_of_data_from_mtd(dev, eep, offset, len); + ret = mt76_get_of_data_from_mtd(dev, eep, 0, len); if (!ret) return 0; return mt76_get_of_eeprom_from_nvmem(dev, eep, len); } -EXPORT_SYMBOL_GPL(mt76_get_of_eeprom); void mt76_eeprom_override(struct mt76_phy *phy) @@ -410,6 +409,6 @@ mt76_eeprom_init(struct mt76_dev *dev, int len) if (!dev->eeprom.data) return -ENOMEM; - return !mt76_get_of_eeprom(dev, dev->eeprom.data, 0, len); + return !mt76_get_of_eeprom(dev, dev->eeprom.data, len); } EXPORT_SYMBOL_GPL(mt76_eeprom_init); diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h index f6c850557447..41e4f398083e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76.h +++ b/drivers/net/wireless/mediatek/mt76/mt76.h @@ -1096,7 +1096,6 @@ void mt76_seq_puts_array(struct seq_file *file, const char *str, int mt76_eeprom_init(struct mt76_dev *dev, int len); void mt76_eeprom_override(struct mt76_phy *phy); int mt76_get_of_data_from_mtd(struct mt76_dev *dev, void *eep, int offset, int len); -int mt76_get_of_eeprom(struct mt76_dev *dev, void *data, int offset, int len); struct mt76_queue * mt76_init_queue(struct mt76_dev *dev, int qid, int idx, int n_desc,