* [PATCH Resend 6/7] mmc: sdhci-dove: Remove redundant of_match_ptr
2013-10-30 11:43 Sachin Kamat
@ 2013-10-30 11:43 ` Sachin Kamat
0 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-10-30 11:43 UTC (permalink / raw)
To: linux-mmc; +Cc: cjb, sachin.kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/mmc/host/sdhci-dove.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index 95f1076..fc59f96 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -208,7 +208,7 @@ static struct platform_driver sdhci_dove_driver = {
.name = "sdhci-dove",
.owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
- .of_match_table = of_match_ptr(sdhci_dove_of_match_table),
+ .of_match_table = sdhci_dove_of_match_table,
},
.probe = sdhci_dove_probe,
.remove = sdhci_dove_remove,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof
@ 2013-12-19 8:43 Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 2/7] mmc: wmt-sdmmc: Fix NULL pointer dereference Sachin Kamat
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-12-19 8:43 UTC (permalink / raw)
To: linux-mmc; +Cc: cjb, sachin.kamat, David Vrabel
sizeof should be of the parent structure type.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: David Vrabel <david.vrabel@csr.com>
---
drivers/mmc/host/ushc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
index c0105a2e269a..d2c386f09d69 100644
--- a/drivers/mmc/host/ushc.c
+++ b/drivers/mmc/host/ushc.c
@@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const struct usb_device_id *id
ret = -ENOMEM;
goto err;
}
- ushc->csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
+ ushc->csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
if (ushc->csw == NULL) {
ret = -ENOMEM;
goto err;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH Resend 2/7] mmc: wmt-sdmmc: Fix NULL pointer dereference
2013-12-19 8:43 [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
@ 2013-12-19 8:43 ` Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 3/7] mmc: sdhci-spear: " Sachin Kamat
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-12-19 8:43 UTC (permalink / raw)
To: linux-mmc; +Cc: cjb, sachin.kamat
'of_id' is dereferenced before NULL pointer check. Move it to
after the check.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
---
drivers/mmc/host/wmt-sdmmc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index e902ed7846b0..498d1f799085 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -757,7 +757,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
const struct of_device_id *of_id =
of_match_device(wmt_mci_dt_ids, &pdev->dev);
- const struct wmt_mci_caps *wmt_caps = of_id->data;
+ const struct wmt_mci_caps *wmt_caps;
int ret;
int regular_irq, dma_irq;
@@ -766,6 +766,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
return -EFAULT;
}
+ wmt_caps = of_id->data;
+
if (!np) {
dev_err(&pdev->dev, "Missing SDMMC description in devicetree\n");
return -EFAULT;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH Resend 3/7] mmc: sdhci-spear: Fix NULL pointer dereference
2013-12-19 8:43 [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 2/7] mmc: wmt-sdmmc: Fix NULL pointer dereference Sachin Kamat
@ 2013-12-19 8:43 ` Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 4/7] mmc: davinci: Remove redundant of_match_ptr Sachin Kamat
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-12-19 8:43 UTC (permalink / raw)
To: linux-mmc; +Cc: cjb, sachin.kamat
pdata could be NULL if cd_gpio = -1. Dereference pdata only
if it is not NULL.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/mmc/host/sdhci-spear.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index 2dba9f8d1760..76ddd89a688e 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -84,14 +84,12 @@ static struct sdhci_plat_data *sdhci_probe_config_dt(struct platform_device *pde
/* If pdata is required */
if (cd_gpio != -1) {
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
+ if (!pdata)
dev_err(&pdev->dev, "DT: kzalloc failed\n");
- return ERR_PTR(-ENOMEM);
- }
+ else
+ pdata->card_int_gpio = cd_gpio;
}
- pdata->card_int_gpio = cd_gpio;
-
return pdata;
}
#else
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH Resend 4/7] mmc: davinci: Remove redundant of_match_ptr
2013-12-19 8:43 [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 2/7] mmc: wmt-sdmmc: Fix NULL pointer dereference Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 3/7] mmc: sdhci-spear: " Sachin Kamat
@ 2013-12-19 8:43 ` Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 5/7] mmc: dw_mmc: " Sachin Kamat
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-12-19 8:43 UTC (permalink / raw)
To: linux-mmc; +Cc: cjb, sachin.kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/mmc/host/davinci_mmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index d6153740b77f..5d4c5e0fba2f 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1192,7 +1192,7 @@ static struct davinci_mmc_config
struct device_node *np;
struct davinci_mmc_config *pdata = pdev->dev.platform_data;
const struct of_device_id *match =
- of_match_device(of_match_ptr(davinci_mmc_dt_ids), &pdev->dev);
+ of_match_device(davinci_mmc_dt_ids, &pdev->dev);
u32 data;
np = pdev->dev.of_node;
@@ -1468,7 +1468,7 @@ static struct platform_driver davinci_mmcsd_driver = {
.name = "davinci_mmc",
.owner = THIS_MODULE,
.pm = davinci_mmcsd_pm_ops,
- .of_match_table = of_match_ptr(davinci_mmc_dt_ids),
+ .of_match_table = davinci_mmc_dt_ids,
},
.remove = __exit_p(davinci_mmcsd_remove),
.id_table = davinci_mmc_devtype,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH Resend 5/7] mmc: dw_mmc: Remove redundant of_match_ptr
2013-12-19 8:43 [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
` (2 preceding siblings ...)
2013-12-19 8:43 ` [PATCH Resend 4/7] mmc: davinci: Remove redundant of_match_ptr Sachin Kamat
@ 2013-12-19 8:43 ` Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 6/7] mmc: sdhci-dove: " Sachin Kamat
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-12-19 8:43 UTC (permalink / raw)
To: linux-mmc; +Cc: cjb, sachin.kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
---
drivers/mmc/host/dw_mmc-pltfm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 5c4965655297..2553bfbfc6df 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -123,7 +123,7 @@ static struct platform_driver dw_mci_pltfm_driver = {
.remove = dw_mci_pltfm_remove,
.driver = {
.name = "dw_mmc",
- .of_match_table = of_match_ptr(dw_mci_pltfm_match),
+ .of_match_table = dw_mci_pltfm_match,
.pm = &dw_mci_pltfm_pmops,
},
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH Resend 6/7] mmc: sdhci-dove: Remove redundant of_match_ptr
2013-12-19 8:43 [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
` (3 preceding siblings ...)
2013-12-19 8:43 ` [PATCH Resend 5/7] mmc: dw_mmc: " Sachin Kamat
@ 2013-12-19 8:43 ` Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 7/7] mmc: dw_mmc: Add missing description Sachin Kamat
2014-01-13 3:31 ` [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
6 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-12-19 8:43 UTC (permalink / raw)
To: linux-mmc; +Cc: cjb, sachin.kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/mmc/host/sdhci-dove.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c
index 8424839660f8..736d7a2eb7ec 100644
--- a/drivers/mmc/host/sdhci-dove.c
+++ b/drivers/mmc/host/sdhci-dove.c
@@ -208,7 +208,7 @@ static struct platform_driver sdhci_dove_driver = {
.name = "sdhci-dove",
.owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
- .of_match_table = of_match_ptr(sdhci_dove_of_match_table),
+ .of_match_table = sdhci_dove_of_match_table,
},
.probe = sdhci_dove_probe,
.remove = sdhci_dove_remove,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH Resend 7/7] mmc: dw_mmc: Add missing description
2013-12-19 8:43 [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
` (4 preceding siblings ...)
2013-12-19 8:43 ` [PATCH Resend 6/7] mmc: sdhci-dove: " Sachin Kamat
@ 2013-12-19 8:43 ` Sachin Kamat
2014-01-13 3:31 ` [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
6 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2013-12-19 8:43 UTC (permalink / raw)
To: linux-mmc; +Cc: cjb, sachin.kamat
Commit 0976f16d ("mmc: dw_mmc: add support tuning scheme") introduced
the execute_tuning hook but did not add its description for kernel docs.
Update the same.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
---
drivers/mmc/host/dw_mmc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 6bf24ab917e6..306451fbbfe1 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -244,6 +244,7 @@ struct dw_mci_tuning_data {
* @prepare_command: handle CMD register extensions.
* @set_ios: handle bus specific extensions.
* @parse_dt: parse implementation specific device tree properties.
+ * @execute_tuning: implementation specific tuning procedure.
*
* Provide controller implementation specific extensions. The usage of this
* data structure is fully optional and usage of each member in this structure
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof
2013-12-19 8:43 [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
` (5 preceding siblings ...)
2013-12-19 8:43 ` [PATCH Resend 7/7] mmc: dw_mmc: Add missing description Sachin Kamat
@ 2014-01-13 3:31 ` Sachin Kamat
6 siblings, 0 replies; 9+ messages in thread
From: Sachin Kamat @ 2014-01-13 3:31 UTC (permalink / raw)
To: linux-mmc@vger.kernel.org; +Cc: Chris Ball, Sachin Kamat
On 19 December 2013 14:13, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> sizeof should be of the parent structure type.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: David Vrabel <david.vrabel@csr.com>
> ---
> drivers/mmc/host/ushc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/ushc.c b/drivers/mmc/host/ushc.c
> index c0105a2e269a..d2c386f09d69 100644
> --- a/drivers/mmc/host/ushc.c
> +++ b/drivers/mmc/host/ushc.c
> @@ -504,7 +504,7 @@ static int ushc_probe(struct usb_interface *intf, const struct usb_device_id *id
> ret = -ENOMEM;
> goto err;
> }
> - ushc->csw = kzalloc(sizeof(struct ushc_cbw), GFP_KERNEL);
> + ushc->csw = kzalloc(sizeof(struct ushc_csw), GFP_KERNEL);
> if (ushc->csw == NULL) {
> ret = -ENOMEM;
> goto err;
> --
> 1.7.9.5
>
Gentle ping on this series, Chris.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-01-13 3:31 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 8:43 [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 2/7] mmc: wmt-sdmmc: Fix NULL pointer dereference Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 3/7] mmc: sdhci-spear: " Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 4/7] mmc: davinci: Remove redundant of_match_ptr Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 5/7] mmc: dw_mmc: " Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 6/7] mmc: sdhci-dove: " Sachin Kamat
2013-12-19 8:43 ` [PATCH Resend 7/7] mmc: dw_mmc: Add missing description Sachin Kamat
2014-01-13 3:31 ` [PATCH Resend 1/7] mmc: ushc: Fix incorrect parameter in sizeof Sachin Kamat
-- strict thread matches above, loose matches on Subject: below --
2013-10-30 11:43 Sachin Kamat
2013-10-30 11:43 ` [PATCH Resend 6/7] mmc: sdhci-dove: Remove redundant of_match_ptr Sachin Kamat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).