* drivers/tty/mips_ejtag_fdc.c:343:32: error: incompatible pointer types passing 'const char **' to parameter of type 'const u8 **' (aka 'const unsigned char **')
@ 2024-09-11 6:33 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2024-09-11 6:33 UTC (permalink / raw)
To: Jiri Slaby (SUSE); +Cc: oe-kbuild-all, linux-kernel
Hi Jiri,
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/torvalds/linux.git master
head: 8d8d276ba2fb5f9ac4984f5c10ae60858090babc
commit: ce7cbd9a6c81b5fc899bbc730072a1bddeae5d0d tty: mips_ejtag_fdc: use u8 for character pointers
date: 9 months ago
config: mips-randconfig-r051-20240911 (https://download.01.org/0day-ci/archive/20240911/202409111435.RTzhB8Te-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240911/202409111435.RTzhB8Te-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/202409111435.RTzhB8Te-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/tty/mips_ejtag_fdc.c:343:32: error: incompatible pointer types passing 'const char **' to parameter of type 'const u8 **' (aka 'const unsigned char **') [-Werror,-Wincompatible-pointer-types]
word = mips_ejtag_fdc_encode(&buf_ptr, &buf_len, 1);
^~~~~~~~
drivers/tty/mips_ejtag_fdc.c:216:57: note: passing argument to parameter 'ptrs' here
static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs,
^
drivers/tty/mips_ejtag_fdc.c:1224:31: error: incompatible pointer types passing 'const char *[1]' to parameter of type 'const u8 **' (aka 'const unsigned char **') [-Werror,-Wincompatible-pointer-types]
word = mips_ejtag_fdc_encode(bufs, &kgdbfdc_wbuflen, 1);
^~~~
drivers/tty/mips_ejtag_fdc.c:216:57: note: passing argument to parameter 'ptrs' here
static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs,
^
2 errors generated.
vim +343 drivers/tty/mips_ejtag_fdc.c
4cebec609aea6df James Hogan 2015-01-29 299
4cebec609aea6df James Hogan 2015-01-29 300 /* Low level console write shared by early console and normal console */
4cebec609aea6df James Hogan 2015-01-29 301 static void mips_ejtag_fdc_console_write(struct console *c, const char *s,
4cebec609aea6df James Hogan 2015-01-29 302 unsigned int count)
4cebec609aea6df James Hogan 2015-01-29 303 {
4cebec609aea6df James Hogan 2015-01-29 304 struct mips_ejtag_fdc_console *cons =
4cebec609aea6df James Hogan 2015-01-29 305 container_of(c, struct mips_ejtag_fdc_console, cons);
4cebec609aea6df James Hogan 2015-01-29 306 void __iomem *regs;
4cebec609aea6df James Hogan 2015-01-29 307 struct fdc_word word;
4cebec609aea6df James Hogan 2015-01-29 308 unsigned long flags;
4cebec609aea6df James Hogan 2015-01-29 309 unsigned int i, buf_len, cpu;
4cebec609aea6df James Hogan 2015-01-29 310 bool done_cr = false;
4cebec609aea6df James Hogan 2015-01-29 311 char buf[4];
4cebec609aea6df James Hogan 2015-01-29 312 const char *buf_ptr = buf;
4cebec609aea6df James Hogan 2015-01-29 313 /* Number of bytes of input data encoded up to each byte in buf */
4cebec609aea6df James Hogan 2015-01-29 314 u8 inc[4];
4cebec609aea6df James Hogan 2015-01-29 315
4cebec609aea6df James Hogan 2015-01-29 316 local_irq_save(flags);
4cebec609aea6df James Hogan 2015-01-29 317 cpu = smp_processor_id();
4cebec609aea6df James Hogan 2015-01-29 318 regs = cons->regs[cpu];
4cebec609aea6df James Hogan 2015-01-29 319 /* First console output on this CPU? */
4cebec609aea6df James Hogan 2015-01-29 320 if (!regs) {
4cebec609aea6df James Hogan 2015-01-29 321 regs = mips_cdmm_early_probe(0xfd);
4cebec609aea6df James Hogan 2015-01-29 322 cons->regs[cpu] = regs;
4cebec609aea6df James Hogan 2015-01-29 323 }
4cebec609aea6df James Hogan 2015-01-29 324 /* Already tried and failed to find FDC on this CPU? */
4cebec609aea6df James Hogan 2015-01-29 325 if (IS_ERR(regs))
4cebec609aea6df James Hogan 2015-01-29 326 goto out;
4cebec609aea6df James Hogan 2015-01-29 327 while (count) {
4cebec609aea6df James Hogan 2015-01-29 328 /*
4cebec609aea6df James Hogan 2015-01-29 329 * Copy the next few characters to a buffer so we can inject
4cebec609aea6df James Hogan 2015-01-29 330 * carriage returns before newlines.
4cebec609aea6df James Hogan 2015-01-29 331 */
4cebec609aea6df James Hogan 2015-01-29 332 for (buf_len = 0, i = 0; buf_len < 4 && i < count; ++buf_len) {
4cebec609aea6df James Hogan 2015-01-29 333 if (s[i] == '\n' && !done_cr) {
4cebec609aea6df James Hogan 2015-01-29 334 buf[buf_len] = '\r';
4cebec609aea6df James Hogan 2015-01-29 335 done_cr = true;
4cebec609aea6df James Hogan 2015-01-29 336 } else {
4cebec609aea6df James Hogan 2015-01-29 337 buf[buf_len] = s[i];
4cebec609aea6df James Hogan 2015-01-29 338 done_cr = false;
4cebec609aea6df James Hogan 2015-01-29 339 ++i;
4cebec609aea6df James Hogan 2015-01-29 340 }
4cebec609aea6df James Hogan 2015-01-29 341 inc[buf_len] = i;
4cebec609aea6df James Hogan 2015-01-29 342 }
4cebec609aea6df James Hogan 2015-01-29 @343 word = mips_ejtag_fdc_encode(&buf_ptr, &buf_len, 1);
4cebec609aea6df James Hogan 2015-01-29 344 count -= inc[word.bytes - 1];
4cebec609aea6df James Hogan 2015-01-29 345 s += inc[word.bytes - 1];
4cebec609aea6df James Hogan 2015-01-29 346
4cebec609aea6df James Hogan 2015-01-29 347 /* Busy wait until there's space in fifo */
70f041b6e1ff508 James Hogan 2015-04-28 348 while (__raw_readl(regs + REG_FDSTAT) & REG_FDSTAT_TXF)
4cebec609aea6df James Hogan 2015-01-29 349 ;
70f041b6e1ff508 James Hogan 2015-04-28 350 __raw_writel(word.word, regs + REG_FDTX(c->index));
4cebec609aea6df James Hogan 2015-01-29 351 }
4cebec609aea6df James Hogan 2015-01-29 352 out:
4cebec609aea6df James Hogan 2015-01-29 353 local_irq_restore(flags);
4cebec609aea6df James Hogan 2015-01-29 354 }
4cebec609aea6df James Hogan 2015-01-29 355
:::::: The code at line 343 was first introduced by commit
:::::: 4cebec609aea6dff23e67a42b6516d852fa87d07 TTY: Add MIPS EJTAG Fast Debug Channel TTY driver
:::::: TO: James Hogan <james.hogan@imgtec.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* drivers/tty/mips_ejtag_fdc.c:343:32: error: incompatible pointer types passing 'const char **' to parameter of type 'const u8 **' (aka 'const unsigned char **')
@ 2025-01-10 5:41 kernel test robot
2025-01-10 6:59 ` Jiri Slaby
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2025-01-10 5:41 UTC (permalink / raw)
To: Jiri Slaby (SUSE); +Cc: oe-kbuild-all, linux-kernel
Hi Jiri,
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/torvalds/linux.git master
head: 2144da25584eb10b84252230319b5783f6a83041
commit: ce7cbd9a6c81b5fc899bbc730072a1bddeae5d0d tty: mips_ejtag_fdc: use u8 for character pointers
date: 1 year, 1 month ago
config: mips-randconfig-r054-20250110 (https://download.01.org/0day-ci/archive/20250110/202501101327.oGdWbmuk-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250110/202501101327.oGdWbmuk-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/202501101327.oGdWbmuk-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/tty/mips_ejtag_fdc.c:343:32: error: incompatible pointer types passing 'const char **' to parameter of type 'const u8 **' (aka 'const unsigned char **') [-Werror,-Wincompatible-pointer-types]
343 | word = mips_ejtag_fdc_encode(&buf_ptr, &buf_len, 1);
| ^~~~~~~~
drivers/tty/mips_ejtag_fdc.c:216:57: note: passing argument to parameter 'ptrs' here
216 | static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs,
| ^
drivers/tty/mips_ejtag_fdc.c:1224:31: error: incompatible pointer types passing 'const char *[1]' to parameter of type 'const u8 **' (aka 'const unsigned char **') [-Werror,-Wincompatible-pointer-types]
1224 | word = mips_ejtag_fdc_encode(bufs, &kgdbfdc_wbuflen, 1);
| ^~~~
drivers/tty/mips_ejtag_fdc.c:216:57: note: passing argument to parameter 'ptrs' here
216 | static struct fdc_word mips_ejtag_fdc_encode(const u8 **ptrs,
| ^
2 errors generated.
vim +343 drivers/tty/mips_ejtag_fdc.c
4cebec609aea6d James Hogan 2015-01-29 299
4cebec609aea6d James Hogan 2015-01-29 300 /* Low level console write shared by early console and normal console */
4cebec609aea6d James Hogan 2015-01-29 301 static void mips_ejtag_fdc_console_write(struct console *c, const char *s,
4cebec609aea6d James Hogan 2015-01-29 302 unsigned int count)
4cebec609aea6d James Hogan 2015-01-29 303 {
4cebec609aea6d James Hogan 2015-01-29 304 struct mips_ejtag_fdc_console *cons =
4cebec609aea6d James Hogan 2015-01-29 305 container_of(c, struct mips_ejtag_fdc_console, cons);
4cebec609aea6d James Hogan 2015-01-29 306 void __iomem *regs;
4cebec609aea6d James Hogan 2015-01-29 307 struct fdc_word word;
4cebec609aea6d James Hogan 2015-01-29 308 unsigned long flags;
4cebec609aea6d James Hogan 2015-01-29 309 unsigned int i, buf_len, cpu;
4cebec609aea6d James Hogan 2015-01-29 310 bool done_cr = false;
4cebec609aea6d James Hogan 2015-01-29 311 char buf[4];
4cebec609aea6d James Hogan 2015-01-29 312 const char *buf_ptr = buf;
4cebec609aea6d James Hogan 2015-01-29 313 /* Number of bytes of input data encoded up to each byte in buf */
4cebec609aea6d James Hogan 2015-01-29 314 u8 inc[4];
4cebec609aea6d James Hogan 2015-01-29 315
4cebec609aea6d James Hogan 2015-01-29 316 local_irq_save(flags);
4cebec609aea6d James Hogan 2015-01-29 317 cpu = smp_processor_id();
4cebec609aea6d James Hogan 2015-01-29 318 regs = cons->regs[cpu];
4cebec609aea6d James Hogan 2015-01-29 319 /* First console output on this CPU? */
4cebec609aea6d James Hogan 2015-01-29 320 if (!regs) {
4cebec609aea6d James Hogan 2015-01-29 321 regs = mips_cdmm_early_probe(0xfd);
4cebec609aea6d James Hogan 2015-01-29 322 cons->regs[cpu] = regs;
4cebec609aea6d James Hogan 2015-01-29 323 }
4cebec609aea6d James Hogan 2015-01-29 324 /* Already tried and failed to find FDC on this CPU? */
4cebec609aea6d James Hogan 2015-01-29 325 if (IS_ERR(regs))
4cebec609aea6d James Hogan 2015-01-29 326 goto out;
4cebec609aea6d James Hogan 2015-01-29 327 while (count) {
4cebec609aea6d James Hogan 2015-01-29 328 /*
4cebec609aea6d James Hogan 2015-01-29 329 * Copy the next few characters to a buffer so we can inject
4cebec609aea6d James Hogan 2015-01-29 330 * carriage returns before newlines.
4cebec609aea6d James Hogan 2015-01-29 331 */
4cebec609aea6d James Hogan 2015-01-29 332 for (buf_len = 0, i = 0; buf_len < 4 && i < count; ++buf_len) {
4cebec609aea6d James Hogan 2015-01-29 333 if (s[i] == '\n' && !done_cr) {
4cebec609aea6d James Hogan 2015-01-29 334 buf[buf_len] = '\r';
4cebec609aea6d James Hogan 2015-01-29 335 done_cr = true;
4cebec609aea6d James Hogan 2015-01-29 336 } else {
4cebec609aea6d James Hogan 2015-01-29 337 buf[buf_len] = s[i];
4cebec609aea6d James Hogan 2015-01-29 338 done_cr = false;
4cebec609aea6d James Hogan 2015-01-29 339 ++i;
4cebec609aea6d James Hogan 2015-01-29 340 }
4cebec609aea6d James Hogan 2015-01-29 341 inc[buf_len] = i;
4cebec609aea6d James Hogan 2015-01-29 342 }
4cebec609aea6d James Hogan 2015-01-29 @343 word = mips_ejtag_fdc_encode(&buf_ptr, &buf_len, 1);
4cebec609aea6d James Hogan 2015-01-29 344 count -= inc[word.bytes - 1];
4cebec609aea6d James Hogan 2015-01-29 345 s += inc[word.bytes - 1];
4cebec609aea6d James Hogan 2015-01-29 346
4cebec609aea6d James Hogan 2015-01-29 347 /* Busy wait until there's space in fifo */
70f041b6e1ff50 James Hogan 2015-04-28 348 while (__raw_readl(regs + REG_FDSTAT) & REG_FDSTAT_TXF)
4cebec609aea6d James Hogan 2015-01-29 349 ;
70f041b6e1ff50 James Hogan 2015-04-28 350 __raw_writel(word.word, regs + REG_FDTX(c->index));
4cebec609aea6d James Hogan 2015-01-29 351 }
4cebec609aea6d James Hogan 2015-01-29 352 out:
4cebec609aea6d James Hogan 2015-01-29 353 local_irq_restore(flags);
4cebec609aea6d James Hogan 2015-01-29 354 }
4cebec609aea6d James Hogan 2015-01-29 355
:::::: The code at line 343 was first introduced by commit
:::::: 4cebec609aea6dff23e67a42b6516d852fa87d07 TTY: Add MIPS EJTAG Fast Debug Channel TTY driver
:::::: TO: James Hogan <james.hogan@imgtec.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: drivers/tty/mips_ejtag_fdc.c:343:32: error: incompatible pointer types passing 'const char **' to parameter of type 'const u8 **' (aka 'const unsigned char **')
2025-01-10 5:41 kernel test robot
@ 2025-01-10 6:59 ` Jiri Slaby
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2025-01-10 6:59 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel
On 10. 01. 25, 6:41, kernel test robot wrote:
> Hi Jiri,
>
> 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/torvalds/linux.git master
> head: 2144da25584eb10b84252230319b5783f6a83041
> commit: ce7cbd9a6c81b5fc899bbc730072a1bddeae5d0d tty: mips_ejtag_fdc: use u8 for character pointers
> date: 1 year, 1 month ago
> config: mips-randconfig-r054-20250110 (https://download.01.org/0day-ci/archive/20250110/202501101327.oGdWbmuk-lkp@intel.com/config)
> compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250110/202501101327.oGdWbmuk-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/202501101327.oGdWbmuk-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>>> drivers/tty/mips_ejtag_fdc.c:343:32: error: incompatible pointer types passing 'const char **' to parameter of type 'const u8 **' (aka 'const unsigned char **') [-Werror,-Wincompatible-pointer-types]
> 343 | word = mips_ejtag_fdc_encode(&buf_ptr, &buf_len, 1);
This one was fixed by:
commit 188942f05ce45f80c06f7242ad7478bd204c3387
Author: Serge Semin <fancer.lancer@gmail.com>
Date: Thu Feb 15 20:17:29 2024 +0300
tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning
> drivers/tty/mips_ejtag_fdc.c:1224:31: error: incompatible pointer types passing 'const char *[1]' to parameter of type 'const u8 **' (aka 'const unsigned char **') [-Werror,-Wincompatible-pointer-types]
> 1224 | word = mips_ejtag_fdc_encode(bufs, &kgdbfdc_wbuflen, 1);
> | ^~~~
This one, I will fix.
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-10 6:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 6:33 drivers/tty/mips_ejtag_fdc.c:343:32: error: incompatible pointer types passing 'const char **' to parameter of type 'const u8 **' (aka 'const unsigned char **') kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2025-01-10 5:41 kernel test robot
2025-01-10 6:59 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox