From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [akpm-mm:mm-unstable 146/165] drivers/video/fbdev/core/fb_defio.c:272:17: error: implicit declaration of function 'mapping_wrprotect_range'
Date: Sat, 8 Feb 2025 09:37:50 +0000 [thread overview]
Message-ID: <e4605df9-3b32-4d9b-af71-87698087b2af@lucifer.local> (raw)
In-Reply-To: <202502081235.v7ook2My-lkp@intel.com>
On Sat, Feb 08, 2025 at 01:05:41PM +0800, kernel test robot wrote:
> Hi Lorenzo,
Thanks for the report!
>
> FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head: 8bf30f9d23eb5040d37e6e712789cee8e71e1577
> commit: 85d65aec481df149bc5280cf1ad5f9b76f59f153 [146/165] fb_defio: do not use deprecated page->mapping, index fields
> config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20250208/202502081235.v7ook2My-lkp@intel.com/config)
> compiler: sh4-linux-gcc (GCC) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250208/202502081235.v7ook2My-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/202502081235.v7ook2My-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> drivers/video/fbdev/core/fb_defio.c: In function 'fb_deferred_io_fault':
> drivers/video/fbdev/core/fb_defio.c:136:48: error: macro "fb_err" requires 3 arguments, but only 1 given
> 136 | fb_err("no mapping available\n");
> | ^
> In file included from drivers/video/fbdev/core/fb_defio.c:19:
> include/linux/fb.h:887:9: note: macro "fb_err" defined here
> 887 | #define fb_err(fb_info, fmt, ...) \
> | ^~~~~~
> drivers/video/fbdev/core/fb_defio.c:136:17: error: 'fb_err' undeclared (first use in this function); did you mean 'xa_err'?
> 136 | fb_err("no mapping available\n");
My bad, I will fix this up.
> | ^~~~~~
> | xa_err
> drivers/video/fbdev/core/fb_defio.c:136:17: note: each undeclared identifier is reported only once for each function it appears in
> drivers/video/fbdev/core/fb_defio.c: In function 'fb_deferred_io_work':
> >> drivers/video/fbdev/core/fb_defio.c:272:17: error: implicit declaration of function 'mapping_wrprotect_range' [-Wimplicit-function-declaration]
> 272 | mapping_wrprotect_range(fbdefio->mapping, pgoff,
> | ^~~~~~~~~~~~~~~~~~~~~~~
>
> Kconfig warnings: (for reference only)
> WARNING: unmet direct dependencies detected for FB_DEFERRED_IO
> Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=m] && MMU [=n]
> Selected by [m]:
> - FB_SH_MOBILE_LCDC [=m] && FB [=m] && HAVE_CLK [=y] && HAS_IOMEM [=y] && (SUPERH [=y] || COMPILE_TEST [=y]) && FB_DEVICE [=y] && BACKLIGHT_CLASS_DEVICE [=m]
> - FB_SYSMEM_HELPERS_DEFERRED [=y] && HAS_IOMEM [=y] && FB_CORE [=m]
OK I think on reflection I probably have to propagate this requirement to
all instances of "select FB_DEFERRED_IO" configs, I had assumed that
Kconfig would figure this out but I guess not :)
>
>
> vim +/mapping_wrprotect_range +272 drivers/video/fbdev/core/fb_defio.c
>
> 258
> 259 /* workqueue callback */
> 260 static void fb_deferred_io_work(struct work_struct *work)
> 261 {
> 262 struct fb_info *info = container_of(work, struct fb_info, deferred_work.work);
> 263 struct fb_deferred_io_pageref *pageref, *next;
> 264 struct fb_deferred_io *fbdefio = info->fbdefio;
> 265
> 266 /* here we wrprotect the page's mappings, then do all deferred IO. */
> 267 mutex_lock(&fbdefio->lock);
> 268 list_for_each_entry(pageref, &fbdefio->pagereflist, list) {
> 269 struct page *page = pageref->page;
> 270 pgoff_t pgoff = pageref->offset >> PAGE_SHIFT;
> 271
> > 272 mapping_wrprotect_range(fbdefio->mapping, pgoff,
> 273 page_to_pfn(page), 1);
> 274 }
> 275
> 276 /* driver's callback with pagereflist */
> 277 fbdefio->deferred_io(info, &fbdefio->pagereflist);
> 278
> 279 /* clear the list */
> 280 list_for_each_entry_safe(pageref, next, &fbdefio->pagereflist, list)
> 281 fb_deferred_io_pageref_put(pageref, info);
> 282
> 283 mutex_unlock(&fbdefio->lock);
> 284 }
> 285
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
I will probably do a respin of the series to make all this easier.
prev parent reply other threads:[~2025-02-08 9:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-08 5:05 kernel test robot
2025-02-08 9:37 ` Lorenzo Stoakes [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=e4605df9-3b32-4d9b-af71-87698087b2af@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--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