lkml.org 
[lkml]   [2023]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 1/5] i2c: hpe: Add GXP SoC I2C Controller
Date
> Does it make sense to have #defines for the magic values for I2CSCMD?
> BTW, is the datasheet public?

I will work on the defines and get rid of all the magic values.
Unfortunately, there is no public spec available currently.
Hopefully, we will have one someday though.

> > + /* Use physical memory address to determine which I2C engine this is. */
> > + drvdata->engine = ((u32)drvdata->base & 0xf00) >> 8;


> This breaks on my 64-bit test-build, so it will also fail with
> COMPILE_TEST.


> drivers/i2c/busses/i2c-gxp.c: In function ‘gxp_i2c_probe’:
> drivers/i2c/busses/i2c-gxp.c:533:28: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> 533 | drvdata->engine = ((u32)drvdata->base & 0xf00) >> 8;

I am currently unable to reproduce this error. I even set W=2.
Would replacing (u32) with (unsigned long) resolve it?

Thanks,

-Nick Hawkins





\
 
 \ /
  Last update: 2023-03-27 00:26    [W:0.075 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site