[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212131943.6HIgOU7y-lkp@intel.com>
Date: Tue, 13 Dec 2022 20:03:48 +0800
From: kernel test robot <lkp@...el.com>
To: Kefeng Wang <wangkefeng.wang@...wei.com>,
Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Oscar Salvador <osalvador@...e.de>,
SeongJae Park <sj@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev,
Linux Memory Management List <linux-mm@...ck.org>,
linux-kernel@...r.kernel.org, damon@...ts.linux.dev,
vishal.moola@...il.com, willy@...radead.org,
Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: Re: [PATCH -next 1/8] mm: memory_hotplug: add pfn_to_online_folio()
Hi Kefeng,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.1]
[cannot apply to akpm-mm/mm-everything next-20221213]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Kefeng-Wang/mm-converted-page-idle-and-damon-to-use-folios/20221213-171230
patch link: https://lore.kernel.org/r/20221213092735.187924-2-wangkefeng.wang%40huawei.com
patch subject: [PATCH -next 1/8] mm: memory_hotplug: add pfn_to_online_folio()
config: sparc-allyesconfig
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/6549c7ce5345695320d1dadef2aceff6e76d34f4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Kefeng-Wang/mm-converted-page-idle-and-damon-to-use-folios/20221213-171230
git checkout 6549c7ce5345695320d1dadef2aceff6e76d34f4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/media/usb/cx231xx/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/mmzone.h:1245,
from include/linux/gfp.h:7,
from include/linux/xarray.h:15,
from include/linux/radix-tree.h:21,
from include/linux/idr.h:15,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:36,
from include/linux/acpi.h:13,
from include/linux/i2c.h:13,
from drivers/media/usb/cx231xx/cx231xx.h:16,
from drivers/media/usb/cx231xx/cx231xx-audio.c:9:
include/linux/memory_hotplug.h: In function 'pfn_to_online_folio':
include/linux/memory_hotplug.h:230:13: error: implicit declaration of function 'pfn_valid' [-Werror=implicit-function-declaration]
230 | if (pfn_valid(pfn)) \
| ^~~~~~~~~
include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page'
270 | struct page *page = pfn_to_online_page(pfn);
| ^~~~~~~~~~~~~~~~~~
In file included from arch/sparc/include/asm/page_64.h:130,
from arch/sparc/include/asm/page.h:8,
from arch/sparc/include/asm/thread_info_64.h:27,
from arch/sparc/include/asm/thread_info.h:5,
from include/linux/thread_info.h:60,
from arch/sparc/include/asm/current.h:15,
from include/linux/mutex.h:14,
from include/linux/kernfs.h:11:
include/asm-generic/memory_model.h:25:34: error: 'vmemmap' undeclared (first use in this function); did you mean 'mem_map'?
25 | #define __pfn_to_page(pfn) (vmemmap + (pfn))
| ^~~~~~~
include/asm-generic/memory_model.h:53:21: note: in expansion of macro '__pfn_to_page'
53 | #define pfn_to_page __pfn_to_page
| ^~~~~~~~~~~~~
include/linux/memory_hotplug.h:231:27: note: in expansion of macro 'pfn_to_page'
231 | ___page = pfn_to_page(pfn); \
| ^~~~~~~~~~~
include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page'
270 | struct page *page = pfn_to_online_page(pfn);
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:25:34: note: each undeclared identifier is reported only once for each function it appears in
25 | #define __pfn_to_page(pfn) (vmemmap + (pfn))
| ^~~~~~~
include/asm-generic/memory_model.h:53:21: note: in expansion of macro '__pfn_to_page'
53 | #define pfn_to_page __pfn_to_page
| ^~~~~~~~~~~~~
include/linux/memory_hotplug.h:231:27: note: in expansion of macro 'pfn_to_page'
231 | ___page = pfn_to_page(pfn); \
| ^~~~~~~~~~~
include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page'
270 | struct page *page = pfn_to_online_page(pfn);
| ^~~~~~~~~~~~~~~~~~
include/linux/mmzone.h: At top level:
include/linux/mmzone.h:1839:19: error: static declaration of 'pfn_valid' follows non-static declaration
1839 | static inline int pfn_valid(unsigned long pfn)
| ^~~~~~~~~
include/linux/memory_hotplug.h:230:13: note: previous implicit declaration of 'pfn_valid' with type 'int()'
230 | if (pfn_valid(pfn)) \
| ^~~~~~~~~
include/linux/memory_hotplug.h:270:29: note: in expansion of macro 'pfn_to_online_page'
270 | struct page *page = pfn_to_online_page(pfn);
| ^~~~~~~~~~~~~~~~~~
drivers/media/usb/cx231xx/cx231xx-audio.c: In function 'cx231xx_audio_init':
>> drivers/media/usb/cx231xx/cx231xx-audio.c:564:20: warning: variable 'devnr' set but not used [-Wunused-but-set-variable]
564 | static int devnr;
| ^~~~~
drivers/media/usb/cx231xx/cx231xx-audio.c: At top level:
drivers/media/usb/cx231xx/cx231xx-audio.c:29:12: warning: 'index' defined but not used [-Wunused-variable]
29 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
| ^~~~~
cc1: some warnings being treated as errors
vim +/devnr +564 drivers/media/usb/cx231xx/cx231xx-audio.c
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 558
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 559 static int cx231xx_audio_init(struct cx231xx *dev)
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 560 {
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 561 struct cx231xx_audio *adev = &dev->adev;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 562 struct snd_pcm *pcm;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 563 struct snd_card *card;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 @564 static int devnr;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 565 int err;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 566 struct usb_interface *uif;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 567 int i, isoc_pipe = 0;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 568
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 569 if (dev->has_alsa_audio != 1) {
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 570 /* This device does not support the extension (in this case
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 571 the device is expecting the snd-usb-audio module or
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 572 doesn't have analog audio support at all) */
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 573 return 0;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 574 }
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 575
336fea922936c1 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2014-11-03 576 dev_dbg(dev->dev,
b7085c08647598 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2014-11-02 577 "probing for cx231xx non standard usbaudio\n");
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 578
336fea922936c1 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2014-11-03 579 err = snd_card_new(dev->dev, index[devnr], "Cx231xx Audio",
e735688875208f drivers/media/usb/cx231xx/cx231xx-audio.c Takashi Iwai 2014-01-29 580 THIS_MODULE, 0, &card);
a938b8c5be8fe5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-04-06 581 if (err < 0)
a938b8c5be8fe5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-04-06 582 return err;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 583
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 584 spin_lock_init(&adev->slock);
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 585 err = snd_pcm_new(card, "Cx231xx Audio", 0, 0, 1, &pcm);
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 586 if (err < 0)
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 587 goto err_free_card;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 588
84b5dbf39ed2f5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-03-03 589 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
84b5dbf39ed2f5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-03-03 590 &snd_cx231xx_pcm_capture);
355b9a0c585669 drivers/media/usb/cx231xx/cx231xx-audio.c Takashi Iwai 2019-12-10 591 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_VMALLOC, NULL, 0, 0);
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 592 pcm->info_flags = 0;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 593 pcm->private_data = dev;
cc1e6315e83db0 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2018-09-10 594 strscpy(pcm->name, "Conexant cx231xx Capture", sizeof(pcm->name));
cc1e6315e83db0 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2018-09-10 595 strscpy(card->driver, "Cx231xx-Audio", sizeof(card->driver));
cc1e6315e83db0 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2018-09-10 596 strscpy(card->shortname, "Cx231xx Audio", sizeof(card->shortname));
cc1e6315e83db0 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2018-09-10 597 strscpy(card->longname, "Conexant cx231xx Audio", sizeof(card->longname));
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 598
61b04cb24a129f drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2010-09-27 599 INIT_WORK(&dev->wq_trigger, audio_trigger);
61b04cb24a129f drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2010-09-27 600
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 601 err = snd_card_register(card);
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 602 if (err < 0)
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 603 goto err_free_card;
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 604
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 605 adev->sndcard = card;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 606 adev->udev = dev->udev;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 607
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 608 /* compute alternate max packet sizes for Audio */
84b5dbf39ed2f5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-03-03 609 uif =
84b5dbf39ed2f5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-03-03 610 dev->udev->actconfig->interface[dev->current_pcb_config.
84b5dbf39ed2f5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-03-03 611 hs_config_info[0].interface_info.
84b5dbf39ed2f5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-03-03 612 audio_index + 1];
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 613
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 614 if (uif->altsetting[0].desc.bNumEndpoints < isoc_pipe + 1) {
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 615 err = -ENODEV;
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 616 goto err_free_card;
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 617 }
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 618
84b5dbf39ed2f5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-03-03 619 adev->end_point_addr =
69a11a32643bda drivers/media/usb/cx231xx/cx231xx-audio.c Hans Verkuil 2013-02-07 620 uif->altsetting[0].endpoint[isoc_pipe].desc.
69a11a32643bda drivers/media/usb/cx231xx/cx231xx-audio.c Hans Verkuil 2013-02-07 621 bEndpointAddress;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 622
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 623 adev->num_alt = uif->num_altsetting;
336fea922936c1 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2014-11-03 624 dev_info(dev->dev,
b7085c08647598 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2014-11-02 625 "audio EndPoint Addr 0x%x, Alternate settings: %i\n",
84b5dbf39ed2f5 drivers/media/video/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2009-03-03 626 adev->end_point_addr, adev->num_alt);
6da2ec56059c3c drivers/media/usb/cx231xx/cx231xx-audio.c Kees Cook 2018-06-12 627 adev->alt_max_pkt_size = kmalloc_array(32, adev->num_alt, GFP_KERNEL);
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 628 if (!adev->alt_max_pkt_size) {
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 629 err = -ENOMEM;
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 630 goto err_free_card;
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 631 }
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 632
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 633 for (i = 0; i < adev->num_alt; i++) {
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 634 u16 tmp;
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 635
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 636 if (uif->altsetting[i].desc.bNumEndpoints < isoc_pipe + 1) {
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 637 err = -ENODEV;
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 638 goto err_free_pkt_size;
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 639 }
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 640
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 641 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 642 wMaxPacketSize);
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 643 adev->alt_max_pkt_size[i] =
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 644 (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1);
336fea922936c1 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2014-11-03 645 dev_dbg(dev->dev,
b7085c08647598 drivers/media/usb/cx231xx/cx231xx-audio.c Mauro Carvalho Chehab 2014-11-02 646 "audio alternate setting %i, max size= %i\n", i,
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 647 adev->alt_max_pkt_size[i]);
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 648 }
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 649
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 650 return 0;
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 651
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 652 err_free_pkt_size:
65f921647f4c89 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 653 kfree(adev->alt_max_pkt_size);
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 654 err_free_card:
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 655 snd_card_free(card);
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 656
fff1abc4d54e46 drivers/media/usb/cx231xx/cx231xx-audio.c Johan Hovold 2017-03-13 657 return err;
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 658 }
e0d3bafd02586c drivers/media/video/cx231xx/cx231xx-audio.c Sri Deevi 2009-03-03 659
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (322291 bytes)
Powered by blists - more mailing lists