mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-21 14:46:23 +00:00
Fix for an endianness warning reported by sparse
Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2048 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -607,7 +607,7 @@ static int scst_pr_do_load_device_file(struct scst_device *dev,
|
|||||||
uint64_t sign, version;
|
uint64_t sign, version;
|
||||||
mm_segment_t old_fs;
|
mm_segment_t old_fs;
|
||||||
uint8_t pr_is_set, aptpl;
|
uint8_t pr_is_set, aptpl;
|
||||||
uint64_t key;
|
__be64 key;
|
||||||
uint16_t rel_tgt_id;
|
uint16_t rel_tgt_id;
|
||||||
|
|
||||||
TRACE_ENTRY();
|
TRACE_ENTRY();
|
||||||
@@ -736,7 +736,7 @@ static int scst_pr_do_load_device_file(struct scst_device *dev,
|
|||||||
tid = &buf[pos];
|
tid = &buf[pos];
|
||||||
pos += tid_size(tid);
|
pos += tid_size(tid);
|
||||||
|
|
||||||
key = get_unaligned((uint64_t *)&buf[pos]);
|
key = (__force __be64)get_unaligned((uint64_t *)&buf[pos]);
|
||||||
pos += sizeof(key);
|
pos += sizeof(key);
|
||||||
|
|
||||||
rel_tgt_id = get_unaligned((uint16_t *)&buf[pos]);
|
rel_tgt_id = get_unaligned((uint16_t *)&buf[pos]);
|
||||||
|
|||||||
Reference in New Issue
Block a user