res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "some_name");
if(res!)
return -EINVAL;
if(res->start > 0xFFFFFFFF) //this doesn't make sense
{
//pr_error("%s, only max 32 bits are supported\n", __func__);
return -EINVAL;
}
start variable in struct resource is type of resource_size_t.
On 32 bit arch this type is u32 and on 64 bit arch it is 64. Nevertheless on each architecture I want my driver supports only 32 bits.
I wonder if driver has to be such perfect and robust for everything user set in device tree or just information in kernel driver doc would be enough that user cannot set more than 32 bits.