* scsi: dc395x: enabling debug causes build to fail
@ 2025-04-22 14:13 Colin King (gmail)
0 siblings, 0 replies; only message in thread
From: Colin King (gmail) @ 2025-04-22 14:13 UTC (permalink / raw)
To: Oliver Neukum, Ali Akcaagac, Jamie Lenehan,
linux-scsi@vger.kernel.org
Cc: James E.J. Bottomley, Martin K. Petersen,
linux-kernel@vger.kernel.org
[-- Attachment #1.1.1: Type: text/plain, Size: 3390 bytes --]
Hi,
Enabling debug in drivers/scsi/dc395x.c such as the following..
#define DEBUG_MASK DBG_0
..causes the build to fail. This seems to fail pre- linux v6.0, so it's
been broken a very long time.
make drivers/scsi/dc395x.o -j 28 -k
DESCEND objtool
INSTALL libsubcmd_headers
UPD include/config/kernel.release
UPD include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
CC [M] drivers/scsi/dc395x.o
In file included from ./include/asm-generic/bug.h:23,
from ./arch/x86/include/asm/bug.h:114,
from ./include/linux/bug.h:5,
from ./arch/x86/include/asm/paravirt.h:19,
from ./arch/x86/include/asm/cpuid/api.h:57,
from ./arch/x86/include/asm/cpuid.h:6,
from ./arch/x86/include/asm/processor.h:19,
from ./arch/x86/include/asm/timex.h:5,
from ./include/linux/timex.h:67,
from ./include/linux/time32.h:13,
from ./include/linux/time.h:60,
from ./include/linux/stat.h:19,
from ./include/linux/module.h:13,
from drivers/scsi/dc395x.c:49:
drivers/scsi/dc395x.c: In function ‘build_srb’:
drivers/scsi/dc395x.c:893:31: error: ‘struct scsi_cmnd’ has no member
named ‘bufflen’
893 | cmd->bufflen, scsi_sglist(cmd),
scsi_sg_count(cmd),
| ^~
./include/linux/printk.h:479:33: note: in definition of macro
‘printk_index_wrap’
479 | _p_func(_fmt, ##__VA_ARGS__);
\
| ^~~~~~~~~~~
drivers/scsi/dc395x.c:113:5: note: in expansion of macro ‘printk’
113 | printk(level DC395X_NAME ": " format , ## arg)
| ^~~~~~
drivers/scsi/dc395x.c:126:25: note: in expansion of macro ‘dprintkl’
126 | dprintkl(KERN_DEBUG , format , ## arg); \
| ^~~~~~~~
drivers/scsi/dc395x.c:891:17: note: in expansion of macro ‘dprintkdbg’
891 | dprintkdbg(DBG_0,
| ^~~~~~~~~~
./include/linux/kern_levels.h:5:25: error: format ‘%x’ expects argument
of type ‘unsigned int’, but argument 3 has type ‘dma_addr_t’ {aka ‘long
long unsigned int’} [-Werror=format=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
./include/linux/printk.h:479:25: note: in definition of macro
‘printk_index_wrap’
479 | _p_func(_fmt, ##__VA_ARGS__);
\
| ^~~~
drivers/scsi/dc395x.c:113:5: note: in expansion of macro ‘printk’
113 | printk(level DC395X_NAME ": " format , ## arg)
| ^~~~~~
... etc
I stumbled upon this because of a spelling mistake in the following line
in function srb_done():
dprintkdbg(DBG_SG, "srb_done: srb=%p sg=%i(%i/%i) buf=%p\n",
srb, scsi_sg_count(cmd), srb->sg_index, srb->sg_count,
scsi_sgtalbe(cmd));
scsi_sgtalbe should be scsi_sgtable(), and this was introduced into the
driver back in commit:
a862ea31655a3 (FUJITA Tomonori 2007-05-26 02:07:09 +0900 3162
Colin
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 4901 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-22 14:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22 14:13 scsi: dc395x: enabling debug causes build to fail Colin King (gmail)
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.