Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759679AbYGPKeO (ORCPT ); Wed, 16 Jul 2008 06:34:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756433AbYGPKdy (ORCPT ); Wed, 16 Jul 2008 06:33:54 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:37853 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755048AbYGPKdw (ORCPT ); Wed, 16 Jul 2008 06:33:52 -0400 Date: Wed, 16 Jul 2008 12:33:37 +0200 From: Ingo Molnar To: James Bottomley Cc: Andrew Morton , Linus Torvalds , linux-scsi , linux-kernel Subject: Re: [build fix] Re: [GIT PATCH] SCSI part 1 Message-ID: <20080716103337.GA22931@elte.hu> References: <1216138543.3312.60.camel@localhost.localdomain> <20080716101634.GA8494@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080716101634.GA8494@elte.hu> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3773 Lines: 111 * Ingo Molnar wrote: > The problem is this aspect of that change: > > | @@ -9,6 +9,7 @@ > | #define _SCSI_SCSI_H > | > | #include > | +#include > | > | /* > | * The maximum number of SG segments that we will put inside a > > scsi_cmnd.h depends on symbols defined in blkdev.h. The fix is to > include blkdev.h as well. that wont work - a better replacement fix is the one below. The problem is that scsi.h is included even on !CONFIG_BLOCK and then the BLK_MAX_CDB symbol is meaningless. Ingo -----------> commit 7c2bc6236e6c787ab9962cfc6fad04551d9c4057 Author: Ingo Molnar Date: Wed Jul 16 11:56:08 2008 +0200 scsi: fix build error in fs/compat_ioctl.c -tip testing found that the build broke in fs/compat_ioctl.c: -----------> In file included from include/scsi/scsi.h:12, from fs/compat_ioctl.c:72: include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB In file included from include/scsi/scsi.h:12, from fs/compat_ioctl.c:72: include/scsi/scsi_cmnd.h: In function ‘scsi_bidi_cmnd’: include/scsi/scsi_cmnd.h:182: error: implicit declaration of function ‘blk_bidi_rq’ include/scsi/scsi_cmnd.h:183: error: dereferencing pointer to incomplete type include/scsi/scsi_cmnd.h: In function ‘scsi_in’: include/scsi/scsi_cmnd.h:189: error: dereferencing pointer to incomplete type <----------- with this config: http://redhat.com/~mingo/misc/config-Wed_Jul_16_11_32_32_CEST_2008.bad I have bisected it down to: | feac6a07c4a3578bffd6769bb4927e8a7e1f3ffe is first bad commit | commit feac6a07c4a3578bffd6769bb4927e8a7e1f3ffe | Author: Martin Petermann | Date: Wed Jul 2 10:56:35 2008 +0200 | | [SCSI] zfcp: Move status accessors from zfcp to SCSI include file. | | Move the accessor functions for the scsi_cmnd status from zfcp to the | SCSI include file. Change the interface to the functions to pass the | scsi_cmnd pointer instead of the status pointer. | | Signed-off-by: Martin Petermann | Signed-off-by: Christof Schmitt | Signed-off-by: James Bottomley The problem is due to this aspect of that change: | @@ -9,6 +9,7 @@ | #define _SCSI_SCSI_H | | #include | +#include | | /* | * The maximum number of SG segments that we will put inside a scsi_cmnd.h depends on symbols defined in blkdev.h but those symbols are not available if !CONFIG_BLOCK. Only include scsi/scsi_cmnd.h if on CONFIG_BLOCK. (those methods are not used when CONFIG_BLOCK is off anyway). Signed-off-by: Ingo Molnar --- include/scsi/scsi.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 00137a7..b212859 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -9,7 +9,10 @@ #define _SCSI_SCSI_H #include -#include + +#ifdef CONFIG_BLOCK +# include +#endif /* * The maximum number of SG segments that we will put inside a -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/