Message ID | 20200227180915.9541-1-digetx@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1] media: staging: tegra-vde: Use devm_platform_ioremap_resource_byname() | expand |
On Thu, Feb 27, 2020 at 09:09:15PM +0300, Dmitry Osipenko wrote:
> This helps to make code cleaner a tad.
Please don't start the commit message in the middle of a sentence.
It looks like this for some of us:
https://marc.info/?l=linux-driver-devel&m=158282701430176&w=2
I generally read the subject or the full commit message but seldom
both.
Otherwise the patch looks very good.
regards,
dan carpenter
02.03.2020 11:04, Dan Carpenter пишет: > On Thu, Feb 27, 2020 at 09:09:15PM +0300, Dmitry Osipenko wrote: >> This helps to make code cleaner a tad. > > Please don't start the commit message in the middle of a sentence. Could you please clarify what do you mean by the "middle of a sentence"? The commit's message doesn't sound "middle" to me at all. > It looks like this for some of us: > > https://marc.info/?l=linux-driver-devel&m=158282701430176&w=2 This link points to this patch, I don't quite understand what you're trying to convey here. > I generally read the subject or the full commit message but seldom > both. The commit's title describes the change briefly, while the message gives a rational for the change. Usually reviewer should consult the code changes themselves for more details. Do you have some kind of a email filter that shows only the commit's message? Otherwise I'm not sure what's the problem. > Otherwise the patch looks very good. Thanks
On Mon, Mar 02, 2020 at 06:04:20PM +0300, Dmitry Osipenko wrote: > 02.03.2020 11:04, Dan Carpenter пишет: > > On Thu, Feb 27, 2020 at 09:09:15PM +0300, Dmitry Osipenko wrote: > >> This helps to make code cleaner a tad. > > > > Please don't start the commit message in the middle of a sentence. > > Could you please clarify what do you mean by the "middle of a sentence"? > The commit's message doesn't sound "middle" to me at all. > > > It looks like this for some of us: > > > > https://marc.info/?l=linux-driver-devel&m=158282701430176&w=2 > > This link points to this patch, I don't quite understand what you're > trying to convey here. > > > I generally read the subject or the full commit message but seldom > > both. > > The commit's title describes the change briefly, while the message gives > a rational for the change. Usually reviewer should consult the code > changes themselves for more details. > > Do you have some kind of a email filter that shows only the commit's > message? Otherwise I'm not sure what's the problem. The commit message just says "This helps to make code cleaner a tad." but it doesn't mention devm_platform_ioremap_resource_byname(). That information is there in the subject but not in the commit message itself. Take a look at the link I sent you and try to find the subject. It's far away from the commit message. regards, dan carpenter
diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c index e18fd48981da..d3e63512a765 100644 --- a/drivers/staging/media/tegra-vde/vde.c +++ b/drivers/staging/media/tegra-vde/vde.c @@ -949,7 +949,6 @@ static int tegra_vde_runtime_resume(struct device *dev) static int tegra_vde_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *regs; struct tegra_vde *vde; int irq, err; @@ -959,75 +958,39 @@ static int tegra_vde_probe(struct platform_device *pdev) platform_set_drvdata(pdev, vde); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sxe"); - if (!regs) - return -ENODEV; - - vde->sxe = devm_ioremap_resource(dev, regs); + vde->sxe = devm_platform_ioremap_resource_byname(pdev, "sxe"); if (IS_ERR(vde->sxe)) return PTR_ERR(vde->sxe); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "bsev"); - if (!regs) - return -ENODEV; - - vde->bsev = devm_ioremap_resource(dev, regs); + vde->bsev = devm_platform_ioremap_resource_byname(pdev, "bsev"); if (IS_ERR(vde->bsev)) return PTR_ERR(vde->bsev); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mbe"); - if (!regs) - return -ENODEV; - - vde->mbe = devm_ioremap_resource(dev, regs); + vde->mbe = devm_platform_ioremap_resource_byname(pdev, "mbe"); if (IS_ERR(vde->mbe)) return PTR_ERR(vde->mbe); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ppe"); - if (!regs) - return -ENODEV; - - vde->ppe = devm_ioremap_resource(dev, regs); + vde->ppe = devm_platform_ioremap_resource_byname(pdev, "ppe"); if (IS_ERR(vde->ppe)) return PTR_ERR(vde->ppe); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mce"); - if (!regs) - return -ENODEV; - - vde->mce = devm_ioremap_resource(dev, regs); + vde->mce = devm_platform_ioremap_resource_byname(pdev, "mce"); if (IS_ERR(vde->mce)) return PTR_ERR(vde->mce); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "tfe"); - if (!regs) - return -ENODEV; - - vde->tfe = devm_ioremap_resource(dev, regs); + vde->tfe = devm_platform_ioremap_resource_byname(pdev, "tfe"); if (IS_ERR(vde->tfe)) return PTR_ERR(vde->tfe); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ppb"); - if (!regs) - return -ENODEV; - - vde->ppb = devm_ioremap_resource(dev, regs); + vde->ppb = devm_platform_ioremap_resource_byname(pdev, "ppb"); if (IS_ERR(vde->ppb)) return PTR_ERR(vde->ppb); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vdma"); - if (!regs) - return -ENODEV; - - vde->vdma = devm_ioremap_resource(dev, regs); + vde->vdma = devm_platform_ioremap_resource_byname(pdev, "vdma"); if (IS_ERR(vde->vdma)) return PTR_ERR(vde->vdma); - regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "frameid"); - if (!regs) - return -ENODEV; - - vde->frameid = devm_ioremap_resource(dev, regs); + vde->frameid = devm_platform_ioremap_resource_byname(pdev, "frameid"); if (IS_ERR(vde->frameid)) return PTR_ERR(vde->frameid);
This helps to make code cleaner a tad. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> --- drivers/staging/media/tegra-vde/vde.c | 55 +++++---------------------- 1 file changed, 9 insertions(+), 46 deletions(-)