|
|
105329 |
From 15ba2cfbba429fae30b2556cd7d97b5e92d4e656 Mon Sep 17 00:00:00 2001
|
|
|
105329 |
From: Marcus Sundberg <marcus.sundberg@aptilo.com>
|
|
|
105329 |
Date: Mon, 8 Feb 2016 15:16:03 +0100
|
|
|
105329 |
Subject: [PATCH] i40e: Do not cast directly from pointer to u64.
|
|
|
105329 |
|
|
|
105329 |
Causes warnings on 32 bit systems.
|
|
|
105329 |
---
|
|
|
105329 |
drivers/net/ethernet/intel/i40evf/i40e_common.c | 12 ++++++++----
|
|
|
105329 |
1 file changed, 8 insertions(+), 4 deletions(-)
|
|
|
105329 |
|
|
|
105329 |
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
|
|
|
105329 |
index 1950db1..376aab2 100644
|
|
|
105329 |
--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
|
|
|
105329 |
+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
|
|
|
105329 |
@@ -442,8 +442,10 @@ static i40e_status i40e_aq_get_set_rss_lut(struct i40e_hw *hw,
|
|
|
105329 |
I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) &
|
|
|
105329 |
I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK));
|
|
|
105329 |
|
|
|
105329 |
- cmd_resp->addr_high = cpu_to_le32(high_16_bits((u64)lut));
|
|
|
105329 |
- cmd_resp->addr_low = cpu_to_le32(lower_32_bits((u64)lut));
|
|
|
105329 |
+ cmd_resp->addr_high = cpu_to_le32(
|
|
|
105329 |
+ high_16_bits((u64)(unsigned long)lut));
|
|
|
105329 |
+ cmd_resp->addr_low = cpu_to_le32(
|
|
|
105329 |
+ lower_32_bits((u64)(unsigned long)lut));
|
|
|
105329 |
|
|
|
105329 |
status = i40evf_asq_send_command(hw, &desc, lut, lut_size, NULL);
|
|
|
105329 |
|
|
|
105329 |
@@ -519,8 +521,10 @@ static i40e_status i40e_aq_get_set_rss_key(struct i40e_hw *hw,
|
|
|
105329 |
I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) &
|
|
|
105329 |
I40E_AQC_SET_RSS_KEY_VSI_ID_MASK));
|
|
|
105329 |
cmd_resp->vsi_id |= cpu_to_le16((u16)I40E_AQC_SET_RSS_KEY_VSI_VALID);
|
|
|
105329 |
- cmd_resp->addr_high = cpu_to_le32(high_16_bits((u64)key));
|
|
|
105329 |
- cmd_resp->addr_low = cpu_to_le32(lower_32_bits((u64)key));
|
|
|
105329 |
+ cmd_resp->addr_high = cpu_to_le32(
|
|
|
105329 |
+ high_16_bits((u64)(unsigned long)key));
|
|
|
105329 |
+ cmd_resp->addr_low = cpu_to_le32(
|
|
|
105329 |
+ lower_32_bits((u64)(unsigned long)key));
|
|
|
105329 |
|
|
|
105329 |
status = i40evf_asq_send_command(hw, &desc, key, key_size, NULL);
|
|
|
105329 |
|
|
|
105329 |
--
|
|
|
105329 |
1.8.3.1
|
|
|
105329 |
|
|
|
105329 |
From f11d529aa8ebd81218d8a0a2a8c04c4f41f3718f Mon Sep 17 00:00:00 2001
|
|
|
105329 |
From: Marcus Sundberg <marcus.sundberg@aptilo.com>
|
|
|
105329 |
Date: Mon, 8 Feb 2016 18:34:39 +0100
|
|
|
105329 |
Subject: [PATCH] iw_cxgb4: 32b platform fix
|
|
|
105329 |
|
|
|
105329 |
Casting pci_resource_start() return value directly to void * causes
|
|
|
105329 |
a warning.
|
|
|
105329 |
---
|
|
|
105329 |
drivers/infiniband/hw/cxgb4/device.c | 2 +-
|
|
|
105329 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
105329 |
|
|
|
105329 |
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
|
|
|
105329 |
index 11d55c9..94c2391 100644
|
|
|
105329 |
--- a/drivers/infiniband/hw/cxgb4/device.c
|
|
|
105329 |
+++ b/drivers/infiniband/hw/cxgb4/device.c
|
|
|
105329 |
@@ -830,7 +830,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
|
|
|
105329 |
PDBG("udb len 0x%x udb base %p db_reg %p gts_reg %p qpshift %lu "
|
|
|
105329 |
"qpmask 0x%x cqshift %lu cqmask 0x%x\n",
|
|
|
105329 |
(unsigned)pci_resource_len(rdev->lldi.pdev, 2),
|
|
|
105329 |
- (void *)pci_resource_start(rdev->lldi.pdev, 2),
|
|
|
105329 |
+ (void *)(unsigned long)pci_resource_start(rdev->lldi.pdev, 2),
|
|
|
105329 |
rdev->lldi.db_reg,
|
|
|
105329 |
rdev->lldi.gts_reg,
|
|
|
105329 |
rdev->qpshift, rdev->qpmask,
|
|
|
105329 |
--
|
|
|
105329 |
1.8.3.1
|
|
|
105329 |
|
|
|
105329 |
From 39f3f2d7be077d4a067d95ea2b3f02e51f7a05f3 Mon Sep 17 00:00:00 2001
|
|
|
105329 |
From: Marcus Sundberg <marcus.sundberg@aptilo.com>
|
|
|
105329 |
Date: Mon, 8 Feb 2016 18:18:10 +0100
|
|
|
105329 |
Subject: [PATCH] nvme: fix pointer cast warnings on 32 bit
|
|
|
105329 |
|
|
|
105329 |
---
|
|
|
105329 |
drivers/block/nvme-core.c | 9 +++++----
|
|
|
105329 |
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
105329 |
|
|
|
105329 |
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
|
|
|
105329 |
index 711d96a..eafb721 100644
|
|
|
105329 |
--- a/drivers/block/nvme-core.c
|
|
|
105329 |
+++ b/drivers/block/nvme-core.c
|
|
|
105329 |
@@ -1693,8 +1693,9 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
|
|
|
105329 |
goto unmap;
|
|
|
105329 |
}
|
|
|
105329 |
if (write) {
|
|
|
105329 |
- if (copy_from_user(meta, (void __user *)io.metadata,
|
|
|
105329 |
- meta_len)) {
|
|
|
105329 |
+ if (copy_from_user(meta,
|
|
|
105329 |
+ (void __user *)(uintptr_t)io.metadata,
|
|
|
105329 |
+ meta_len)) {
|
|
|
105329 |
status = -EFAULT;
|
|
|
105329 |
goto unmap;
|
|
|
105329 |
}
|
|
|
105329 |
@@ -1722,8 +1723,8 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
|
|
|
105329 |
|
|
|
105329 |
if (meta) {
|
|
|
105329 |
if (status == NVME_SC_SUCCESS && !write) {
|
|
|
105329 |
- if (copy_to_user((void __user *)io.metadata, meta,
|
|
|
105329 |
- meta_len))
|
|
|
105329 |
+ if (copy_to_user((void __user *)(uintptr_t)io.metadata,
|
|
|
105329 |
+ meta, meta_len))
|
|
|
105329 |
status = -EFAULT;
|
|
|
105329 |
}
|
|
|
105329 |
dma_free_coherent(&dev->pci_dev->dev, meta_len, meta, meta_dma);
|
|
|
105329 |
--
|
|
|
105329 |
1.8.3.1
|
|
|
105329 |
|
|
|
105329 |
From d719f2b11f08861d97992f5973b7465fdb150a42 Mon Sep 17 00:00:00 2001
|
|
|
105329 |
From: Marcus Sundberg <marcus.sundberg@aptilo.com>
|
|
|
105329 |
Date: Mon, 8 Feb 2016 14:46:16 +0100
|
|
|
105329 |
Subject: [PATCH] (queue_store_unpriv_sgio): Check return from queue_var_store
|
|
|
105329 |
|
|
|
105329 |
---
|
|
|
105329 |
block/blk-sysfs.c | 2 ++
|
|
|
105329 |
1 file changed, 2 insertions(+)
|
|
|
105329 |
|
|
|
105329 |
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
|
|
|
105329 |
index 13c5338..1f168c0 100644
|
|
|
105329 |
--- a/block/blk-sysfs.c
|
|
|
105329 |
+++ b/block/blk-sysfs.c
|
|
|
105329 |
@@ -207,6 +207,8 @@ queue_store_unpriv_sgio(struct request_queue *q, const char *page, size_t count)
|
|
|
105329 |
return -EPERM;
|
|
|
105329 |
|
|
|
105329 |
ret = queue_var_store(&val, page, count);
|
|
|
105329 |
+ if (ret < 0)
|
|
|
105329 |
+ return ret;
|
|
|
105329 |
spin_lock_irq(q->queue_lock);
|
|
|
105329 |
if (val)
|
|
|
105329 |
queue_flag_set(QUEUE_FLAG_UNPRIV_SGIO, q);
|
|
|
105329 |
--
|
|
|
105329 |
1.8.3.1
|
|
|
105329 |
|