[lkml]   [2011]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subjectscsi: include linux/scatterlist.h to pick up ARCH_HAS_SG_CHAIN
    If the compiled object doesn't include linux/scatterlist.h before
    scsi/scsi.h, it will get an incorrect definition of

    Signed-off-by: David Dillow <>
    This fixes an issue I found while working on the SRP initiator, where
    linux/scatterlist.h was being pulled in by scsi/scsi_device.h. It's not
    clear if I'm supposed to include linux/scatterlist.h myself, or if I'm
    including the scsi headers in the wrong order. It makes sense for me
    that scsi.h would pickup the needed headers itself to prevent confusion.

    Another option is to potentially get rid of the ARCH_HAS_SG_CHAIN define
    as all archs have it save m68knommu.

    diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
    index 648d233..b76d400 100644
    --- a/include/scsi/scsi.h
    +++ b/include/scsi/scsi.h
    @@ -9,6 +9,7 @@
    #define _SCSI_SCSI_H

    #include <linux/types.h>
    +#include <linux/scatterlist.h>

    struct scsi_cmnd;

     \ /
      Last update: 2011-01-16 21:15    [W:0.018 / U:45.500 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site