LKML Archive on lore.kernel.org
 help / Atom feed
From: Gaurav Kohli <gkohli@codeaurora.org>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, srinivas.kandagatla@linaro.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] nvmem: core: Set no-read-write provider to avoid userspace read/write
Date: Sun, 17 Mar 2019 19:39:26 +0530
Message-ID: <e9a41f2c-002e-4e56-7cd2-9f514bb82b99@codeaurora.org> (raw)
In-Reply-To: <201903171227.wBkYRH1J%lkp@intel.com>

Oh i was in wrong version, will upload new patch v2, thanks for update.

Regards

Gaurav

On 3/17/2019 9:51 AM, kbuild test robot wrote:
> Hi Gaurav,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v5.0 next-20190306]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url:    https://github.com/0day-ci/linux/commits/Gaurav-Kohli/nvmem-core-Set-no-read-write-provider-to-avoid-userspace-read-write/20190317-105219
> config: i386-randconfig-x010-201911 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
>          # save the attached .config to linux build tree
>          make ARCH=i386
>
> All errors (new ones prefixed by >>):
>
>     drivers//nvmem/core.c: In function 'nvmem_register':
>>> drivers//nvmem/core.c:662:47: error: 'np' undeclared (first use in this function); did you mean 'up'?
>       nvmem->no_read_write = of_property_read_bool(np, "no-read-write") |
>                                                    ^~
>                                                    up
>     drivers//nvmem/core.c:662:47: note: each undeclared identifier is reported only once for each function it appears in
>
> vim +662 drivers//nvmem/core.c
>
>     602	
>     603	/**
>     604	 * nvmem_register() - Register a nvmem device for given nvmem_config.
>     605	 * Also creates an binary entry in /sys/bus/nvmem/devices/dev-name/nvmem
>     606	 *
>     607	 * @config: nvmem device configuration with which nvmem device is created.
>     608	 *
>     609	 * Return: Will be an ERR_PTR() on error or a valid pointer to nvmem_device
>     610	 * on success.
>     611	 */
>     612	
>     613	struct nvmem_device *nvmem_register(const struct nvmem_config *config)
>     614	{
>     615		struct nvmem_device *nvmem;
>     616		int rval;
>     617	
>     618		if (!config->dev)
>     619			return ERR_PTR(-EINVAL);
>     620	
>     621		nvmem = kzalloc(sizeof(*nvmem), GFP_KERNEL);
>     622		if (!nvmem)
>     623			return ERR_PTR(-ENOMEM);
>     624	
>     625		rval  = ida_simple_get(&nvmem_ida, 0, 0, GFP_KERNEL);
>     626		if (rval < 0) {
>     627			kfree(nvmem);
>     628			return ERR_PTR(rval);
>     629		}
>     630	
>     631		kref_init(&nvmem->refcnt);
>     632		INIT_LIST_HEAD(&nvmem->cells);
>     633	
>     634		nvmem->id = rval;
>     635		nvmem->owner = config->owner;
>     636		if (!nvmem->owner && config->dev->driver)
>     637			nvmem->owner = config->dev->driver->owner;
>     638		nvmem->stride = config->stride ?: 1;
>     639		nvmem->word_size = config->word_size ?: 1;
>     640		nvmem->size = config->size;
>     641		nvmem->dev.type = &nvmem_provider_type;
>     642		nvmem->dev.bus = &nvmem_bus_type;
>     643		nvmem->dev.parent = config->dev;
>     644		nvmem->priv = config->priv;
>     645		nvmem->type = config->type;
>     646		nvmem->reg_read = config->reg_read;
>     647		nvmem->reg_write = config->reg_write;
>     648		if (!config->no_of_node)
>     649			nvmem->dev.of_node = config->dev->of_node;
>     650	
>     651		if (config->id == -1 && config->name) {
>     652			dev_set_name(&nvmem->dev, "%s", config->name);
>     653		} else {
>     654			dev_set_name(&nvmem->dev, "%s%d",
>     655				     config->name ? : "nvmem",
>     656				     config->name ? config->id : nvmem->id);
>     657		}
>     658	
>     659		nvmem->read_only = device_property_present(config->dev, "read-only") ||
>     660				   config->read_only || !nvmem->reg_write;
>     661	
>   > 662		nvmem->no_read_write = of_property_read_bool(np, "no-read-write") |
>     663				   config->read_only;
>     664		if (config->root_only)
>     665			nvmem->dev.groups = nvmem->read_only ?
>     666				nvmem_ro_root_dev_groups :
>     667				nvmem_rw_root_dev_groups;
>     668		else
>     669			nvmem->dev.groups = nvmem->read_only ?
>     670				nvmem_ro_dev_groups :
>     671				nvmem_rw_dev_groups;
>     672	
>     673		device_initialize(&nvmem->dev);
>     674	
>     675		dev_dbg(&nvmem->dev, "Registering nvmem device %s\n", config->name);
>     676	
>     677		rval = device_add(&nvmem->dev);
>     678		if (rval)
>     679			goto err_put_device;
>     680	
>     681		if (config->compat) {
>     682			rval = nvmem_setup_compat(nvmem, config);
>     683			if (rval)
>     684				goto err_device_del;
>     685		}
>     686	
>     687		if (config->cells) {
>     688			rval = nvmem_add_cells(nvmem, config->cells, config->ncells);
>     689			if (rval)
>     690				goto err_teardown_compat;
>     691		}
>     692	
>     693		rval = nvmem_add_cells_from_table(nvmem);
>     694		if (rval)
>     695			goto err_remove_cells;
>     696	
>     697		rval = nvmem_add_cells_from_of(nvmem);
>     698		if (rval)
>     699			goto err_remove_cells;
>     700	
>     701		blocking_notifier_call_chain(&nvmem_notifier, NVMEM_ADD, nvmem);
>     702	
>     703		return nvmem;
>     704	
>     705	err_remove_cells:
>     706		nvmem_device_remove_all_cells(nvmem);
>     707	err_teardown_compat:
>     708		if (config->compat)
>     709			device_remove_bin_file(nvmem->base_dev, &nvmem->eeprom);
>     710	err_device_del:
>     711		device_del(&nvmem->dev);
>     712	err_put_device:
>     713		put_device(&nvmem->dev);
>     714	
>     715		return ERR_PTR(rval);
>     716	}
>     717	EXPORT_SYMBOL_GPL(nvmem_register);
>     718	
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.


  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15  9:25 Gaurav Kohli
2019-03-17  4:21 ` kbuild test robot
2019-03-17 14:09   ` Gaurav Kohli [this message]
2019-03-17  5:39 ` kbuild test robot

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9a41f2c-002e-4e56-7cd2-9f514bb82b99@codeaurora.org \
    --to=gkohli@codeaurora.org \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox