public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ismail Donmez <ismail@pardus.org.tr>
To: linux-kernel@vger.kernel.org
Cc: David Woodhouse <dwmw2@infradead.org>
Subject: [PATCH] scsi/scsi.h protect scsi_to_u32 function by ifdef __KERNEL__
Date: Sat, 21 Oct 2006 13:02:07 +0300	[thread overview]
Message-ID: <200610211302.08574.ismail@pardus.org.tr> (raw)

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

Hi,

include/scsi/scsi.h defines scsi_to_u32 function like this:

 static inline u32 scsi_to_u32(u8 *ptr)

But the definition of u8 is protected by ifdef __KERNEL__ in asm/types.h hence 
this whole function should be procted as well. This fixes compilation of 
cdrtools with latest kernel-headers GIT tree.

Signed-off-by: Ismail Donmez <ismail@pardus.org.tr>


[-- Attachment #2: 1.patch --]
[-- Type: text/x-diff, Size: 520 bytes --]

diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 84a6d5f..0ce924a 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -429,10 +429,12 @@ #define SCSI_IOCTL_GET_BUS_NUMBER	0x5386
 /* Used to obtain the PCI location of a device */
 #define SCSI_IOCTL_GET_PCI		0x5387
 
+#ifdef __KERNEL__
 /* Pull a u32 out of a SCSI message (using BE SCSI conventions) */
 static inline u32 scsi_to_u32(u8 *ptr)
 {
 	return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
 }
+#endif
 
 #endif /* _SCSI_SCSI_H */

                 reply	other threads:[~2006-10-21 10:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200610211302.08574.ismail@pardus.org.tr \
    --to=ismail@pardus.org.tr \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox