Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1270386rwe; Thu, 1 Sep 2022 15:47:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR6oWsW3N7tutyyxZ5mfpzZNslDzi58SGQEbDKUhcBh1hvhsxlXDHzKKM8FAxXHZg+4uQPE+ X-Received: by 2002:a05:6402:d4e:b0:449:2ae0:aadd with SMTP id ec14-20020a0564020d4e00b004492ae0aaddmr7033034edb.261.1662072479359; Thu, 01 Sep 2022 15:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662072479; cv=none; d=google.com; s=arc-20160816; b=LKLaqRD6YEDjghbq/qjxWcvtmb42DshEoMoIWGKnP2ymCxgQGFKAb5AmOE4g5BVoYe C2uRLlWHXUkUepwvgiz0cutkclFIwAJZ2F7i+QMSFuHRbbflK74Kn1CY29BCfIizxhYx OVGaTLupRjsKg9d+85Z5xtZQwqnHes05620X6QpAVGZ0sXeG9Iwb00QLgyRPvNo/dPfE lygeWYGKX5+UUv+IvfNMg+JWijcfnSSWs80LH2Z6yVYx5HN53pne2GJD3cqy+re87zkp fGmU9UedK3tI4G/+kwi6rzWklGkboK3q1jV1QCq77bM9rzc7QN3MS4pj/xpH+Bq9NN9M SvyQ== 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:cc:to:from :dkim-signature; bh=ZGryqp6PN2Xl4uE1Cl8ul5MHURkXagR6tqozK7Gh86g=; b=PUOr3lix538fr54LVbCr6DxAKXe6/KTaBqxpafYbN/YlJFj7/spYuhvOm6Nhxbm4El VJSy1UHO8vtHgcJFtcmQe6bCFnNJw+ztd+3PyYFwzVwOU+BQ7BMs2JFHoytPHLGizCI9 1RvhQRtsRT05Me82SUYIWAZwgb6vK0mjjai7XMdBjTKjyH5NGPTtWFHPX8MYzAYi0llT x5gpi3n5DGRmZSibxNTDGiSBLbvUwnXztgcQ+Bro9b5oaNkN/Emap8sTBQdrg4qQbcDe fivcLDBQlIc3mxNiBZrzuKrOHqi43w4165gavXiXlDh8NVNjgJ1RPxuHaVkv/3VpGN2A FqfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=NHxHG204; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr28-20020a1709073f9c00b00730c1868d6bsi556488ejc.90.2022.09.01.15.47.33; Thu, 01 Sep 2022 15:47:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=NHxHG204; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234274AbiIAWWE (ORCPT + 99 others); Thu, 1 Sep 2022 18:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234960AbiIAWU7 (ORCPT ); Thu, 1 Sep 2022 18:20:59 -0400 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0F2FA223D; Thu, 1 Sep 2022 15:19:20 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 78B6E2205; Fri, 2 Sep 2022 00:19:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1662070753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZGryqp6PN2Xl4uE1Cl8ul5MHURkXagR6tqozK7Gh86g=; b=NHxHG204Y9W9I0zSVh0EVs8SFiwhe9ccuNqrQNRb6USXzgjoncd/2WxYqubX0TaRuCtBJn C+dK2S002mU8Ra8ZAMChbkkwIadhH+9P5DERw2aCazNBy2TBDP4Q+nzB4GeLsMa0RnOyx4 gL/m43Nzb117yWQPXfCuApkTtcwx1/wyt4SBKrpz5uv7YOT8DUWd5XgaTJjdn65aAbqCAL PuoGIN4XWUg0zUaWoHTGPhl192nLkdOSMFHCunchKktSaEI3SYfQURf9lbNmyizNJQRdmW TKalRIq1T7LBbQouNAvlGCvVrMzs5S6We3v7crBY9yuZBeO0UcFQxo/Futg5YA== From: Michael Walle To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Srinivas Kandagatla , Shawn Guo , Li Yang , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Frank Rowand Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ahmad Fatoum , Philipp Zabel , Michael Walle Subject: [PATCH v2 13/20] nvmem: core: drop priv pointer in post process callback Date: Fri, 2 Sep 2022 00:18:50 +0200 Message-Id: <20220901221857.2600340-14-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220901221857.2600340-1-michael@walle.cc> References: <20220901221857.2600340-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 It doesn't make any more sense to have a opaque pointer set up by the nvmem device. Usually, the layout isn't associated with a particular nvmem device. Signed-off-by: Michael Walle --- changes since v1: - new patch drivers/nvmem/core.c | 4 ++-- drivers/nvmem/imx-ocotp.c | 4 ++-- include/linux/nvmem-provider.h | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index d31d3f0ab517..6910796937f9 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -1523,8 +1523,8 @@ static int __nvmem_cell_read(struct nvmem_device *nvmem, nvmem_shift_read_buffer_in_place(cell, buf); if (cell->read_post_process) { - rc = cell->read_post_process(nvmem->priv, id, index, - cell->offset, buf, cell->bytes); + rc = cell->read_post_process(id, index, cell->offset, buf, + cell->bytes); if (rc) return rc; } diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index ac0edb6398f1..5e869d4a81c5 100644 --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -222,8 +222,8 @@ static int imx_ocotp_read(void *context, unsigned int offset, return ret; } -static int imx_ocotp_cell_pp(void *context, const char *id, int index, - unsigned int offset, void *data, size_t bytes) +static int imx_ocotp_cell_pp(const char *id, int index, unsigned int offset, + void *data, size_t bytes) { u8 *buf = data; int i; diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index 9d22dc5a3fa5..46067a6a0395 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -19,8 +19,9 @@ typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset, typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset, void *val, size_t bytes); /* used for vendor specific post processing of cell data */ -typedef int (*nvmem_cell_post_process_t)(void *priv, const char *id, int index, - unsigned int offset, void *buf, size_t bytes); +typedef int (*nvmem_cell_post_process_t)(const char *id, int index, + unsigned int offset, void *buf, + size_t bytes); enum nvmem_type { NVMEM_TYPE_UNKNOWN = 0, -- 2.30.2