The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Oliver Neukum <oliver@neukum.org>, Ali Akcaagac <aliakc@web.de>,
	Jamie Lenehan <lenehan@twibble.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: scsi: dc395x: enabling debug causes build to fail
Date: Tue, 22 Apr 2025 15:13:19 +0100	[thread overview]
Message-ID: <10d77cb9-a5fe-462a-9339-e2df845958c5@gmail.com> (raw)


[-- 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 --]

                 reply	other threads:[~2025-04-22 14:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=10d77cb9-a5fe-462a-9339-e2df845958c5@gmail.com \
    --to=colin.i.king@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=aliakc@web.de \
    --cc=lenehan@twibble.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=oliver@neukum.org \
    /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