From patchwork Tue Oct 29 11:42:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 178011 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp4746172ill; Tue, 29 Oct 2019 04:43:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9hFIP8KcvZCOB8zjnm02zHHEQ0HZgono8mjGK/afmWV5V0krSApLHqif3YCmS/r0vRH+6 X-Received: by 2002:a05:6402:488:: with SMTP id k8mr24916711edv.293.1572349417963; Tue, 29 Oct 2019 04:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572349417; cv=none; d=google.com; s=arc-20160816; b=W3Dk5FuUxUx7Lz+ukKMAU9XRhSGizliVfnS+4IROFgBZTFiYP4Dt7ckQDCM9wQcLn+ ae+kH6y+mt8sOPS/wSL+mrr80GbVT4Okg6uMDzyiKG5lDxb7F1u6kgJDEnOuIB08kO4y BDXE+w/nDlpaIXWeCg5VOtSGZGutEWqbUq56jXYJm+lBxYIzwNADcnP8uYNIoXNC4DyZ OVF9Ms9QkLz6v5VU+51g7JSm1bNHdOqNhbjrEWtu1e8UnJMKhNdWFpoOSKeVpJKntiKc FdxmSK+RotZhxTWLxMQ18oAVXEhiF8ushmn0ESjlAglVYRiJH+x9PuPjcdsfNy6TFv4j Gxig== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E7GmRR93JXMtsBPLgTPcSF+DdecbegkmwqCROqs/zCo=; b=Gs9dt+iiFHwuRV1bwHvYG72k4hh526dYrSkuDF4nqRwK2jezEbfKUm5iEFt4Z0l17F gReEo8JktwevzJ7hy76udghtfzsX55qr4f3X+EjilbdHNnTs5326lgO2eVJSr/+drzaK uLtjuoWJq6dZHWrNddTaVTtGrEWr9zNwuzSiyYtkcDCxWGIM2F+XGVEGJkJCocS6ar/E zvCRP16S/a0sL3BbzdBqb0c3pItvHHny25qVK7WUg2eAmwKWkRg3fsKdjMBar+F9cpRB 4ULGGZOMf18GQrh6by/2T6CNs5hesu6dOR1gMC7dwMFexeqRLVwEyNgqnTFmRJ/0ycH7 Hgrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SPsYUDh8; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si10588446edc.6.2019.10.29.04.43.37; Tue, 29 Oct 2019 04:43:37 -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=@linaro.org header.s=google header.b=SPsYUDh8; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732350AbfJ2Lng (ORCPT + 26 others); Tue, 29 Oct 2019 07:43:36 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42533 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732175AbfJ2Lnf (ORCPT ); Tue, 29 Oct 2019 07:43:35 -0400 Received: by mail-wr1-f66.google.com with SMTP id a15so993205wrf.9 for ; Tue, 29 Oct 2019 04:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E7GmRR93JXMtsBPLgTPcSF+DdecbegkmwqCROqs/zCo=; b=SPsYUDh87ek/LEsl2pLRTOHXHTOSZkY1ug6v4kRxoySUvzA3QwbVsJ/DAZzx1BtS5O Q1kkghVx0x1HWl78TTh2NRTZdXRnPsmbZUOC6FO1Uhiu712tDOsDzvm9O3eA7jgcmLRp 8XCSG8Zi6myBdXmlNfcGeroKgbk2Y0glD62yNYaaw6syFojWYLdURZQEDi02SteaOfyv 4d0W6rb6b5VzSFNizVDQHe2JOmK4NC80ggBD3Ca3TLWZRzfqoJEyKAETUm5Xhg5aJxOQ biPjM06c77DsVi72WVTesbyY1+5N5MGyZqcZZRFq52aCIbA0zXKeOAglOsG1ILd61fwR e3/g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=E7GmRR93JXMtsBPLgTPcSF+DdecbegkmwqCROqs/zCo=; b=mrrUL0MHeSRss1Z2cla6sG7xi8JmBTnS+Jv2ZFDK2bqR+BFNfo/Gmk7L4G/9Q3EcOJ Oiff+QDJ8cmajyXEwbtjsQM7xydAH0WZhh+a37AupMMSlLkaUCxbQFK7rI4Nw4UoaJ1T txB6YBEAuQ1hZtf0ZjzULxPLUNn5nWlOHJ2r13J+FpF5lT/iXWao3tssXvyy9W2xezfP WM5lgnig4WCRR2cnPbeffEB3w+7gyEAc5zr4mrksXncHtN4If6VV9GmXb8rCk6rSNxGU 6ljbMbRys/nPJBHfBfDFDPWIT388u8HmZMj3/v06ws4v9pV3bASjH1gJz1PLZDfbhHos BjBw== X-Gm-Message-State: APjAAAWVanLWT3/Ke2xAwRrRyfzrOd0JbEOqkDK8Obu5gJW64dQ3khu0 iT5xtHF0cjDaeIdVrVFUb5OM1g== X-Received: by 2002:adf:f686:: with SMTP id v6mr20738489wrp.141.1572349412339; Tue, 29 Oct 2019 04:43:32 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id q25sm26559864wra.3.2019.10.29.04.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2019 04:43:31 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Sebastian Reichel , kbuild test robot , Han Nandor , Srinivas Kandagatla Subject: [PATCH 01/10] nvmem: core: fix nvmem_cell_write inline function Date: Tue, 29 Oct 2019 11:42:31 +0000 Message-Id: <20191029114240.14905-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191029114240.14905-1-srinivas.kandagatla@linaro.org> References: <20191029114240.14905-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 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 Reviewed-By: Han Nandor Signed-off-by: Srinivas Kandagatla --- include/linux/nvmem-consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0 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; }