Re: [v8] misc: pci_endpoint_test: Fix overflow of bar_size

From: Hans Zhang
Date: Mon Jan 06 2025 - 08:57:14 EST




On 2025/1/6 19:49, Niklas Cassel wrote:

Signed-off-by: Hans Zhang <18255117159@xxxxxxx>
Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>

When significantly changing the patch from one version to another,
(as in this case), you are supposed to drop the Reviewed-by tags.

Okay, i will remove the reviewer.


Doing a:
$ git grep -A 10 "IS_ENABLED(CONFIG_PHYS_ADDR_T_64BIT"
does not show very many hits, which suggests that this is not the proper
way to solve this.

I don't know the proper solution to this. How is resource_size_t handled
in other PCI driver when being built on with 32-bit PHYS_ADDR_T ?

Can't you just cast the resource_size_t to u64 before doing the division?


Thank you Niklas. I'll try it.

Regards
Hans