A case of 64 integer to 32 integer cast in function tegra_sdhci_set_uhs_signaling()

Please take a look at this code :

#define SDHCI_CLOCK_CTRL_TRIM_MASK 0x1f000000
#define SDHCI_CLOCK_CTRL_TRIM_SHIFT 24

static void tegra_sdhci_set_uhs_signaling(struct sdhci_host host,
unsigned timing)
{

/
Set trim delay */
if (set_trim_delay) {
ret = tegra_prod_set_by_name_partially(&host->ioaddr,
prod_device_states[timing], tegra_host->prods,
0, SDHCI_TEGRA_VENDOR_CLOCK_CTRL,
SDHCI_CLOCK_CTRL_TRIM_MASK <<
SDHCI_CLOCK_CTRL_TRIM_SHIFT);

}

This code passes a value of 0x1f000000 << 24 to it. In fact, the type of the last parameter ‘new_mask’ for tegra_prod_set_by_name_partially() is u32.

Isn’t this a bug ?

Hi,

We have discussed this issue internally.
Will share more information with you later.

Thanks.

Hi,

We have fixed this issue in our internal branch.
Thanks for reporting this to us.