From: Bartosz Golaszewski <brgl@bgdev.pl> To: kbuild test robot <lkp@intel.com> Cc: kbuild-all@01.org, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, "David S . Miller" <davem@davemloft.net>, Mauro Carvalho Chehab <mchehab+samsung@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Andrew Morton <akpm@linux-foundation.org>, Arnd Bergmann <arnd@arndb.de>, Jonathan Corbet <corbet@lwn.net>, Sekhar Nori <nsekhar@ti.com>, Kevin Hilman <khilman@kernel.org>, David Lechner <david@lechnology.com>, Boris Brezillon <boris.brezillon@bootlin.com>, Andrew Lunn <andrew@lunn.ch>, Alban Bedel <albeu@free.fr>, Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org>, linux-doc <linux-doc@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux ARM <linux-arm-kernel@lists.infradead.org>, Bartosz Golaszewski <bgolaszewski@baylibre.com> Subject: Re: [PATCH v3 08/21] nvmem: sunxi_sid: use devm_nvmem_register() Date: Thu, 13 Sep 2018 10:39:48 +0200 [thread overview] Message-ID: <CAMRc=Med1gSg_ALsb_J2G5QXQ=438CiqG4GT-NYQT-uDF_cPHA@mail.gmail.com> (raw) In-Reply-To: <201809130920.Bfc949m8%fengguang.wu@intel.com> 2018-09-13 3:38 GMT+02:00 kbuild test robot <lkp@intel.com>: > Hi Bartosz, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v4.19-rc3 next-20180912] > [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/Bartosz-Golaszewski/nvmem-rework-of-the-subsystem-for-non-DT-users/20180913-071053 > config: arm-sunxi_defconfig (attached as .config) > compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=7.2.0 make.cross ARCH=arm > > All warnings (new ones prefixed by >>): > > drivers/nvmem/sunxi_sid.c: In function 'sunxi_sid_probe': >>> drivers/nvmem/sunxi_sid.c:190:18: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion] > return PTR_ERR(-EINVAL); > ^ > In file included from include/linux/kernfs.h:11:0, > from include/linux/sysfs.h:16, > from include/linux/kobject.h:20, > from include/linux/device.h:16, > from drivers/nvmem/sunxi_sid.c:18: > include/linux/err.h:29:33: note: expected 'const void *' but argument is of type 'int' > static inline long __must_check PTR_ERR(__force const void *ptr) > ^~~~~~~ > drivers/nvmem/sunxi_sid.c:157:6: warning: unused variable 'ret' [-Wunused-variable] > int ret, i, size; > ^~~ > > vim +/PTR_ERR +190 drivers/nvmem/sunxi_sid.c > > 150 > 151 static int sunxi_sid_probe(struct platform_device *pdev) > 152 { > 153 struct device *dev = &pdev->dev; > 154 struct resource *res; > 155 struct nvmem_device *nvmem; > 156 struct sunxi_sid *sid; > 157 int ret, i, size; > 158 char *randomness; > 159 const struct sunxi_sid_cfg *cfg; > 160 > 161 sid = devm_kzalloc(dev, sizeof(*sid), GFP_KERNEL); > 162 if (!sid) > 163 return -ENOMEM; > 164 > 165 cfg = of_device_get_match_data(dev); > 166 if (!cfg) > 167 return -EINVAL; > 168 sid->value_offset = cfg->value_offset; > 169 > 170 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > 171 sid->base = devm_ioremap_resource(dev, res); > 172 if (IS_ERR(sid->base)) > 173 return PTR_ERR(sid->base); > 174 > 175 size = cfg->size; > 176 > 177 econfig.size = size; > 178 econfig.dev = dev; > 179 if (cfg->need_register_readout) > 180 econfig.reg_read = sun8i_sid_read_by_reg; > 181 else > 182 econfig.reg_read = sunxi_sid_read; > 183 econfig.priv = sid; > 184 nvmem = devm_nvmem_register(dev, &econfig); > 185 if (IS_ERR(nvmem)) > 186 return PTR_ERR(nvmem); > 187 > 188 randomness = kzalloc(size, GFP_KERNEL); > 189 if (!randomness) > > 190 return PTR_ERR(-EINVAL); Will fix in v4. I think this should also return -ENOMEM, not -EINVAL. Bart > 191 > 192 for (i = 0; i < size; i++) > 193 econfig.reg_read(sid, i, &randomness[i], 1); > 194 > 195 add_device_randomness(randomness, size); > 196 kfree(randomness); > 197 > 198 platform_set_drvdata(pdev, nvmem); > 199 > 200 return 0; > 201 } > 202 > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation
WARNING: multiple messages have this Message-ID (diff)
From: brgl@bgdev.pl (Bartosz Golaszewski) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 08/21] nvmem: sunxi_sid: use devm_nvmem_register() Date: Thu, 13 Sep 2018 10:39:48 +0200 [thread overview] Message-ID: <CAMRc=Med1gSg_ALsb_J2G5QXQ=438CiqG4GT-NYQT-uDF_cPHA@mail.gmail.com> (raw) In-Reply-To: <201809130920.Bfc949m8%fengguang.wu@intel.com> 2018-09-13 3:38 GMT+02:00 kbuild test robot <lkp@intel.com>: > Hi Bartosz, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v4.19-rc3 next-20180912] > [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/Bartosz-Golaszewski/nvmem-rework-of-the-subsystem-for-non-DT-users/20180913-071053 > config: arm-sunxi_defconfig (attached as .config) > compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=7.2.0 make.cross ARCH=arm > > All warnings (new ones prefixed by >>): > > drivers/nvmem/sunxi_sid.c: In function 'sunxi_sid_probe': >>> drivers/nvmem/sunxi_sid.c:190:18: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion] > return PTR_ERR(-EINVAL); > ^ > In file included from include/linux/kernfs.h:11:0, > from include/linux/sysfs.h:16, > from include/linux/kobject.h:20, > from include/linux/device.h:16, > from drivers/nvmem/sunxi_sid.c:18: > include/linux/err.h:29:33: note: expected 'const void *' but argument is of type 'int' > static inline long __must_check PTR_ERR(__force const void *ptr) > ^~~~~~~ > drivers/nvmem/sunxi_sid.c:157:6: warning: unused variable 'ret' [-Wunused-variable] > int ret, i, size; > ^~~ > > vim +/PTR_ERR +190 drivers/nvmem/sunxi_sid.c > > 150 > 151 static int sunxi_sid_probe(struct platform_device *pdev) > 152 { > 153 struct device *dev = &pdev->dev; > 154 struct resource *res; > 155 struct nvmem_device *nvmem; > 156 struct sunxi_sid *sid; > 157 int ret, i, size; > 158 char *randomness; > 159 const struct sunxi_sid_cfg *cfg; > 160 > 161 sid = devm_kzalloc(dev, sizeof(*sid), GFP_KERNEL); > 162 if (!sid) > 163 return -ENOMEM; > 164 > 165 cfg = of_device_get_match_data(dev); > 166 if (!cfg) > 167 return -EINVAL; > 168 sid->value_offset = cfg->value_offset; > 169 > 170 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > 171 sid->base = devm_ioremap_resource(dev, res); > 172 if (IS_ERR(sid->base)) > 173 return PTR_ERR(sid->base); > 174 > 175 size = cfg->size; > 176 > 177 econfig.size = size; > 178 econfig.dev = dev; > 179 if (cfg->need_register_readout) > 180 econfig.reg_read = sun8i_sid_read_by_reg; > 181 else > 182 econfig.reg_read = sunxi_sid_read; > 183 econfig.priv = sid; > 184 nvmem = devm_nvmem_register(dev, &econfig); > 185 if (IS_ERR(nvmem)) > 186 return PTR_ERR(nvmem); > 187 > 188 randomness = kzalloc(size, GFP_KERNEL); > 189 if (!randomness) > > 190 return PTR_ERR(-EINVAL); Will fix in v4. I think this should also return -ENOMEM, not -EINVAL. Bart > 191 > 192 for (i = 0; i < size; i++) > 193 econfig.reg_read(sid, i, &randomness[i], 1); > 194 > 195 add_device_randomness(randomness, size); > 196 kfree(randomness); > 197 > 198 platform_set_drvdata(pdev, nvmem); > 199 > 200 return 0; > 201 } > 202 > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation
next prev parent reply other threads:[~2018-09-13 8:39 UTC|newest] Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-09-12 7:51 [PATCH v3 00/21] nvmem: rework of the subsystem for non-DT users Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 01/21] nvmem: provide nvmem_dev_name() Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 02/21] nvmem: remove the name field from struct nvmem_device Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 03/21] nvmem: use list_for_each_entry_safe in nvmem_device_remove_all_cells() Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 04/21] nvmem: remove a stray newline Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 05/21] nvmem: check the return value of nvmem_add_cells() Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 06/21] nvmem: use kref Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 07/21] nvmem: lpc18xx_eeprom: use devm_nvmem_register() Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 08/21] nvmem: sunxi_sid: " Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-13 1:38 ` kbuild test robot 2018-09-13 1:38 ` kbuild test robot 2018-09-13 8:39 ` Bartosz Golaszewski [this message] 2018-09-13 8:39 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 09/21] nvmem: mxs-ocotp: " Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 10/21] nvmem: change the signature of nvmem_unregister() Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-13 0:34 ` kbuild test robot 2018-09-13 0:34 ` kbuild test robot 2018-09-13 1:46 ` kbuild test robot 2018-09-13 1:46 ` kbuild test robot 2018-09-12 7:51 ` [PATCH v3 11/21] nvmem: remove the global cell list Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 12/21] nvmem: add support for cell info Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 13/21] nvmem: resolve cells from DT at registration time Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 14/21] nvmem: add support for cell lookups from machine code Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 15/21] Documentation: nvmem: document cell tables and lookup entries Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 16/21] nvmem: add a notifier chain Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 9:33 ` Bartosz Golaszewski 2018-09-12 9:33 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 17/21] nvmem: use SPDX license identifiers Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 18/21] nvmem: make the naming of arguments in nvmem_cell_get() consistent Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 19/21] nvmem: use EOPNOTSUPP instead of ENOSYS Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 20/21] nvmem: fix commenting style Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-12 7:51 ` [PATCH v3 21/21] nvmem: use octal permissions instead of constants Bartosz Golaszewski 2018-09-12 7:51 ` Bartosz Golaszewski 2018-09-14 14:43 ` [PATCH v3 00/21] nvmem: rework of the subsystem for non-DT users Bartosz Golaszewski 2018-09-14 14:43 ` Bartosz Golaszewski
Reply instructions: You may reply publicly 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='CAMRc=Med1gSg_ALsb_J2G5QXQ=438CiqG4GT-NYQT-uDF_cPHA@mail.gmail.com' \ --to=brgl@bgdev.pl \ --cc=akpm@linux-foundation.org \ --cc=albeu@free.fr \ --cc=andrew@lunn.ch \ --cc=arnd@arndb.de \ --cc=bgolaszewski@baylibre.com \ --cc=boris.brezillon@bootlin.com \ --cc=corbet@lwn.net \ --cc=davem@davemloft.net \ --cc=david@lechnology.com \ --cc=gregkh@linuxfoundation.org \ --cc=kbuild-all@01.org \ --cc=khilman@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lkp@intel.com \ --cc=maxime.ripard@bootlin.com \ --cc=mchehab+samsung@kernel.org \ --cc=nsekhar@ti.com \ --cc=srinivas.kandagatla@linaro.org \ --cc=wens@csie.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.