From: kernel test robot <lkp@intel.com>
To: =?unknown-8bit?B?VGjDqW8=?= Lebrun <theo.lebrun@bootlin.com>,
"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Nicolas Saenz Julienne" <nsaenz@kernel.org>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>
Cc: oe-kbuild-all@lists.linux.dev, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
=?unknown-8bit?Q?Gr=C3=A9gory?= Clement
<gregory.clement@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
=?unknown-8bit?B?VGjDqW8=?= Lebrun <theo.lebrun@bootlin.com>
Subject: Re: [PATCH 5/6] nvmem: rmem: add CRC validation for Mobileye EyeQ5 NVMEM
Date: Wed, 4 Dec 2024 15:58:08 +0800 [thread overview]
Message-ID: <202412041522.01H5Kj6F-lkp@intel.com> (raw)
In-Reply-To: <20241203-rmem-v1-5-24f4970cf14e@bootlin.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 3674 bytes --]
Hi Théo,
kernel test robot noticed the following build errors:
[auto build test ERROR on 40384c840ea1944d7c5a392e8975ed088ecf0b37]
url: https://github.com/intel-lab-lkp/linux/commits/Th-o-Lebrun/dt-bindings-nvmem-rmem-Add-mobileye-eyeq5-bootloader-config/20241204-103417
base: 40384c840ea1944d7c5a392e8975ed088ecf0b37
patch link: https://lore.kernel.org/r/20241203-rmem-v1-5-24f4970cf14e%40bootlin.com
patch subject: [PATCH 5/6] nvmem: rmem: add CRC validation for Mobileye EyeQ5 NVMEM
config: arm-randconfig-002 (https://download.01.org/0day-ci/archive/20241204/202412041522.01H5Kj6F-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041522.01H5Kj6F-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412041522.01H5Kj6F-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/nvmem/rmem.c: In function 'rmem_eyeq5_checksum':
drivers/nvmem/rmem.c:66:9: error: cleanup argument not a function
66 | void *buf __free(kfree) = NULL;
| ^~~~
drivers/nvmem/rmem.c:97:15: error: implicit declaration of function 'kmalloc'; did you mean 'mm_alloc'? [-Wimplicit-function-declaration]
97 | buf = kmalloc(header.size, GFP_KERNEL);
| ^~~~~~~
| mm_alloc
>> drivers/nvmem/rmem.c:97:13: error: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
97 | buf = kmalloc(header.size, GFP_KERNEL);
| ^
vim +97 drivers/nvmem/rmem.c
62
63 static int rmem_eyeq5_checksum(struct rmem *priv)
64 {
65 struct rmem_eyeq5_header header;
66 void *buf __free(kfree) = NULL;
67 u32 computed_crc, *target_crc;
68 size_t data_size;
69 int ret;
70
71 ret = rmem_read(priv, 0, &header, sizeof(header));
72 if (ret)
73 return ret;
74
75 if (header.magic != RMEM_EYEQ5_MAGIC)
76 return -EINVAL;
77
78 /*
79 * Avoid massive kmalloc() if header read is invalid;
80 * the check would be done by the next rmem_read() anyway.
81 */
82 if (header.size > priv->mem->size)
83 return -EINVAL;
84
85 /*
86 * 0 +-------------------+
87 * | Header (12 bytes) | \
88 * +-------------------+ |
89 * | | | data to be CRCed
90 * | ... | |
91 * | | /
92 * data_size +-------------------+
93 * | CRC (4 bytes) |
94 * header.size +-------------------+
95 */
96
> 97 buf = kmalloc(header.size, GFP_KERNEL);
98 if (!buf)
99 return -ENOMEM;
100
101 ret = rmem_read(priv, 0, buf, header.size);
102 if (ret)
103 return ret;
104
105 data_size = header.size - sizeof(*target_crc);
106 target_crc = buf + data_size;
107 computed_crc = crc32(U32_MAX, buf, data_size) ^ U32_MAX;
108
109 if (computed_crc == *target_crc)
110 return 0;
111
112 dev_err(priv->dev,
113 "checksum failed: computed %#x, expected %#x, header (%#x, %#x, %#x)\n",
114 computed_crc, *target_crc, header.magic, header.version, header.size);
115 return -EINVAL;
116 }
117
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-04 7:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 13:55 [PATCH 0/6] nvmem: rmem: cleanup & add checksumming support for Mobileye EyeQ5 Théo Lebrun
2024-12-03 13:55 ` [PATCH 1/6] dt-bindings: nvmem: rmem: Add mobileye,eyeq5-bootloader-config Théo Lebrun
2024-12-04 15:08 ` Rob Herring (Arm)
2024-12-03 13:55 ` [PATCH 2/6] nvmem: specify ->reg_read/reg_write() expected return values Théo Lebrun
2024-12-03 13:55 ` [PATCH 3/6] nvmem: rmem: make ->reg_read() straight forward code Théo Lebrun
2024-12-03 13:55 ` [PATCH 4/6] nvmem: rmem: remove unused struct rmem::size field Théo Lebrun
2024-12-03 13:55 ` [PATCH 5/6] nvmem: rmem: add CRC validation for Mobileye EyeQ5 NVMEM Théo Lebrun
2024-12-04 7:58 ` kernel test robot [this message]
2024-12-04 17:04 ` Théo Lebrun
2024-12-04 8:29 ` kernel test robot
2024-12-03 13:55 ` [PATCH 6/6] MIPS: mobileye: eyeq5: add bootloader config reserved memory Théo Lebrun
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=202412041522.01H5Kj6F-lkp@intel.com \
--to=lkp@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=nsaenz@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tawfik.bayouk@mobileye.com \
--cc=theo.lebrun@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=tsbogend@alpha.franken.de \
--cc=vladimir.kondratiev@mobileye.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®