From patchwork Mon Sep 11 09:00:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 112175 Delivered-To: patch@linaro.org Received: by 10.100.153.131 with SMTP id 3csp5469318pji; Mon, 11 Sep 2017 02:00:56 -0700 (PDT) X-Received: by 10.98.93.25 with SMTP id r25mr11113408pfb.252.1505120456829; Mon, 11 Sep 2017 02:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505120456; cv=none; d=google.com; s=arc-20160816; b=IXn3tn1eHv+fGJZ2Jao1m8vLz0GPNZtpLjGyNPQN6x83JtZpvyVyB5MUXZLWeXSPaN zn9qgbfSnnYfrYSh6AoJUVUOV9mFN+bgTjqB1Pdkj7HUa09smir3m3TBt+BKHnQ5oYM7 GQghTx/lQ6L5ZyYVybnbYFUt6EJG0AUeZYgpci+zMsl05HllT2wbYAo6aOU4KqXl1xf/ 5dDIfrhLNhlCOMaauMIXvdh6tjOGRoZxCkfJxvECsE3smoXhGfpLphP1LT6gza3ajgeD xmPtqWmHmnJ0yjiDnKzPx8ftd3XZPqxExL7E3xcmPOQot8U6hzNbs/7x7v6ir8g9uwPU 8m+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=JsIrqwtbQ5UGBeKZO13toUbeImf5wB1IC7MmX1v1/vM=; b=1KW5WCtoHdMiga0AYCDiM5YlE73KiIX0TZT8YkeWlLaBzkFZcJA7bx8zP4aD8X9a/2 JswVkRcw+VTwYtQO2WsIeJKE8FMCXML1+Buf9OQNMuzGNtsBrFz67NDs7ssi2rfSvPnt WIYUpnz5ALgYfrO5eilQ/KzyLp5B+fq7YifhJbALwPDmUg2nL5p4NF4vZwjlFyy5ZMYR TItWk6somcFik8T6cYLnHIHQuLJOUrExPWgmMpS/AICtLozD8LgOVfZ1dVR+JeN6WyQv 84s9ReB+R3W2SYCXcWGiEr1RWK4FN0C7BqspV9WYa6IpSzLd7QBrZGOgPejRS1UN+nmo k/lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X1yxMBUY; 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 71si6610616plb.777.2017.09.11.02.00.56; Mon, 11 Sep 2017 02:00:56 -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=X1yxMBUY; 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 S1751419AbdIKJAy (ORCPT + 26 others); Mon, 11 Sep 2017 05:00:54 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:38838 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbdIKJAc (ORCPT ); Mon, 11 Sep 2017 05:00:32 -0400 Received: by mail-io0-f175.google.com with SMTP id n69so20689898ioi.5 for ; Mon, 11 Sep 2017 02:00: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; bh=JsIrqwtbQ5UGBeKZO13toUbeImf5wB1IC7MmX1v1/vM=; b=X1yxMBUYus19oUdkFfjifrUcUiJVQeMZZClsQI1Jy3n+s8E1egoNZG2YY5xTqWPqs1 ufNIPc6yCcPgwPyWbYkYSyY+9oo6X+Fdcgzt+es6V6XnrjcIh/51w56vlCa9dEqa6w+x mxTTM+kc28gSjr3CyHA1IzLtF767H98BHSXaE= 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; bh=JsIrqwtbQ5UGBeKZO13toUbeImf5wB1IC7MmX1v1/vM=; b=f5eZ/YKHNkIoipeonZHRiIebVduhFoNtMV2bEe6S2NBjHVJRvXrjsqjCQnSX5clmSl M0T9pMkoPM5poYEpKX3HY7Okbwnmcd2c53gNlpJDQ+li8a/Plmn9L5TEO0fIfs4SDg5z TaBBrdhCg9AlPoUbI6V8R5bz2AbzHYiHljFZtqg061Esqd/rXeimghuYR5I5ob/IaoKX 45CEpRLIgTqTAVUMGFeX1r/62BqRge2yjFK/IU1mfjBzKoZF+71FCgsUVRKqeAYT18Bm eWAvywzXdm/0YA8LY05RyZqVaoKaQqC0XGIwU+T8W/EufVBGb+QcacGNwvakmyAv9xQu qjsw== X-Gm-Message-State: AHPjjUhiwf8z+avj3UDD13FUqAj/WYZvymdLdBKTyHS9nk6/jCy87KSO MCMhmPQB0MR0jdAi X-Google-Smtp-Source: AOwi7QD7mV+RZrt25PMjKfeOkroU6ujhrR6cYRG1N9ZWTu1g18YjARjSrcWkeP2l0Ms1oEykNCaKnQ== X-Received: by 10.107.81.1 with SMTP id f1mr6155065iob.17.1505120431780; Mon, 11 Sep 2017 02:00:31 -0700 (PDT) Received: from localhost.localdomain (static.8.26.4.46.clients.your-server.de. [46.4.26.8]) by smtp.gmail.com with ESMTPSA id a189sm4344146itd.21.2017.09.11.02.00.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Sep 2017 02:00:31 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Srinivas Kandagatla Subject: [PATCH 3/4] nvmem: remove inline in drivers/nvmem/core.c Date: Mon, 11 Sep 2017 11:00:13 +0200 Message-Id: <20170911090014.16806-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170911090014.16806-1-srinivas.kandagatla@linaro.org> References: <20170911090014.16806-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada These two functions are defined in .c file, but called just once (at least for now). So, the compiler will fold them into their callers even without the "inline" markers. However, this kind of optimization should not be done by hand. It is compiler's judge after all. Signed-off-by: Masahiro Yamada Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.9.3 diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index d12e5de..fdb8b7a 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -946,8 +946,7 @@ void nvmem_cell_put(struct nvmem_cell *cell) } EXPORT_SYMBOL_GPL(nvmem_cell_put); -static inline void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell, - void *buf) +static void nvmem_shift_read_buffer_in_place(struct nvmem_cell *cell, void *buf) { u8 *p, *b; int i, bit_offset = cell->bit_offset; @@ -1028,8 +1027,8 @@ void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len) } EXPORT_SYMBOL_GPL(nvmem_cell_read); -static inline void *nvmem_cell_prepare_write_buffer(struct nvmem_cell *cell, - u8 *_buf, int len) +static void *nvmem_cell_prepare_write_buffer(struct nvmem_cell *cell, + u8 *_buf, int len) { struct nvmem_device *nvmem = cell->nvmem; int i, rc, nbits, bit_offset = cell->bit_offset;