Commit f08ab0ab authored by Harsh Jain's avatar Harsh Jain Committed by Greg Kroah-Hartman

staging: kpc2000: Fix long constant sparse warning

It fixed following warning in kpc2000 driver
"constant XXXX is so big it is unsigned long"
Signed-off-by: default avatarHarsh Jain <harshjain32@gmail.com>
Link: https://lore.kernel.org/r/20190831115532.2398-1-harshjain32@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dab8fe7e
......@@ -53,15 +53,15 @@ struct core_table_entry {
static
void parse_core_table_entry_v0(struct core_table_entry *cte, const u64 read_val)
{
cte->type = ((read_val & 0xFFF0000000000000) >> 52);
cte->offset = ((read_val & 0x00000000FFFF0000) >> 16) * 4096;
cte->length = ((read_val & 0x0000FFFF00000000) >> 32) * 8;
cte->s2c_dma_present = ((read_val & 0x0008000000000000) >> 51);
cte->s2c_dma_channel_num = ((read_val & 0x0007000000000000) >> 48);
cte->c2s_dma_present = ((read_val & 0x0000000000008000) >> 15);
cte->c2s_dma_channel_num = ((read_val & 0x0000000000007000) >> 12);
cte->irq_count = ((read_val & 0x0000000000000C00) >> 10);
cte->irq_base_num = ((read_val & 0x00000000000003F8) >> 3);
cte->type = ((read_val & 0xFFF0000000000000UL) >> 52);
cte->offset = ((read_val & 0x00000000FFFF0000UL) >> 16) * 4096;
cte->length = ((read_val & 0x0000FFFF00000000UL) >> 32) * 8;
cte->s2c_dma_present = ((read_val & 0x0008000000000000UL) >> 51);
cte->s2c_dma_channel_num = ((read_val & 0x0007000000000000UL) >> 48);
cte->c2s_dma_present = ((read_val & 0x0000000000008000UL) >> 15);
cte->c2s_dma_channel_num = ((read_val & 0x0000000000007000UL) >> 12);
cte->irq_count = ((read_val & 0x0000000000000C00UL) >> 10);
cte->irq_base_num = ((read_val & 0x00000000000003F8UL) >> 3);
}
static
......
......@@ -205,7 +205,7 @@ static void wait_and_read_ssid(struct kp2000_device *pcard)
u64 read_val = readq(pcard->sysinfo_regs_base + REG_FPGA_SSID);
unsigned long timeout;
if (read_val & 0x8000000000000000) {
if (read_val & 0x8000000000000000UL) {
pcard->ssid = read_val;
return;
}
......@@ -213,7 +213,7 @@ static void wait_and_read_ssid(struct kp2000_device *pcard)
timeout = jiffies + (HZ * 2);
do {
read_val = readq(pcard->sysinfo_regs_base + REG_FPGA_SSID);
if (read_val & 0x8000000000000000) {
if (read_val & 0x8000000000000000UL) {
pcard->ssid = read_val;
return;
}
......@@ -241,16 +241,16 @@ static int read_system_regs(struct kp2000_device *pcard)
}
read_val = readq(pcard->sysinfo_regs_base + REG_CARD_ID_AND_BUILD);
pcard->card_id = (read_val & 0xFFFFFFFF00000000) >> 32;
pcard->build_version = (read_val & 0x00000000FFFFFFFF) >> 0;
pcard->card_id = (read_val & 0xFFFFFFFF00000000UL) >> 32;
pcard->build_version = (read_val & 0x00000000FFFFFFFFUL) >> 0;
read_val = readq(pcard->sysinfo_regs_base + REG_DATE_AND_TIME_STAMPS);
pcard->build_datestamp = (read_val & 0xFFFFFFFF00000000) >> 32;
pcard->build_timestamp = (read_val & 0x00000000FFFFFFFF) >> 0;
pcard->build_datestamp = (read_val & 0xFFFFFFFF00000000UL) >> 32;
pcard->build_timestamp = (read_val & 0x00000000FFFFFFFFUL) >> 0;
read_val = readq(pcard->sysinfo_regs_base + REG_CORE_TABLE_OFFSET);
pcard->core_table_length = (read_val & 0xFFFFFFFF00000000) >> 32;
pcard->core_table_offset = (read_val & 0x00000000FFFFFFFF) >> 0;
pcard->core_table_length = (read_val & 0xFFFFFFFF00000000UL) >> 32;
pcard->core_table_offset = (read_val & 0x00000000FFFFFFFFUL) >> 0;
wait_and_read_ssid(pcard);
......@@ -401,7 +401,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
goto err_release_dma;
// Disable all "user" interrupts because they're not used yet.
writeq(0xFFFFFFFFFFFFFFFF,
writeq(0xFFFFFFFFFFFFFFFFUL,
pcard->sysinfo_regs_base + REG_INTERRUPT_MASK);
// let the card master PCIe
......
......@@ -146,15 +146,15 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
card_addr += desc->DescByteCount;
dma_addr = sg_dma_address(sg) + (p * 0x80000);
desc->DescSystemAddrLS = (dma_addr & 0x00000000FFFFFFFF) >> 0;
desc->DescSystemAddrMS = (dma_addr & 0xFFFFFFFF00000000) >> 32;
desc->DescSystemAddrLS = (dma_addr & 0x00000000FFFFFFFFUL) >> 0;
desc->DescSystemAddrMS = (dma_addr & 0xFFFFFFFF00000000UL) >> 32;
user_ctl = acd->priv->user_ctl;
if (i == acd->mapped_entry_count-1 && p == pcnt-1) {
user_ctl = acd->priv->user_ctl_last;
}
desc->DescUserControlLS = (user_ctl & 0x00000000FFFFFFFF) >> 0;
desc->DescUserControlMS = (user_ctl & 0xFFFFFFFF00000000) >> 32;
desc->DescUserControlLS = (user_ctl & 0x00000000FFFFFFFFUL) >> 0;
desc->DescUserControlMS = (user_ctl & 0xFFFFFFFF00000000UL) >> 32;
if (i == acd->mapped_entry_count-1 && p == pcnt-1)
desc->acd = acd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment