Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed missing data type cast which was generating a warning/error. #24

Merged
merged 5 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ static int iscsi_sw_tcp_send_hdr_done(struct iscsi_tcp_conn *tcp_conn,

tcp_sw_conn->out.segment = tcp_sw_conn->out.data_segment;
ISCSI_SW_TCP_DBG(tcp_conn->iscsi_conn,
"Header done. Next segment size %u total_size %u\n",
"Header done. Next segment size %u total_size %lu\n",
tcp_sw_conn->out.segment.size,
tcp_sw_conn->out.segment.total_size);
return 0;
Expand Down
11 changes: 5 additions & 6 deletions drivers/scsi/libiscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ static int iscsi_tcp_hdr_recv_done(struct iscsi_tcp_conn *tcp_conn,
*/
static inline void
iscsi_tcp_segment_init_sg(struct iscsi_segment *segment,
struct scatterlist *sg, unsigned int offset)
struct scatterlist *sg, unsigned long offset)
{
segment->sg = sg;
segment->sg_offset = offset;
segment->size = min(sg->length - offset,
segment->total_size - segment->total_copied);
segment->total_size - segment->total_copied);
segment->data = NULL;
}

Expand Down Expand Up @@ -232,12 +232,11 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn,
iscsi_tcp_segment_unmap(segment);

/* Do we have more scatterlist entries? */
ISCSI_DBG_TCP(tcp_conn->iscsi_conn, "total copied %u total size %u\n",
ISCSI_DBG_TCP(tcp_conn->iscsi_conn, "total copied %lu total size %lu\n",
segment->total_copied, segment->total_size);
if (segment->total_copied < segment->total_size) {
/* Proceed to the next entry in the scatterlist. */
iscsi_tcp_segment_init_sg(segment, sg_next(segment->sg),
0);
iscsi_tcp_segment_init_sg(segment, sg_next(segment->sg), 0);
iscsi_tcp_segment_map(segment, recv);
BUG_ON(segment->size == 0);
return 0;
Expand Down Expand Up @@ -371,7 +370,7 @@ EXPORT_SYMBOL_GPL(iscsi_segment_init_linear);
inline int
iscsi_segment_seek_sg(struct iscsi_segment *segment,
struct scatterlist *sg_list, unsigned int sg_count,
unsigned int offset, size_t size,
unsigned long offset, size_t size,
iscsi_segment_done_fn_t *done,
struct ahash_request *hash)
{
Expand Down
10 changes: 5 additions & 5 deletions include/scsi/libiscsi_tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ typedef int iscsi_segment_done_fn_t(struct iscsi_tcp_conn *,

struct iscsi_segment {
unsigned char *data;
unsigned int size;
unsigned int size;
unsigned int copied;
unsigned int total_size;
unsigned int total_copied;
size_t total_size;
unsigned long total_copied;

struct ahash_request *hash;
unsigned char padbuf[ISCSI_PAD_LEN];
Expand All @@ -46,7 +46,7 @@ struct iscsi_segment {

struct scatterlist *sg;
void *sg_mapped;
unsigned int sg_offset;
unsigned long sg_offset;
bool atomic_mapped;

iscsi_segment_done_fn_t *done;
Expand Down Expand Up @@ -115,7 +115,7 @@ extern void iscsi_segment_init_linear(struct iscsi_segment *segment,
extern int
iscsi_segment_seek_sg(struct iscsi_segment *segment,
struct scatterlist *sg_list, unsigned int sg_count,
unsigned int offset, size_t size,
unsigned long offset, size_t size,
iscsi_segment_done_fn_t *done,
struct ahash_request *hash);

Expand Down