Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4257917ybe; Mon, 9 Sep 2019 06:45:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjIQVb0KIgHeuiWtOMQ2X8zJq10fPPDJVhVXKAnWxRsqUcyR9TyfQUKLlYGC2PzYCCq+gx X-Received: by 2002:a05:6402:148c:: with SMTP id e12mr24713338edv.62.1568036711396; Mon, 09 Sep 2019 06:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568036711; cv=none; d=google.com; s=arc-20160816; b=ZYekpC6w4tXQhbReEPRuUM1+8W05Ds86AKfhpbWjva+PQj9hHWOlzZMe0dC8lJ9krN 3+3zgDxlU/8HMe4qV4lO73StYmWhRW7djbwRhrTi3mdJEE8lYBrEcLqFDJDG3EKpV3Qe CHlcwtajgd0ZeSQY7tAAs6ajA7Wpmq7wfV3SF5G6+W2V4MQEuio2aaugUQ2EsLFiO7th nk/p9USDyagfRoBWwU2wmmu+HHgyPkkVN1tNZNZBHWOURVWFqN0RldT827GokBu2U1e3 GSJ3b/7FT1LN+UJtpp0y325D9T2F0ocCshRsj6i0DLAFq9MgvkPJTM3uWzby5mSezVjK +fBw== 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:dkim-signature; bh=m5chlBYxSUD4bClAAj1mNRoN2Y0LLyE0j8auGU6ri9k=; b=zHMTf7Gx2wl+5//l4seniAlCY+mzAkbqxg/JYw/K9AUWt1Yam7bPYdXiaD07+f2v53 Z7/pT9bELZAoatt3iFgtiDsP67M0zBWZlY1Eh1BOPOz0awjxq0+U4z8q4pWrOpoa7eHi VT3Dua0OQzlFQpV8om/rMEl6LbyUFBTsd5DM1NsLYgdbg/yArtlDapQW0Tbkgf18sWOY GTLoyUNUNY/CbCH5i26D8SwI0VLLV2V8kJX9KPIjIsvVcxyz4w/YlJPFBSUwnW/eEG86 HjRloa5Kn603H5zbQgHawdd61R+3R4rvwPrcxSIIxaRD2NSMJsLzskmdtTRW5z3XJelg kI3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UuSwRV0C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d48si9634302eda.383.2019.09.09.06.44.47; Mon, 09 Sep 2019 06:45:11 -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; dkim=pass header.i=@kernel.org header.s=default header.b=UuSwRV0C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731232AbfIHXSO (ORCPT + 99 others); Sun, 8 Sep 2019 19:18:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:51690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731201AbfIHXSO (ORCPT ); Sun, 8 Sep 2019 19:18:14 -0400 Received: from earth.universe (bl10-94-171.dsl.telepac.pt [85.243.94.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15F4720828; Sun, 8 Sep 2019 23:18:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567984694; bh=FxEKbz5lcvL7U59ZQw9i2X+8b1UWgWWC/e1PbuEqGdU=; h=From:To:Cc:Subject:Date:From; b=UuSwRV0C8jh+MxBesClQ/bbEmYh/cbjbAnRvcx/ZABBsbATJjVgivORzaOVUkO66X iqOHpGTeJxobkduQJVARXe0L/mfbCaGQxDaysUw1aOumkydZAhnfYQNeRMEqL0jlky AXXASEENA+NZK1ZbeJucjCQoNPaDYy87kijaLCyg= Received: by earth.universe (Postfix, from userid 1000) id 56CD73C0CFA; Sun, 8 Sep 2019 14:10:39 +0200 (CEST) From: Sebastian Reichel To: Srinivas Kandagatla Cc: Sebastian Reichel , kbuild test robot , Han Nandor , linux-kernel@vger.kernel.org Subject: [PATCH] nvmem: core: fix nvmem_cell_write inline function Date: Sun, 8 Sep 2019 14:10:38 +0200 Message-Id: <20190908121038.6877-1-sre@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sebastian Reichel nvmem_cell_write's buf argument uses different types based on the configuration of CONFIG_NVMEM. The function prototype for enabled NVMEM uses 'void *' type, but the static dummy function for disabled NVMEM uses 'const char *' instead. Fix the different behaviour by always expecting a 'void *' typed buf argument. Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface") Reported-by: kbuild test robot Cc: Han Nandor Cc: Srinivas Kandagatla Cc: linux-kernel@vger.kernel.org Signed-off-by: Sebastian Reichel --- include/linux/nvmem-consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index 8f8be5b00060..5c17cb733224 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) + void *buf, size_t len) { return -EOPNOTSUPP; } -- 2.23.0.rc1