linux-next: build failure after merge of the scsi tree
Subsystems (2)
Hi James,
After merging the scsi tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:
drivers/scsi/scsi_logging.c: In function 'sdev_prefix_printk':drivers/scsi/scsi_logging.c:119:6: error: void value not ignored as it ought to be
ret = dev_printk(level, &sdev->sdev_gendev, "%s", logbuf);
^
drivers/scsi/scsi_logging.c: In function 'scmd_printk':
drivers/scsi/scsi_logging.c:146:6: error: void value not ignored as it ought to be
ret = dev_printk(level, &scmd->device->sdev_gendev, "%s", logbuf);
^Caused by commit ded85c193a39 ("scsi: Implement per-cpu logging buffer") interacting with commit d1f1052c5204 ("device: Change dev_<level> logging functions to return void") from the driver-core tree.
I added the following merge resolution patch. Someone will have to remember to tell Linus. Also, the void return may be able to be propagated further up the chain since these two new affected functions now always return 0.
From: Stephen Rothwell <[email protected]>
Date: Wed, 4 Feb 2015 17:18:08 +1100
Subject: [PATCH] scsi: merge resolution for dev_printk API change
--- drivers/scsi/scsi_logging.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/scsi/scsi_logging.c +4 -6
@@ -99,7 +99,6 @@ int sdev_prefix_printk(const char *level, const struct scsi_device *sdev,va_list args;char *logbuf;size_t off =0 , logbuf_len; -int ret;if (!sdev)return 0 ;
@@ -116,9 +115,9 @@ int sdev_prefix_printk(const char *level, const struct scsi_device *sdev, off +=vscnprintf (logbuf + off, logbuf_len - off, fmt, args);va_end (args); } - ret =dev_printk (level, &sdev->sdev_gendev,"%s" , logbuf); +dev_printk (level, &sdev->sdev_gendev,"%s" , logbuf);scsi_log_release_buffer (logbuf); -return ret; +return 0 ; }EXPORT_SYMBOL (sdev_prefix_printk);
@@ -128,7 +127,6 @@ int scmd_printk(const char *level, const struct scsi_cmnd *scmd,va_list args;char *logbuf;size_t off =0 , logbuf_len; -int ret;if (!scmd || !scmd->cmnd)return 0 ;
@@ -143,9 +141,9 @@ int scmd_printk(const char *level, const struct scsi_cmnd *scmd, off +=vscnprintf (logbuf + off, logbuf_len - off, fmt, args);va_end (args); } - ret =dev_printk (level, &scmd->device->sdev_gendev,"%s" , logbuf); +dev_printk (level, &scmd->device->sdev_gendev,"%s" , logbuf);scsi_log_release_buffer (logbuf); -return ret; +return 0 ; }EXPORT_SYMBOL (scmd_printk);
Signature · 5 lines
2.1.4 -- Cheers, Stephen Rothwell [email protected]
(adding Christoph Hellwig)
Quoted 19 lines · Stephen Rothwell
Hi James,
After merging the scsi tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
drivers/scsi/scsi_logging.c: In function 'sdev_prefix_printk':drivers/scsi/scsi_logging.c:119:6: error: void value not ignored as it ought to beret = dev_printk(level, &sdev->sdev_gendev, "%s", logbuf); ^ drivers/scsi/scsi_logging.c: In function 'scmd_printk': drivers/scsi/scsi_logging.c:146:6: error: void value not ignored as it ought to be ret = dev_printk(level, &scmd->device->sdev_gendev, "%s", logbuf); ^Caused by commit
ded85c193a39("scsi: Implement per-cpu logging buffer") interacting with commitd1f1052c5204("device: Change dev_<level> logging functions to return void") from the driver-core tree.
Quoted 4 lines
I added the following merge resolution patch. Someone will have to remember to tell Linus. Also, the void return may be able to be propagated further up the chain since these two new affected functions now always return 0.
Thanks and just so.
It seems that nothing uses either return value,
so it's probably better to use void for bothsdev_prefix_printk and scmd_printk.
James Bottomley
maintainerQuoted 19 lines · Stephen Rothwell
Hi James,
After merging the scsi tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
drivers/scsi/scsi_logging.c: In function 'sdev_prefix_printk':drivers/scsi/scsi_logging.c:119:6: error: void value not ignored as it ought to beret = dev_printk(level, &sdev->sdev_gendev, "%s", logbuf); ^ drivers/scsi/scsi_logging.c: In function 'scmd_printk': drivers/scsi/scsi_logging.c:146:6: error: void value not ignored as it ought to be ret = dev_printk(level, &scmd->device->sdev_gendev, "%s", logbuf); ^Caused by commit
ded85c193a39("scsi: Implement per-cpu logging buffer") interacting with commitd1f1052c5204("device: Change dev_<level> logging functions to return void") from the driver-core tree.
Quoted 4 lines
I added the following merge resolution patch. Someone will have to remember to tell Linus. Also, the void return may be able to be propagated further up the chain since these two new affected functions now always return 0.
Hannes posted a more correct fix for it today to the scsi list. However, sorting this out isn't just about the short term fix: We can't afford the bisection failure of SCSI not building over a wide range of commits, so our tree will need to be pulled ahead of the driver-core tree.
I've got to say, while it's great that linux-next spotted this ahead of time (saves us all a massive beating from Linus, thanks Stephen) it's unfortunate to have this type of thing turn up on the edge of a merge window, especially caused by a trivial commit which perhaps shouldn't have gone in so late.
James