From: kernel test robot <lkp@intel.com>
To: Frank van der Linden <fvdl@google.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 61/88] mm/cma.c:811: warning: Function parameter or struct member 'gfp' not described in '__cma_alloc'
Date: Fri, 31 Jan 2025 11:22:55 +0800 [thread overview]
Message-ID: <202501311137.rMiQNfi3-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: 495206a68b359eb6117d0860861578113bbb94e7
commit: 77cbd63e91fa6c5f6157a30e61a380b6c47c1443 [61/88] mm, cma: support multiple contiguous ranges, if requested
config: x86_64-buildonly-randconfig-001-20250131 (https://download.01.org/0day-ci/archive/20250131/202501311137.rMiQNfi3-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250131/202501311137.rMiQNfi3-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/202501311137.rMiQNfi3-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/cma.c:811: warning: Function parameter or struct member 'gfp' not described in '__cma_alloc'
>> mm/cma.c:811: warning: expecting prototype for cma_alloc(). Prototype was for __cma_alloc() instead
vim +811 mm/cma.c
798
799 /**
800 * cma_alloc() - allocate pages from contiguous area
801 * @cma: Contiguous memory region for which the allocation is performed.
802 * @count: Requested number of pages.
803 * @align: Requested alignment of pages (in PAGE_SIZE order).
804 * @no_warn: Avoid printing message about failed allocation
805 *
806 * This function allocates part of contiguous memory on specific
807 * contiguous memory area.
808 */
809 static struct page *__cma_alloc(struct cma *cma, unsigned long count,
810 unsigned int align, gfp_t gfp)
> 811 {
812 struct page *page = NULL;
813 int ret = -ENOMEM, r;
814 unsigned long i;
815 const char *name = cma ? cma->name : NULL;
816
817 trace_cma_alloc_start(name, count, align);
818
819 if (!cma || !cma->count)
820 return page;
821
822 pr_debug("%s(cma %p, name: %s, count %lu, align %d)\n", __func__,
823 (void *)cma, cma->name, count, align);
824
825 if (!count)
826 return page;
827
828 for (r = 0; r < cma->nranges; r++) {
829 page = NULL;
830
831 ret = cma_range_alloc(cma, &cma->ranges[r], count, align,
832 &page, gfp);
833 if (ret != -EBUSY || page)
834 break;
835 }
836
837 /*
838 * CMA can allocate multiple page blocks, which results in different
839 * blocks being marked with different tags. Reset the tags to ignore
840 * those page blocks.
841 */
842 if (page) {
843 for (i = 0; i < count; i++)
844 page_kasan_tag_reset(nth_page(page, i));
845 }
846
847 if (ret && !(gfp & __GFP_NOWARN)) {
848 pr_err_ratelimited("%s: %s: alloc failed, req-size: %lu pages, ret: %d\n",
849 __func__, cma->name, count, ret);
850 cma_debug_show_areas(cma);
851 }
852
853 pr_debug("%s(): returned %p\n", __func__, page);
854 trace_cma_alloc_finish(name, page ? page_to_pfn(page) : 0,
855 page, count, align, ret);
856 if (page) {
857 count_vm_event(CMA_ALLOC_SUCCESS);
858 cma_sysfs_account_success_pages(cma, count);
859 } else {
860 count_vm_event(CMA_ALLOC_FAIL);
861 cma_sysfs_account_fail_pages(cma, count);
862 }
863
864 return page;
865 }
866
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-01-31 3:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 3:22 kernel test robot [this message]
2025-01-31 18:37 ` Frank van der Linden
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=202501311137.rMiQNfi3-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=fvdl@google.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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