All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sofus Forstreuter <sofus.c@icloud.com>
Cc: oe-kbuild-all@lists.linux.dev, Janne Grunau <j@jannau.net>
Subject: [asahilinux:bits/240-isp 95/96] drivers/media/platform/apple/msr/msr-hw.c:151:4: error: call to undeclared function 'readq_relaxed'; ISO C99 and later do not support implicit function declarations
Date: Tue, 17 Nov 2026 02:05:19 +0100	[thread overview]
Message-ID: <202611170137.AM1Btuwy-lkp@intel.com> (raw)

tree:   https://github.com/AsahiLinux/linux bits/240-isp
head:   41eeb3a08926fbe6037568be57148a360190fbe6
commit: c967c4f5b870c69ed8f3b064e2d53f9171ec93d4 [95/96] media: apple: add msr driver
config: hexagon-randconfig-2200-20261117 (https://download.01.org/0day-ci/archive/20261117/202611170137.AM1Btuwy-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261117/202611170137.AM1Btuwy-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/202611170137.AM1Btuwy-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/media/platform/apple/msr/msr-hw.c:151:4: error: call to undeclared function 'readq_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     151 |                         readq_relaxed(base + reg + i * 8));
         |                         ^
>> drivers/media/platform/apple/msr/msr-hw.c:151:4: warning: format specifies type 'unsigned long long' but the argument has type 'int' [-Wformat]
     150 |                 msr_dbg(2, ctx->msr, "%s[%d] dma:  %12llx\n", FRM_STR(frm), i,
         |                                                    ~~~~~~
         |                                                    %12x
     151 |                         readq_relaxed(base + reg + i * 8));
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/apple/msr/msr.h:116:50: note: expanded from macro 'msr_dbg'
     116 |         v4l2_dbg(level, debug, &(msr)->v4l2_dev, fmt, ##args)
         |                                                  ~~~    ^~~~
   include/media/v4l2-common.h:74:42: note: expanded from macro 'v4l2_dbg'
      74 |                         v4l2_printk(KERN_DEBUG, dev, fmt , ## arg);     \
         |                                                      ~~~      ^~~
   include/media/v4l2-common.h:58:44: note: expanded from macro 'v4l2_printk'
      58 |         printk(level "%s: " fmt, (dev)->name , ## arg)
         |                             ~~~                   ^~~
   include/linux/printk.h:511:60: note: expanded from macro 'printk'
     511 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:483:19: note: expanded from macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   drivers/media/platform/apple/msr/msr-hw.c:158:4: error: call to undeclared function 'readq_relaxed'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     158 |                         readq_relaxed(base + reg + i * 8));
         |                         ^
   drivers/media/platform/apple/msr/msr-hw.c:158:4: warning: format specifies type 'unsigned long long' but the argument has type 'int' [-Wformat]
     157 |                 msr_dbg(2, ctx->msr, "%s[%d] meta: %12llx\n", FRM_STR(frm), i,
         |                                                    ~~~~~~
         |                                                    %12x
     158 |                         readq_relaxed(base + reg + i * 8));
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/apple/msr/msr.h:116:50: note: expanded from macro 'msr_dbg'
     116 |         v4l2_dbg(level, debug, &(msr)->v4l2_dev, fmt, ##args)
         |                                                  ~~~    ^~~~
   include/media/v4l2-common.h:74:42: note: expanded from macro 'v4l2_dbg'
      74 |                         v4l2_printk(KERN_DEBUG, dev, fmt , ## arg);     \
         |                                                      ~~~      ^~~
   include/media/v4l2-common.h:58:44: note: expanded from macro 'v4l2_printk'
      58 |         printk(level "%s: " fmt, (dev)->name , ## arg)
         |                             ~~~                   ^~~
   include/linux/printk.h:511:60: note: expanded from macro 'printk'
     511 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:483:19: note: expanded from macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   2 warnings and 2 errors generated.


vim +/readq_relaxed +151 drivers/media/platform/apple/msr/msr-hw.c

   124	
   125	static void configure_fmt(struct msr_ctx *ctx, struct msr_vb_buffer *vb,
   126				  struct msr_frame *frm)
   127	{
   128		const struct msr_fmt *fmt = frm->fmt;
   129		void __iomem *base = ctx->msr->base;
   130		size_t reg = 0;
   131		int i;
   132	
   133		reg = IS_SRC(frm) ? 0x180 : 0x280;
   134		msr_writel(ctx, MSR_DMA_ALPHA(fmt->alpha) |
   135			   MSR_DMA_SUBSAMPLING(fmt->subsampling), reg);
   136		msr_dbg(2, ctx->msr, "%s: %x\n", FRM_STR(frm),
   137			readl_relaxed(base + reg));
   138	
   139		for (i = 0; i < MSR_MAX_PLANES; i++) {
   140			msr_writel(ctx, MSR_DMA_STORAGE(fmt->storage[i]),
   141				   reg + 4 + (i * 4));
   142			msr_dbg(2, ctx->msr, "%s[%d]: %05x\n", FRM_STR(frm), i,
   143				readl_relaxed(base + reg + 4 + (i * 4)));
   144		}
   145	
   146		/* XXX: can src have 4 planes? */
   147		reg = IS_SRC(frm) ? 0x198 : 0x290;
   148		for (i = 0; i < MSR_MAX_PLANES; i++) {
   149			msr_writeq(ctx, vb->dma_addrs[i], reg + i * 8);
   150			msr_dbg(2, ctx->msr, "%s[%d] dma:  %12llx\n", FRM_STR(frm), i,
 > 151				readq_relaxed(base + reg + i * 8));
   152		}
   153	
   154		reg = IS_SRC(frm) ? 0x1b8 : 0x2a8;
   155		for (i = 0; i < MSR_MAX_PLANES; i++) {
   156			msr_writeq(ctx, vb->dma_meta_addrs[i], reg + i * 8);
   157			msr_dbg(2, ctx->msr, "%s[%d] meta: %12llx\n", FRM_STR(frm), i,
   158				readq_relaxed(base + reg + i * 8));
   159		}
   160	
   161		reg = IS_SRC(frm) ? 0x1d8 : 0x2c0;
   162		for (i = 0; i < MSR_MAX_PLANES; i++)
   163			msr_writel(ctx, vb->stride[i], reg + i * 4);
   164	
   165		/* offsets? */
   166		reg = IS_SRC(frm) ? 0x1e8 : 0x2cc;
   167	
   168		/* component order, so hw can normalize */
   169		reg = IS_SRC(frm) ? 0x1f8 : 0x2d8;
   170		msr_writel(ctx, MSR_FMT_COMP0(fmt->comp_order[0]) |
   171				MSR_FMT_COMP1(fmt->comp_order[1]) |
   172				MSR_FMT_COMP2(fmt->comp_order[2]) |
   173				MSR_FMT_COMP3(fmt->comp_order[3]), reg);
   174	
   175		msr_writel(ctx, frm->pix.width, reg + 4);
   176		msr_writel(ctx, frm->pix.height, reg + 8);
   177	
   178		/* plane sizes */
   179		reg = IS_SRC(frm) ? 0x234 : 0x308;
   180		msr_writel(ctx, frm->pix.width, reg);
   181		msr_writel(ctx, frm->pix.width / frm->info->hdiv, reg + 4);
   182		msr_writel(ctx, frm->pix.width, reg + 8);
   183	
   184		reg = IS_SRC(frm) ? 0x244 : 0x314;
   185		msr_writel(ctx, frm->pix.height, reg);
   186		msr_writel(ctx, frm->pix.height / frm->info->vdiv, reg + 4);
   187		msr_writel(ctx, frm->pix.height, reg + 8);
   188	}
   189	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-11-17  1:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  1:05 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-17 12:23 [asahilinux:bits/240-isp 95/96] drivers/media/platform/apple/msr/msr-hw.c:151:4: error: call to undeclared function 'readq_relaxed'; ISO C99 and later do not support implicit function declarations kernel test robot

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=202611170137.AM1Btuwy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=j@jannau.net \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sofus.c@icloud.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.