From patchwork Mon Jul 8 12:51:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168632 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp6510476ock; Mon, 8 Jul 2019 05:51:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8NeoHkoa2m5lozEbyeJu15CjvIag0DJd73EZXE5JFW8sexwYNPgs6Io6BaQuX2W1tJkAS X-Received: by 2002:a17:90a:8d86:: with SMTP id d6mr25277140pjo.94.1562590290679; Mon, 08 Jul 2019 05:51:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562590290; cv=none; d=google.com; s=arc-20160816; b=Hy/REKXWzYEITaaTOgJLXRkP7IC/YhPrUlhb5DEugBMvEHgQvfs/HLGGWstXApgbtp qTHLJpK5K6me6v/dG84IxQlShju4f2xlV3hyYmesuTjSV4tsk2Ha1M4fWF9lIeZYS4gs /jKUlfuBAquuKTEI9wn6ytwqxWQjuMXQz74fXrWfvRJwZFk9EoW4ir72RIQwlwHHlOMk Yr7hk7SQ6V0VAtU8Z4qHbPxv32X1BaPuHCvnY5T2mG7k8AVIreXQwOeqskdJvty+OKsb AloOAnJ+0IhfwhsaBm/6ij0gqW4J5cbRXxHct4rMy1c604VtsSUy/DheGS6ufa+tDBCm yX1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=cJja+ytLhgHphVtdjP/ouxouZbai9a0Ya666U651OCE=; b=DK0j8iFeYivmIkpAGr5G3NZZdYYpQ8/F08w4Ju9nCRxsHXkLbjsDHANdEs3qRIQqKd fpo0DxiYeQPrHx7BHU6nd6oE27DRnRuX3buV+K+KX5gqo9TsMovmc/K9TVm4GpJ1/XVd B0GOIn8Lrw1PWWA7Etu/kFqsSq+LNoYjsBZF0c9mbWsr2hfnrdbkmPEUj1rucqv7ib5f iPetONDjGyZPsckKE2HX4oY5hrCwJ5aSX+5EheXDY/cNkQ3eKyKpPqtkTzAbcz1nc7dM n50mE2ksW3o7M136v6mLJDp3lops3BG0lLlsvCBNA+69b4vkiZ9cspYIcnUZddai4gPY 3ewA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cj12si18582196plb.237.2019.07.08.05.51.30; Mon, 08 Jul 2019 05:51:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731046AbfGHMv3 (ORCPT + 30 others); Mon, 8 Jul 2019 08:51:29 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:44981 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728615AbfGHMv3 (ORCPT ); Mon, 8 Jul 2019 08:51:29 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mvs2R-1ibkHp1Zwt-00swZe; Mon, 08 Jul 2019 14:51:18 +0200 From: Arnd Bergmann To: Srinivas Kandagatla Cc: Arnd Bergmann , Maxime Ripard , Greg Kroah-Hartman , Nandor Han , Sebastian Reichel , Bartosz Golaszewski , Fabrice Gasnier , linux-kernel@vger.kernel.org Subject: [PATCH] nvmem: fix nvmem_cell_write() prototype Date: Mon, 8 Jul 2019 14:51:07 +0200 Message-Id: <20190708125115.3731543-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:F5W/srgO0603YyWyAzNz5lIxzMjkSTkeFBySmMdsEFHEfRskmBX ED6CC28DmE6kleszwxB00hZUJc8Zi5eyhyD3h4ituhNtJI1R83Ltankhoy1RIz+QELI0dtl /PnFdUAMHhj458aogrU6S0psh/NEF/9u0gGPD/+IkTF15/iswWi8wMRWE3Ifb6ZFu7TOKd0 hBypeMnjduLMmMk1ZO64g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:EbiKBLLcMBA=:RPSnkgPAS4fb6sKFiJ4QiN Pd0pNmawvwiTJ8rW5DQYBeXnEAYt008n8FPDsnNkL5Y8U7Ihc6G5/jWnyI4BTOoaEb8Uxk3u6 v17Fq2EseW6ctmdDDxd8ttwFb6w0lzulEArbgaisuauzHYGtbpWi2tz3MQAua+nV9u4BlTNhK LzNCy+B8M9Uv+4vZj/8/NXLGtVDHiOdinsuFmFlnL3cETfmjx+wG2WXwX91Rmo+El2GZyYv96 Ht4da7S7AVXfvMzbA3jBkGRPYN4a8jFlgInkAQ9Ubyn6u0YF9nbPJHPvz/FHFqnQmZZgptDs6 pswvQBSLFonyVygArR8tnpxw5Rs7bW0N3aV31GcwseCp/96WeVB2g1k7B5yFRxGSPQ/xeikU2 xzC9t9B0YV9KNsGnxhAwEu4qnDOdNe51INCkjPy4klnC6V+0hn9Ag7tVNXRdM1kJEe+nVvb6U v5xTXPYwWztfBkBqpzCk9ba1w6UL8eFprzjQJHz+S9YXQduCr3RUS7H6XylP8VCDIdSL8t5De /D0zLZDqAyhbRnf5n9ZdI5Hr9wg+rI3pAmlZN0rMaN5AXeVQIw2XD6rmXIPuSNSX9lWbMHsxj bQtzrVarLcPPnJ5/StdpzDNmLvMN4cRLeuh96QUtPfl8DLZJg6fkRyLMKVM+aVTsdR81DUGQJ oss0uRWpbiJ/bg6X76D14+b99mj3vRxT8A4ZYWZ5HSZ5s71kXiOk/t8jMiz82cz5CNCQ/VmwF tF4WiYHxlyLsbrk5wIsOtRRIESPVVy5ZStpX4Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dummy declaration for nvmem_cell_write() has a different prototype from the one that is normally used, and it causes a warning when CONFIG_NVMEM is disabled: drivers/power/reset/nvmem-reboot-mode.c:27:42: error: incompatible pointer types passing 'unsigned int *' to parameter of type 'const char *' [-Werror,-Wincompatible-pointer-types] ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic)); Make the second argument a void pointer like the other prototype has. Fixes: 69aba7948cbe ("nvmem: Add a simple NVMEM framework for consumers") Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface") Signed-off-by: Arnd Bergmann --- include/linux/nvmem-consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 8f8be5b00060..459df4ba5408 100644 --- a/include/linux/nvmem-consumer.h +++ b/include/linux/nvmem-consumer.h @@ -118,7 +118,7 @@ static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) } static inline int nvmem_cell_write(struct nvmem_cell *cell, - const char *buf, size_t len) + const void *buf, size_t len) { return -EOPNOTSUPP; }