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

drivers/i2c/i2c_dw.c is not 64-bit clean #19219

Closed
ghost opened this issue Sep 17, 2019 · 0 comments · Fixed by #19520
Closed

drivers/i2c/i2c_dw.c is not 64-bit clean #19219

ghost opened this issue Sep 17, 2019 · 0 comments · Fixed by #19520
Labels
area: Drivers area: I2C bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@ghost
Copy link

ghost commented Sep 17, 2019

Build hello_world for the up_squared target with CONFIG_X86_LONGMODE and a bunch of warnings occur. This is harmless, but our code should build without warnings, of course.

/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:46:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (struct i2c_dw_registers *)dw->base_address;
   ^
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c: In function 'i2c_dw_data_read':
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:100:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (struct i2c_dw_registers *)dw->base_address;
   ^
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c: In function 'i2c_dw_data_send':
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:128:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (struct i2c_dw_registers *)dw->base_address;
   ^
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c: In function 'i2c_dw_transfer_complete':
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:173:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (struct i2c_dw_registers *)dw->base_address;
   ^
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c: In function 'i2c_dw_isr':
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:190:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (struct i2c_dw_registers *)dw->base_address;
   ^
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c: In function 'i2c_dw_setup':
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:269:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (struct i2c_dw_registers *)dw->base_address;
   ^
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c: In function 'i2c_dw_transfer':
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:397:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (struct i2c_dw_registers *)dw->base_address;
   ^
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c: In function 'i2c_dw_runtime_configure':
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:506:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   (struct i2c_dw_registers *)dw->base_address;
   ^
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c: In function 'i2c_dw_initialize':
/home/charles/zephyr/zephyr/drivers/i2c/i2c_dw.c:628:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  regs = (struct i2c_dw_registers *) dw->base_address;```
@ghost ghost added bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug area: Drivers area: I2C labels Sep 17, 2019
@ghost ghost self-assigned this Sep 17, 2019
nashif pushed a commit that referenced this issue Oct 1, 2019
Use UINT_TO_POINTER() macros to silence warnings about casts.

Fixes: #19219

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Drivers area: I2C bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants