Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1276723 > unrolled thread
| Started by | Dmitry Krivenok <krivenok.dmitry@gmail.com> |
|---|---|
| First post | 2015-11-24 20:20 +0100 |
| Last post | 2015-11-30 21:40 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] Remove unneeded "0x" when %pa formatting is used. Dmitry Krivenok <krivenok.dmitry@gmail.com> - 2015-11-24 20:20 +0100
Re: [PATCH 1/1] Remove unneeded "0x" when %pa formatting is used. Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-25 21:20 +0100
Re: [PATCH 1/1] Remove unneeded "0x" when %pa formatting is used. Dmitry Krivenok <krivenok.dmitry@gmail.com> - 2015-11-30 21:40 +0100
| From | Dmitry Krivenok <krivenok.dmitry@gmail.com> |
|---|---|
| Date | 2015-11-24 20:20 +0100 |
| Subject | [PATCH 1/1] Remove unneeded "0x" when %pa formatting is used. |
| Message-ID | <qyri9-3QA-7@gated-at.bofh.it> |
Do not use "0x" in front of %pa, %pap and %pad to avoid
duplicate "0x" in the output.
Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry@gmail.com>
---
drivers/dma/at_hdmac_regs.h | 2 +-
drivers/i2c/busses/i2c-st.c | 2 +-
drivers/nvdimm/pmem.c | 2 +-
drivers/of/fdt.c | 2 +-
drivers/pci/host/pcie-iproc.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h
index 7f58f06..0474e4a 100644
--- a/drivers/dma/at_hdmac_regs.h
+++ b/drivers/dma/at_hdmac_regs.h
@@ -385,7 +385,7 @@ static void vdbg_dump_regs(struct at_dma_chan *atchan) {}
static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
{
dev_crit(chan2dev(&atchan->chan_common),
- " desc: s%pad d%pad ctrl0x%x:0x%x l0x%pad\n",
+ " desc: s%pad d%pad ctrl0x%x:0x%x l%pad\n",
&lli->saddr, &lli->daddr,
lli->ctrla, lli->ctrlb, &lli->dscr);
}
diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index ea72dca..25020ec 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -822,7 +822,7 @@ static int st_i2c_probe(struct platform_device *pdev)
adap = &i2c_dev->adap;
i2c_set_adapdata(adap, i2c_dev);
- snprintf(adap->name, sizeof(adap->name), "ST I2C(0x%pa)", &res->start);
+ snprintf(adap->name, sizeof(adap->name), "ST I2C(%pa)", &res->start);
adap->owner = THIS_MODULE;
adap->timeout = 2 * HZ;
adap->retries = 0;
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 8ee7989..93396f4 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -135,7 +135,7 @@ static struct pmem_device *pmem_alloc(struct device *dev,
if (!devm_request_mem_region(dev, pmem->phys_addr, pmem->size,
dev_name(dev))) {
- dev_warn(dev, "could not reserve region [0x%pa:0x%zx]\n",
+ dev_warn(dev, "could not reserve region [%pa:0x%zx]\n",
&pmem->phys_addr, pmem->size);
return ERR_PTR(-EBUSY);
}
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index d243029..1bbe3a9 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1041,7 +1041,7 @@ void __init __weak
early_init_dt_add_memory_arch(u64 base, u64 size)
int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base,
phys_addr_t size, bool nomap)
{
- pr_err("Reserved memory not supported, ignoring range 0x%pa - 0x%pa%s\n",
+ pr_err("Reserved memory not supported, ignoring range %pa - %pa%s\n",
&base, &size, nomap ? " (nomap)" : "");
return -ENOSYS;
}
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index eac719a..d1ad883 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -245,7 +245,7 @@ static int iproc_pcie_setup_ob(struct iproc_pcie
*pcie, u64 axi_addr,
if (size > max_size) {
dev_err(pcie->dev,
- "res size 0x%pap exceeds max supported size 0x%llx\n",
+ "res size %pap exceeds max supported size 0x%llx\n",
&size, max_size);
return -EINVAL;
}
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2015-11-25 21:20 +0100 |
| Message-ID | <qyOHM-2Bf-15@gated-at.bofh.it> |
| In reply to | #1276723 |
On Tue, Nov 24, 2015 at 9:16 PM, Dmitry Krivenok
<krivenok.dmitry@gmail.com> wrote:
> Do not use "0x" in front of %pa, %pap and %pad to avoid
> duplicate "0x" in the output.
First of all, please, split per subsystem / driver. Here seems one
file — one patch.
And one comment below.
>
> Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry@gmail.com>
> ---
> drivers/dma/at_hdmac_regs.h | 2 +-
> drivers/i2c/busses/i2c-st.c | 2 +-
> drivers/nvdimm/pmem.c | 2 +-
> drivers/of/fdt.c | 2 +-
> drivers/pci/host/pcie-iproc.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h
> index 7f58f06..0474e4a 100644
> --- a/drivers/dma/at_hdmac_regs.h
> +++ b/drivers/dma/at_hdmac_regs.h
> @@ -385,7 +385,7 @@ static void vdbg_dump_regs(struct at_dma_chan *atchan) {}
> static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
> {
> dev_crit(chan2dev(&atchan->chan_common),
> - " desc: s%pad d%pad ctrl0x%x:0x%x l0x%pad\n",
> + " desc: s%pad d%pad ctrl0x%x:0x%x l%pad\n",
> &lli->saddr, &lli->daddr,
> lli->ctrla, lli->ctrlb, &lli->dscr);
> }
> diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
> index ea72dca..25020ec 100644
> --- a/drivers/i2c/busses/i2c-st.c
> +++ b/drivers/i2c/busses/i2c-st.c
> @@ -822,7 +822,7 @@ static int st_i2c_probe(struct platform_device *pdev)
>
> adap = &i2c_dev->adap;
> i2c_set_adapdata(adap, i2c_dev);
> - snprintf(adap->name, sizeof(adap->name), "ST I2C(0x%pa)", &res->start);
> + snprintf(adap->name, sizeof(adap->name), "ST I2C(%pa)", &res->start);
> adap->owner = THIS_MODULE;
> adap->timeout = 2 * HZ;
> adap->retries = 0;
> diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
> index 8ee7989..93396f4 100644
> --- a/drivers/nvdimm/pmem.c
> +++ b/drivers/nvdimm/pmem.c
> @@ -135,7 +135,7 @@ static struct pmem_device *pmem_alloc(struct device *dev,
>
> if (!devm_request_mem_region(dev, pmem->phys_addr, pmem->size,
> dev_name(dev))) {
> - dev_warn(dev, "could not reserve region [0x%pa:0x%zx]\n",
> + dev_warn(dev, "could not reserve region [%pa:0x%zx]\n",
> &pmem->phys_addr, pmem->size);
> return ERR_PTR(-EBUSY);
> }
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index d243029..1bbe3a9 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -1041,7 +1041,7 @@ void __init __weak
> early_init_dt_add_memory_arch(u64 base, u64 size)
> int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base,
> phys_addr_t size, bool nomap)
> {
> - pr_err("Reserved memory not supported, ignoring range 0x%pa - 0x%pa%s\n",
> + pr_err("Reserved memory not supported, ignoring range %pa - %pa%s\n",
> &base, &size, nomap ? " (nomap)" : "");
> return -ENOSYS;
> }
> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
> index eac719a..d1ad883 100644
> --- a/drivers/pci/host/pcie-iproc.c
> +++ b/drivers/pci/host/pcie-iproc.c
> @@ -245,7 +245,7 @@ static int iproc_pcie_setup_ob(struct iproc_pcie
> *pcie, u64 axi_addr,
>
> if (size > max_size) {
> dev_err(pcie->dev,
> - "res size 0x%pap exceeds max supported size 0x%llx\n",
> + "res size %pap exceeds max supported size 0x%llx\n",
%pa also works.
> &size, max_size);
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Krivenok <krivenok.dmitry@gmail.com> |
|---|---|
| Date | 2015-11-30 21:40 +0100 |
| Message-ID | <qADoS-8nQ-15@gated-at.bofh.it> |
| In reply to | #1277774 |
> First of all, please, split per subsystem / driver. Here seems one
> file — one patch.
Sure, will do.
>> if (size > max_size) {
>> dev_err(pcie->dev,
>> - "res size 0x%pap exceeds max supported size 0x%llx\n",
>> + "res size %pap exceeds max supported size 0x%llx\n",
>
> %pa also works.
>
Yes, but AFAIK %pap and %pa are identical (see address_val() in lib/vsprintf.c),
so I'm not sure I understand your comment.
Did you mean that %pa should be used instead of %pap?
I see that %pa is used much more often than %pap, but I didn't find any
evidence that %pap is deprecated.
Thanks,
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web