drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic()
[drm/drm-misc.git] / drivers / scsi / qla2xxx / qla_dsd.h
blob52e060f83b37d93832a3390c104fa3c720c669d8
1 #ifndef _QLA_DSD_H_
2 #define _QLA_DSD_H_
4 #include <linux/unaligned.h>
6 /* 32-bit data segment descriptor (8 bytes) */
7 struct dsd32 {
8 __le32 address;
9 __le32 length;
12 static inline void append_dsd32(struct dsd32 **dsd, struct scatterlist *sg)
14 put_unaligned_le32(sg_dma_address(sg), &(*dsd)->address);
15 put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length);
16 (*dsd)++;
19 /* 64-bit data segment descriptor (12 bytes) */
20 struct dsd64 {
21 __le64 address;
22 __le32 length;
23 } __packed;
25 static inline void append_dsd64(struct dsd64 **dsd, struct scatterlist *sg)
27 put_unaligned_le64(sg_dma_address(sg), &(*dsd)->address);
28 put_unaligned_le32(sg_dma_len(sg), &(*dsd)->length);
29 (*dsd)++;
32 #endif