Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757680AbZF0R1c (ORCPT ); Sat, 27 Jun 2009 13:27:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757372AbZF0R1L (ORCPT ); Sat, 27 Jun 2009 13:27:11 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:34869 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756836AbZF0R1J (ORCPT ); Sat, 27 Jun 2009 13:27:09 -0400 Subject: Re: [PATCH] SCSI: userspace cannot use scsi_command_size_tbl, COMMAND_SIZE and scsi_device_type From: James Bottomley To: Jaswinder Singh Rajput Cc: Sam Ravnborg , Boaz Harrosh , Benny Halevy , LKML , linux-scsi In-Reply-To: <1246122359.32198.7.camel@hpdv5.satnam> References: <1246122359.32198.7.camel@hpdv5.satnam> Content-Type: text/plain Date: Sat, 27 Jun 2009 12:27:08 -0500 Message-Id: <1246123628.3990.19.camel@mulgrave.site> Mime-Version: 1.0 X-Mailer: Evolution 2.24.1.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1835 Lines: 49 All SCSI patches should be cc'd to the SCSI list On Sat, 2009-06-27 at 22:35 +0530, Jaswinder Singh Rajput wrote: > userspace cannot use scsi_command_size_tbl, COMMAND_SIZE > and scsi_device_type defined in kernel > > fix the following 'make headers_check' warnings: > > usr/include/scsi/scsi.h:159: userspace cannot call function or variable defined in the kernel > usr/include/scsi/scsi.h:285: userspace cannot call function or variable defined in the kernel > > Signed-off-by: Jaswinder Singh Rajput > --- > include/scsi/scsi.h | 13 +++++++------ > 1 files changed, 7 insertions(+), 6 deletions(-) > > diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h > index 084478e..7ba5acf 100644 > --- a/include/scsi/scsi.h > +++ b/include/scsi/scsi.h > @@ -156,9 +156,6 @@ scsi_varlen_cdb_length(const void *hdr) > return ((struct scsi_varlen_cdb_hdr *)hdr)->additional_cdb_length + 8; > } > > -extern const unsigned char scsi_command_size_tbl[8]; > -#define COMMAND_SIZE(opcode) scsi_command_size_tbl[((opcode) >> 5) & 7] > - > static inline unsigned > scsi_command_size(const unsigned char *cmnd) > { > @@ -166,6 +163,13 @@ scsi_command_size(const unsigned char *cmnd) > scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]); Even a simple eyeball inspection of this patch shows that the removal of COMMAND_SIZE above causes this inline function to fail to compile. If you can't be bothered even to read your own patches or at the very least compile test them, what makes you think I should bother reading anything you send in? James -- 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/