From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: kernel test robot <lkp@intel.com>,
"oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v2] scsi: sd_zbc: trace zone append emulation
Date: Mon, 28 Nov 2022 09:02:39 +0000 [thread overview]
Message-ID: <6fa7aadc-6881-5246-09bb-6f796e03f287@wdc.com> (raw)
In-Reply-To: <185d6f59-fd60-1332-29fc-456b9606e77c@wdc.com>
On 28.11.22 09:54, Johannes Thumshirn wrote:
>>
>> This is missing:
>>
>> diff --git a/drivers/scsi/scsi_trace.c b/drivers/scsi/scsi_trace.c
>> index 41a950075913..224b38c0fb0f 100644
>> --- a/drivers/scsi/scsi_trace.c
>> +++ b/drivers/scsi/scsi_trace.c
>> @@ -389,3 +389,4 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned
>> char *cdb, int len)
>> return scsi_trace_misc(p, cdb, len);
>> }
>> }
>> +EXPORT_SYMBOL(scsi_trace_parse_cdb);
>> diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
>> index 956d1982c51b..e7a0e1ace6d0 100644
>> --- a/drivers/scsi/sd_zbc.c
>> +++ b/drivers/scsi/sd_zbc.c
>> @@ -18,6 +18,7 @@
>> #include <scsi/scsi.h>
>> #include <scsi/scsi_cmnd.h>
>>
>> +#define CREATE_TRACE_POINTS
>> #include <trace/events/scsi.h>
>>
>> #include "sd.h"
>>
>> With that, it compiles fine.
>>
>
> Thanks, but for me it doesn't when I have scsi_mod builtin,
> only as a module :(
> If I remove the CREATE_TRACE_POINTS hunk it compiles again as
> builtin but breaks as module :(
>
>
This is working for me, but having to use #if IS_MODULE() feels
kinda hackish.
Martin your call:
diff --git a/drivers/scsi/scsi_trace.c b/drivers/scsi/scsi_trace.c
index 41a950075913..224b38c0fb0f 100644
--- a/drivers/scsi/scsi_trace.c
+++ b/drivers/scsi/scsi_trace.c
@@ -389,3 +389,4 @@ scsi_trace_parse_cdb(struct trace_seq *p, unsigned char *cdb, int len)
return scsi_trace_misc(p, cdb, len);
}
}
+EXPORT_SYMBOL(scsi_trace_parse_cdb);
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 956d1982c51b..d84578df27c8 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -18,7 +18,10 @@
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
+#if IS_MODULE(CONFIG_BLK_DEV_SD)
+#define CREATE_TRACE_POINTS
#include <trace/events/scsi.h>
+#endif
#include "sd.h"
prev parent reply other threads:[~2022-11-28 9:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6a21e78a188e5a0d630acd771afee11c7d45d183.1668427228.git.johannes.thumshirn@wdc.com>
2022-11-14 22:42 ` [PATCH v2] scsi: sd_zbc: trace zone append emulation kernel test robot
2022-11-15 2:24 ` kernel test robot
2022-11-15 5:26 ` kernel test robot
2022-11-18 8:31 ` Johannes Thumshirn
2022-11-26 2:18 ` Martin K. Petersen
2022-11-26 2:35 ` Damien Le Moal
2022-11-28 8:54 ` Johannes Thumshirn
2022-11-28 9:02 ` Johannes Thumshirn [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=6fa7aadc-6881-5246-09bb-6f796e03f287@wdc.com \
--to=johannes.thumshirn@wdc.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).