From patchwork Tue Jun 26 11:36:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 139933 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5127847lji; Tue, 26 Jun 2018 04:38:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfUdLPL9Wfboi5PNYGYkItMeeRuKYGTqmw6psJAvxA8azDyRHf1kXH5rtRUtYKsWLg5HzmS X-Received: by 2002:a62:e401:: with SMTP id r1-v6mr1193753pfh.172.1530013130839; Tue, 26 Jun 2018 04:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530013130; cv=none; d=google.com; s=arc-20160816; b=ET/hSCSmwm3i8ph2FLhG6eetsvyx5lVsG3Mc4963i+dVhfGHEVdmgcnH0OYl2CY62w 4eaqo9/Xh9e/xP9d8Rnra28F27Zlh9v2J/XP72Oj5Q8vqI4mCUt6+1+HuGDN2cf8FkhE /BspDKYg0ly/zYWdRptoYOzM5FSv7xjBCdDhduyB0t+LL2yZfhe7NOh5nOs8++F7U3FJ MRjFFmkjzY6V5UQmbLeRS1Yj8fgmYELyJd4xP8P9JecP9f5XZS6M1Y8SO4eJXRz1QsPx E3Adpj9B8rfsJmNhBrqcnA/VMiujBGlpRdNBehz7FEtoLMnzwahyJs7E3dqBStdes1p4 hlbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=uWZD0fkPL3tst0V/VPLp6biYOcHEuJtoKACaWNvtcHY=; b=EADqFceWj590vNXHV1O9lT5hFIaU3KeCdZziVth2qQwEASEzIH5v3GA6zK5axmKIdr wMfEAcQdpqtj9zZh6+N2qapgJzkCQbx1B1qOnEv2/wsrIppg8feCcYeRO0ZgnmMU44Nj QZ5eG4PRfPp+vzuV8AxTVoEUGnRqDtf8CXRCPpAqVXCaPtGyreOLZm1ICwZlW08nL1lk mpFJe9qarNYYr7sA3fPfE6KXz6JlVM3r/sulq3zseH6wpJYJdM2+JvJmmP+Hu9dg9cs6 TAQhqiKFJ+u1c/vkaoj0kdi8F7KcNvMBP/hDboVEN2huuxizDqcXywz76aZwSaktU6R4 eWFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aO2MCVoS; 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 q66-v6si531183pfd.153.2018.06.26.04.38.50; Tue, 26 Jun 2018 04:38:50 -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=aO2MCVoS; 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 S934845AbeFZLis (ORCPT + 31 others); Tue, 26 Jun 2018 07:38:48 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34576 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934556AbeFZLir (ORCPT ); Tue, 26 Jun 2018 07:38:47 -0400 Received: by mail-wm0-f66.google.com with SMTP id l15-v6so15031200wmc.1 for ; Tue, 26 Jun 2018 04:38:46 -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; bh=uWZD0fkPL3tst0V/VPLp6biYOcHEuJtoKACaWNvtcHY=; b=aO2MCVoSCAqYKEUBWd/Nli1/mV9vbP+ADJqXtTw1IcxCqc22qlJNDzgM4oGQQ1VPR9 2Arg8TcuPfP65Zet2G4sMw6Ox3FnSSmAOi1rv78IpBLMgb1JNyhjp3raStZnwWQm6GhG dwv+6NxljvBKQJE7ZQ54j6HHvH5hMIb1eXDBM= 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; bh=uWZD0fkPL3tst0V/VPLp6biYOcHEuJtoKACaWNvtcHY=; b=q/B3ERl7Kv7aAotXM91UbOCl+RevpN9Bip0bJ5lXDHVcB1Y8fWOLsRs+Uv2ZR+gX9W cUrpdXimlEVF8B2mil/XLbQf5pjCGzIfB6LcW9nAn8IMOfLMYxe/5VUBJGr5/I1ukuEy VbNwuwoW54T3pBfJ2uTY1USJQH1w0H3fTXOOZEctV1E/zvOAhqg1arIw/10r018+vBS/ PeOleMyU3ueK0QhTcpKbqqBIgkZLBoVt0ISSipdC5ed01AdxQlBp+mEN7dkwRrVkRPne JqrJAujrS0dgvYHXEIKWEwBV+tt/3Nlj2ljobk2Sj6pWJo6taP2NCMLGtuHUf8HejJir GEmQ== X-Gm-Message-State: APt69E0U+CBEf0eUqvSnXwQWrvv0KpPrqOL2R81ewJN2FiW3bO1YZVfG AUcRB4kFhDAMOcV5pTfrWFCDzg== X-Received: by 2002:a1c:9253:: with SMTP id u80-v6mr1411966wmd.52.1530013126218; Tue, 26 Jun 2018 04:38:46 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id p4-v6sm1057426wrj.71.2018.06.26.04.38.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jun 2018 04:38:45 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, bgolaszewski@baylibre.com, andrew@lunn.ch, Srinivas Kandagatla Subject: [PATCH] nvmem: core: remove unused nvmem_device ncells member Date: Tue, 26 Jun 2018 12:36:40 +0100 Message-Id: <20180626113640.24825-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org nvmem ncells can be over written by calling nvmem_add_cells() multiple times. I see there is no real point of maintaining count of cells when we have a list of cell. Remove this to avoid any confusion! Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/core.c | 2 -- 1 file changed, 2 deletions(-) -- 2.16.2 diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index b5b0cdc21d01..34b71b1c69f4 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -31,7 +31,6 @@ struct nvmem_device { struct device dev; int stride; int word_size; - int ncells; int id; int users; size_t size; @@ -389,7 +388,6 @@ int nvmem_add_cells(struct nvmem_device *nvmem, nvmem_cell_add(cells[i]); } - nvmem->ncells = ncells; /* remove tmp array */ kfree(cells);