[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202207181758.YyEzUSPl-lkp@intel.com>
Date: Mon, 18 Jul 2022 16:21:15 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: kbuild@...ts.01.org, Li Chen <me@...ux.beauty>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: lkp@...el.com, kbuild-all@...ts.01.org,
Linux Memory Management List <linux-mm@...ck.org>,
Li Chen <lchen@...arella.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH 1/4] of: add struct page support to rmem
Hi Li,
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Li-Chen/add-struct-page-and-Direct-I-O-support-to-reserved-memory/20220711-202957
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: nios2-randconfig-m031-20220717 (https://download.01.org/0day-ci/archive/20220718/202207181758.YyEzUSPl-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
smatch warnings:
drivers/of/of_reserved_mem.c:472 get_reserved_mem_from_dev() error: passing non negative 22 to ERR_PTR
vim +472 drivers/of/of_reserved_mem.c
8b66b4b9614f1c7 Li Chen 2022-07-11 457 struct reserved_mem *get_reserved_mem_from_dev(struct device *dev)
8b66b4b9614f1c7 Li Chen 2022-07-11 458 {
8b66b4b9614f1c7 Li Chen 2022-07-11 459 struct device_node *np = dev_of_node(dev);
8b66b4b9614f1c7 Li Chen 2022-07-11 460 struct device_node *rmem_np;
8b66b4b9614f1c7 Li Chen 2022-07-11 461 struct reserved_mem *rmem = NULL;
8b66b4b9614f1c7 Li Chen 2022-07-11 462
8b66b4b9614f1c7 Li Chen 2022-07-11 463 rmem_np = of_parse_phandle(np, "memory-region", 0);
8b66b4b9614f1c7 Li Chen 2022-07-11 464 if (!rmem_np) {
8b66b4b9614f1c7 Li Chen 2022-07-11 465 dev_err(dev, "failed to get memory region node\n");
8b66b4b9614f1c7 Li Chen 2022-07-11 466 return ERR_PTR(-ENODEV);
8b66b4b9614f1c7 Li Chen 2022-07-11 467 }
8b66b4b9614f1c7 Li Chen 2022-07-11 468
8b66b4b9614f1c7 Li Chen 2022-07-11 469 rmem = of_reserved_mem_lookup(rmem_np);
8b66b4b9614f1c7 Li Chen 2022-07-11 470 if (!rmem) {
8b66b4b9614f1c7 Li Chen 2022-07-11 471 dev_err(dev, "Failed to lookup reserved memory\n");
8b66b4b9614f1c7 Li Chen 2022-07-11 @472 return ERR_PTR(EINVAL);
Missing - character on -EINVAL.
8b66b4b9614f1c7 Li Chen 2022-07-11 473 }
8b66b4b9614f1c7 Li Chen 2022-07-11 474 return rmem;
8b66b4b9614f1c7 Li Chen 2022-07-11 475 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists