linux-next: build failure after merge of the scsi tree
Subsystems (2)
Hi James,
After merging the scsi tree, today's linux-next build (arm multi_v7_defconfig) failed like this:
In file included from include/linux/sched.h:17:0,
from include/linux/blkdev.h:4,
from drivers/scsi/constants.c:10:drivers/scsi/constants.c: In function 'scsi_opcode_sa_name':include/linux/kernel.h:54:32: error: invalid application of 'sizeof' to incomplete type 'const char *[]'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^
drivers/scsi/constants.c:300:15: note: in expansion of macro 'ARRAY_SIZE'
if (opcode < ARRAY_SIZE(cdb_byte0_names))
^Caused by 94bafab0008c ("scsi: consolidate opcode lookup in scsi_opcode_sa_name()"). This build does not have CONFIG_SCSI_CONSTANTS set.
I have used the scsi tree from next-20141031 again (since yesterday's tree had a different build problem).
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 15 lines · Stephen Rothwell
Hi James,
After merging the scsi tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:In file included from
include/linux/sched.h:17:0, frominclude/linux/blkdev.h:4, fromdrivers/scsi/constants.c:10:drivers/scsi/constants.c: In function 'scsi_opcode_sa_name':include/linux/kernel.h:54:32: error: invalid application of 'sizeof' to incomplete type 'const char *[]' #defineARRAY_SIZE(arr)(sizeof(arr) / sizeof((arr)[0]) +__must_be_array(arr)) ^drivers/scsi/constants.c:300:15: note:
in expansion of macro 'ARRAY_SIZE' if (opcode <ARRAY_SIZE(cdb_byte0_names)) ^
Quoted 7 lines
Caused by
94bafab0008c("scsi: consolidate opcode lookup inscsi_opcode_sa_name()"). This build does not haveCONFIG_SCSI_CONSTANTSset.I have used the scsi tree from next-20141031 again (since yesterday's tree had a different build problem).
Sorry. Here's the patch.
Cheers,
Hannes
- --
Dr. Hannes Reinecke zSeries & Storage
[email protected] +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJUWHtHAAoJEGz4yi9OyKjPfdgP+wZweCbK1HJ7PBz8CCqT6n6d HDOv0oX4Ia3Oo53NhdIAD9745sCWWegSBYZf7C/gTXVtmBxJ30NnuI+Cg0otaTHA DPJZ26mBCNijYvpVGqgcSkXRdQQMiBGo6TLmsdpXxn4NFuh3IoRS+8gMgEFxpQdK aAsHnRBTbfaeYpuNR2P5IJVc1L89rg3DkLWMw3ybSO5WzAcjg4yDiasCsGNHq/T4 e9t+V7/+YA14UOMAHfsAnD/B7UI/7B0ealDbepr/cq1NdJ1F0G7JoCS0yAExRumv 3KBznE29YMZTXCqJg6DNQqkV1xmuB2l2/eAZrM/pHTHGWBQk27WI/KsmqISt9Vb+ vmowDuJQNwZG784KSmbRcjSnuNTIltUybhgF/r+m3dNq4j+H/SroBIi5xI+5HJR+ m7G0tjQkpI3Hie3kf9Egwj09goMZ5ka8tIETMqgJFa2AZ3VpnBekxXGe1OtFgfeo 3nOCnYNNADUSIFUmGmAUusPlgFyMGoWvTHs+koYN8cS+q+X9WJgI3mihnMuiVIux jG2W7IDCimiss/g0Bnol7M7FdL4QMVeg9/LX5wIl2G1b9Nz4ZDCSI/ooHL+xMFrm H1wwBF9/xjpc0J6RWimkSvFa4iRCti4Ac8w41l+APwEtH2mWdrefTaadV0JXH/wh brJGtCQhTrCLGuyLluPx
=xaoW
-----END PGP SIGNATURE-----
Quoted 1 line
From
355eac426aea2e1f98b99a41707b37e9ba3ef02bMon Sep 17 00:00:00 2001
From: Hannes Reinecke <[email protected]>
Date: Tue, 4 Nov 2014 08:06:03 +0100
Subject: [PATCH] scsi: Fixup compilation warning when SCSI_CONSTANTS is not
set
ARRAY_SIZE() requires the array to actually have a size.
--- drivers/scsi/constants.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/constants.c +1 -1
@@ -267,7 +267,7 @@ static struct sa_name_list sa_names_arr[] = { };#else /* ifndef CONFIG_SCSI_CONSTANTS */ -static const char *cdb_byte0_names[]; +static const char *cdb_byte0_names[0 ];static struct sa_name_list sa_names_arr[] = { {VARIABLE_LENGTH_CMD, NULL, 0},
Signature · 1 line
1.8.5.2
Hi Hannes,
Quoted 16 lines · On Tue, 04 Nov 2014 08:07:51 +0100 Hannes Reinecke <[email protected]> wrote:
Quoted 14 lines · Stephen Rothwell
After merging the scsi tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:In file included from
include/linux/sched.h:17:0, frominclude/linux/blkdev.h:4, fromdrivers/scsi/constants.c:10:drivers/scsi/constants.c: In function 'scsi_opcode_sa_name':include/linux/kernel.h:54:32: error: invalid application of 'sizeof' to incomplete type 'const char *[]' #defineARRAY_SIZE(arr)(sizeof(arr) / sizeof((arr)[0]) +__must_be_array(arr)) ^drivers/scsi/constants.c:300:15: note:
in expansion of macro 'ARRAY_SIZE' if (opcode <ARRAY_SIZE(cdb_byte0_names)) ^
Quoted 8 lines
Quoted 7 lines
Caused by
94bafab0008c("scsi: consolidate opcode lookup inscsi_opcode_sa_name()"). This build does not haveCONFIG_SCSI_CONSTANTSset.I have used the scsi tree from next-20141031 again (since yesterday's tree had a different build problem).
Sorry. Here's the patch.
I applied that patch to linux-next today (pending James adding it to the scsi tree).
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]