From: kernel test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>, linux-acpi@vger.kernel.org
Cc: lorenzo.pieralisi@arm.com, kbuild-all@lists.01.org,
catalin.marinas@arm.com, rjw@rjwysocki.net, will@kernel.org,
Ard Biesheuvel <ardb@kernel.org>,
linux-arm-kernel@lists.infradead.org, lenb@kernel.org
Subject: Re: [PATCH] ACPI: ioremap: avoid redundant rounding to OS page size
Date: Tue, 18 Aug 2020 07:41:14 +0800 [thread overview]
Message-ID: <202008180720.k5D6gV3q%lkp@intel.com> (raw)
In-Reply-To: <20200817120431.32233-1-ardb@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3597 bytes --]
Hi Ard,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pm/linux-next]
[also build test WARNING on arm64/for-next/core arm/for-next soc/for-next v5.9-rc1 next-20200817]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/ACPI-ioremap-avoid-redundant-rounding-to-OS-page-size/20200817-200603
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-m021-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
drivers/acpi/osl.c:371 acpi_os_map_iomem() error: uninitialized symbol 'virt'.
# https://github.com/0day-ci/linux/commit/a34cc34917319aed90ebf9b0fbf4146666f5f75d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ard-Biesheuvel/ACPI-ioremap-avoid-redundant-rounding-to-OS-page-size/20200817-200603
git checkout a34cc34917319aed90ebf9b0fbf4146666f5f75d
vim +/virt +371 drivers/acpi/osl.c
308
309 /**
310 * acpi_os_map_iomem - Get a virtual address for a given physical address range.
311 * @phys: Start of the physical address range to map.
312 * @size: Size of the physical address range to map.
313 *
314 * Look up the given physical address range in the list of existing ACPI memory
315 * mappings. If found, get a reference to it and return a pointer to it (its
316 * virtual address). If not found, map it, add it to that list and return a
317 * pointer to it.
318 *
319 * During early init (when acpi_permanent_mmap has not been set yet) this
320 * routine simply calls __acpi_map_table() to get the job done.
321 */
322 void __iomem __ref
323 *acpi_os_map_iomem(acpi_physical_address phys, acpi_size size)
324 {
325 struct acpi_ioremap *map;
326 void __iomem *virt;
327 acpi_physical_address pg_off;
328 acpi_size pg_sz;
329
330 if (phys > ULONG_MAX) {
331 printk(KERN_ERR PREFIX "Cannot map memory that high\n");
332 return NULL;
333 }
334
335 if (!acpi_permanent_mmap)
336 return __acpi_map_table((unsigned long)phys, size);
337
338 mutex_lock(&acpi_ioremap_lock);
339 /* Check if there's a suitable mapping already. */
340 map = acpi_map_lookup(phys, size);
341 if (map) {
342 map->track.refcount++;
343 goto out;
344 }
345
346 map = kzalloc(sizeof(*map), GFP_KERNEL);
347 if (!map) {
348 mutex_unlock(&acpi_ioremap_lock);
349 return NULL;
350 }
351
352 pg_off = round_down(phys, PAGE_SIZE);
353 pg_sz = round_up(phys + size, PAGE_SIZE) - pg_off;
354 virt = acpi_map(phys, size);
355 if (!virt) {
356 mutex_unlock(&acpi_ioremap_lock);
357 kfree(map);
358 return NULL;
359 }
360
361 INIT_LIST_HEAD(&map->list);
362 map->virt = (void *)((unsigned long)virt & PAGE_MASK);
363 map->phys = pg_off;
364 map->size = pg_sz;
365 map->track.refcount = 1;
366
367 list_add_tail_rcu(&map->list, &acpi_ioremaps);
368
369 out:
370 mutex_unlock(&acpi_ioremap_lock);
> 371 return virt;
372 }
373 EXPORT_SYMBOL_GPL(acpi_os_map_iomem);
374
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35926 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-08-17 23:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 12:04 [PATCH] ACPI: ioremap: avoid redundant rounding to OS page size Ard Biesheuvel
2020-08-17 12:40 ` Christoph Hellwig
2020-08-17 12:59 ` Ard Biesheuvel
2020-08-17 16:30 ` kernel test robot
2020-08-17 17:06 ` kernel test robot
2020-08-17 23:41 ` kernel test robot [this message]
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=202008180720.k5D6gV3q%lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kbuild-all@lists.01.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=rjw@rjwysocki.net \
--cc=will@kernel.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
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;
as well as URLs for NNTP newsgroup(s).