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

Fix i586 size_t compiler error. #609

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions tcmur_cmd_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ static int handle_writesame(struct tcmu_device *dev, struct tcmulib_cmd *cmd)
uint32_t block_size = tcmu_dev_get_block_size(dev);
uint64_t start_lba = tcmu_cdb_get_lba(cdb);
uint64_t write_lbas;
size_t max_xfer_length, length = 1024 * 1024;
uint64_t max_xfer_length, length = 1024 * 1024;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple lines below this we do:

length = round_up(length, max_xfer_length);

then pass length to tcmur_cmd_state_init which wants a size_t. Will you get another error about passing a unin64_t to a size_t now?

struct write_same *write_same;
int i, ret;

Expand Down Expand Up @@ -1979,7 +1979,7 @@ static void handle_format_unit_cbk(struct tcmu_device *dev,
static int handle_format_unit(struct tcmu_device *dev, struct tcmulib_cmd *cmd) {
struct tcmur_device *rdev = tcmu_dev_get_private(dev);
struct tcmur_cmd *tcmur_cmd = cmd->hm_private;
size_t max_xfer_length, length = 1024 * 1024;
uint64_t max_xfer_length, length = 1024 * 1024;
uint32_t block_size = tcmu_dev_get_block_size(dev);
uint64_t num_lbas = tcmu_dev_get_num_lbas(dev);
int ret;
Expand Down