You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
2.1 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../linux-header/PATCHv2-2-4-scsi-make-scsi-scsi.h-headers_check-clean.patch
# Copyright (C) 2009 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
From patchwork Tue Sep 29 10:34:19 2009
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCHv2,2/4] scsi: make scsi/scsi.h headers_check clean
Date: Tue, 29 Sep 2009 10:34:19 -0000
From: Michael S. Tsirkin <mst@redhat.com>
X-Patchwork-Id: 50529
place extern declarations in scsi/scsi.h within ifdef __KERNEL__
so that make headers_install strips them out.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/scsi/scsi.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index dfcfaab..418465a 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -150,6 +150,7 @@ struct scsi_varlen_cdb_hdr {
/* service specific data follows */
};
+#ifdef __KERNEL__
static inline unsigned
scsi_varlen_cdb_length(const void *hdr)
{
@@ -165,6 +166,7 @@ scsi_command_size(const unsigned char *cmnd)
return (cmnd[0] == VARIABLE_LENGTH_CMD) ?
scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]);
}
+#endif
/*
* SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
@@ -281,8 +283,10 @@ enum scsi_protocol {
SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */
};
+#ifdef __KERNEL__
/* Returns a human-readable name for the device */
extern const char * scsi_device_type(unsigned type);
+#endif
/*
* standard mode-select header prepended to all mode-select commands