* [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-02 14:15 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-02 14:15 UTC (permalink / raw) To: ohad, bjorn.andersson, mathieu.poirier Cc: matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, mark-pk.tsai, yj.chiang Use %pe format string to print return error code which make the error message easier to understand. Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> --- drivers/remoteproc/remoteproc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 502b6604b757..2242da320368 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, dma_get_mask(rproc->dev.parent)); if (ret) { dev_warn(dev, - "Failed to set DMA mask %llx. Trying to continue... %x\n", - dma_get_mask(rproc->dev.parent), ret); + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); } /* parse the vrings */ -- 2.18.0 ^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-02 14:15 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-02 14:15 UTC (permalink / raw) To: ohad, bjorn.andersson, mathieu.poirier Cc: matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, mark-pk.tsai, yj.chiang Use %pe format string to print return error code which make the error message easier to understand. Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> --- drivers/remoteproc/remoteproc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 502b6604b757..2242da320368 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, dma_get_mask(rproc->dev.parent)); if (ret) { dev_warn(dev, - "Failed to set DMA mask %llx. Trying to continue... %x\n", - dma_get_mask(rproc->dev.parent), ret); + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); } /* parse the vrings */ -- 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-02 14:15 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-02 14:15 UTC (permalink / raw) To: ohad, bjorn.andersson, mathieu.poirier Cc: matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, mark-pk.tsai, yj.chiang Use %pe format string to print return error code which make the error message easier to understand. Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> --- drivers/remoteproc/remoteproc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 502b6604b757..2242da320368 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, dma_get_mask(rproc->dev.parent)); if (ret) { dev_warn(dev, - "Failed to set DMA mask %llx. Trying to continue... %x\n", - dma_get_mask(rproc->dev.parent), ret); + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); } /* parse the vrings */ -- 2.18.0 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-11-02 14:15 ` Mark-PK Tsai (?) @ 2021-11-11 18:18 ` Mathieu Poirier -1 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-11 18:18 UTC (permalink / raw) To: Mark-PK Tsai Cc: ohad, bjorn.andersson, matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang Hi Mark, On Tue, 2 Nov 2021 at 08:15, Mark-PK Tsai <mark-pk.tsai@mediatek.com> wrote: > > Use %pe format string to print return error code which > make the error message easier to understand. > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > --- > drivers/remoteproc/remoteproc_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 502b6604b757..2242da320368 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > dma_get_mask(rproc->dev.parent)); > if (ret) { > dev_warn(dev, > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > - dma_get_mask(rproc->dev.parent), ret); > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); Macro ERR_PTR() is used to convert error codes to pointer type when returning from a function - I fail to see how doing so in a dev_warn() context can make the message easier to understand. Can you provide an example? Thanks, Mathieu > } > > /* parse the vrings */ > -- > 2.18.0 > ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-11 18:18 ` Mathieu Poirier 0 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-11 18:18 UTC (permalink / raw) To: Mark-PK Tsai Cc: ohad, bjorn.andersson, matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang Hi Mark, On Tue, 2 Nov 2021 at 08:15, Mark-PK Tsai <mark-pk.tsai@mediatek.com> wrote: > > Use %pe format string to print return error code which > make the error message easier to understand. > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > --- > drivers/remoteproc/remoteproc_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 502b6604b757..2242da320368 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > dma_get_mask(rproc->dev.parent)); > if (ret) { > dev_warn(dev, > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > - dma_get_mask(rproc->dev.parent), ret); > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); Macro ERR_PTR() is used to convert error codes to pointer type when returning from a function - I fail to see how doing so in a dev_warn() context can make the message easier to understand. Can you provide an example? Thanks, Mathieu > } > > /* parse the vrings */ > -- > 2.18.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-11 18:18 ` Mathieu Poirier 0 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-11 18:18 UTC (permalink / raw) To: Mark-PK Tsai Cc: ohad, bjorn.andersson, matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang Hi Mark, On Tue, 2 Nov 2021 at 08:15, Mark-PK Tsai <mark-pk.tsai@mediatek.com> wrote: > > Use %pe format string to print return error code which > make the error message easier to understand. > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > --- > drivers/remoteproc/remoteproc_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 502b6604b757..2242da320368 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > dma_get_mask(rproc->dev.parent)); > if (ret) { > dev_warn(dev, > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > - dma_get_mask(rproc->dev.parent), ret); > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); Macro ERR_PTR() is used to convert error codes to pointer type when returning from a function - I fail to see how doing so in a dev_warn() context can make the message easier to understand. Can you provide an example? Thanks, Mathieu > } > > /* parse the vrings */ > -- > 2.18.0 > _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-11-11 18:18 ` Mathieu Poirier (?) @ 2021-11-12 2:13 ` Mark-PK Tsai -1 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-12 2:13 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > Hi Mark, > > > > > > Use %pe format string to print return error code which > > make the error message easier to understand. > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > --- > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > index 502b6604b757..2242da320368 100644 > > --- a/drivers/remoteproc/remoteproc_core.c > > +++ b/drivers/remoteproc/remoteproc_core.c > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > dma_get_mask(rproc->dev.parent)); > > if (ret) { > > dev_warn(dev, > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > - dma_get_mask(rproc->dev.parent), ret); > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > Macro ERR_PTR() is used to convert error codes to pointer type when > returning from a function - I fail to see how doing so in a dev_warn() > context can make the message easier to understand. Can you provide an > example? Hi, When dma_coerce_mask_and_coherent() fail, the output log will be as following. format log %x Trying to continue... fffffffb %d Trying to continue... -5 %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-12 2:13 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-12 2:13 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > Hi Mark, > > > > > > Use %pe format string to print return error code which > > make the error message easier to understand. > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > --- > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > index 502b6604b757..2242da320368 100644 > > --- a/drivers/remoteproc/remoteproc_core.c > > +++ b/drivers/remoteproc/remoteproc_core.c > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > dma_get_mask(rproc->dev.parent)); > > if (ret) { > > dev_warn(dev, > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > - dma_get_mask(rproc->dev.parent), ret); > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > Macro ERR_PTR() is used to convert error codes to pointer type when > returning from a function - I fail to see how doing so in a dev_warn() > context can make the message easier to understand. Can you provide an > example? Hi, When dma_coerce_mask_and_coherent() fail, the output log will be as following. format log %x Trying to continue... fffffffb %d Trying to continue... -5 %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-12 2:13 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-12 2:13 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > Hi Mark, > > > > > > Use %pe format string to print return error code which > > make the error message easier to understand. > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > --- > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > index 502b6604b757..2242da320368 100644 > > --- a/drivers/remoteproc/remoteproc_core.c > > +++ b/drivers/remoteproc/remoteproc_core.c > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > dma_get_mask(rproc->dev.parent)); > > if (ret) { > > dev_warn(dev, > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > - dma_get_mask(rproc->dev.parent), ret); > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > Macro ERR_PTR() is used to convert error codes to pointer type when > returning from a function - I fail to see how doing so in a dev_warn() > context can make the message easier to understand. Can you provide an > example? Hi, When dma_coerce_mask_and_coherent() fail, the output log will be as following. format log %x Trying to continue... fffffffb %d Trying to continue... -5 %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-11-12 2:13 ` Mark-PK Tsai (?) @ 2021-11-12 16:25 ` Mathieu Poirier -1 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-12 16:25 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang On Thu, 11 Nov 2021 at 19:13, Mark-PK Tsai <mark-pk.tsai@mediatek.com> wrote: > > > Hi Mark, > > > > > > > > > > Use %pe format string to print return error code which > > > make the error message easier to understand. > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > --- > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > index 502b6604b757..2242da320368 100644 > > > --- a/drivers/remoteproc/remoteproc_core.c > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > dma_get_mask(rproc->dev.parent)); > > > if (ret) { > > > dev_warn(dev, > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > - dma_get_mask(rproc->dev.parent), ret); > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > returning from a function - I fail to see how doing so in a dev_warn() > > context can make the message easier to understand. Can you provide an > > example? > > Hi, > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > format log > %x Trying to continue... fffffffb > %d Trying to continue... -5 > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) When failing, functions dma_coerce_mask_and_coherent() returns -EIO. Casting that to a (void *) with ERR_PTR() does not change that value. Since variable @ret is already declared as "int" the real fix is to change "%x" to "%d". ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-12 16:25 ` Mathieu Poirier 0 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-12 16:25 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang On Thu, 11 Nov 2021 at 19:13, Mark-PK Tsai <mark-pk.tsai@mediatek.com> wrote: > > > Hi Mark, > > > > > > > > > > Use %pe format string to print return error code which > > > make the error message easier to understand. > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > --- > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > index 502b6604b757..2242da320368 100644 > > > --- a/drivers/remoteproc/remoteproc_core.c > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > dma_get_mask(rproc->dev.parent)); > > > if (ret) { > > > dev_warn(dev, > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > - dma_get_mask(rproc->dev.parent), ret); > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > returning from a function - I fail to see how doing so in a dev_warn() > > context can make the message easier to understand. Can you provide an > > example? > > Hi, > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > format log > %x Trying to continue... fffffffb > %d Trying to continue... -5 > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) When failing, functions dma_coerce_mask_and_coherent() returns -EIO. Casting that to a (void *) with ERR_PTR() does not change that value. Since variable @ret is already declared as "int" the real fix is to change "%x" to "%d". _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-12 16:25 ` Mathieu Poirier 0 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-12 16:25 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang On Thu, 11 Nov 2021 at 19:13, Mark-PK Tsai <mark-pk.tsai@mediatek.com> wrote: > > > Hi Mark, > > > > > > > > > > Use %pe format string to print return error code which > > > make the error message easier to understand. > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > --- > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > index 502b6604b757..2242da320368 100644 > > > --- a/drivers/remoteproc/remoteproc_core.c > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > dma_get_mask(rproc->dev.parent)); > > > if (ret) { > > > dev_warn(dev, > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > - dma_get_mask(rproc->dev.parent), ret); > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > returning from a function - I fail to see how doing so in a dev_warn() > > context can make the message easier to understand. Can you provide an > > example? > > Hi, > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > format log > %x Trying to continue... fffffffb > %d Trying to continue... -5 > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) When failing, functions dma_coerce_mask_and_coherent() returns -EIO. Casting that to a (void *) with ERR_PTR() does not change that value. Since variable @ret is already declared as "int" the real fix is to change "%x" to "%d". _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-11-12 16:25 ` Mathieu Poirier (?) @ 2021-11-16 13:57 ` Mark-PK Tsai -1 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-16 13:57 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > > > > Use %pe format string to print return error code which > > > > make the error message easier to understand. > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > --- > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > index 502b6604b757..2242da320368 100644 > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > dma_get_mask(rproc->dev.parent)); > > > > if (ret) { > > > > dev_warn(dev, > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > returning from a function - I fail to see how doing so in a dev_warn() > > > context can make the message easier to understand. Can you provide an > > > example? > > > > Hi, > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > format log > > %x Trying to continue... fffffffb > > %d Trying to continue... -5 > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > Casting that to a (void *) with ERR_PTR() does not change that value. > Since variable @ret is already declared as "int" the real fix is to > change "%x" to "%d". There're some other drivers do the same thing in the recent kernel, so I think it's fine to casting the `ret` to a (void *) for more user friendly. But I suppose it would depend on the maintainer's opinion. So how about previous patch I sent, which also fix this issue by using %d. https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-16 13:57 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-16 13:57 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > > > > Use %pe format string to print return error code which > > > > make the error message easier to understand. > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > --- > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > index 502b6604b757..2242da320368 100644 > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > dma_get_mask(rproc->dev.parent)); > > > > if (ret) { > > > > dev_warn(dev, > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > returning from a function - I fail to see how doing so in a dev_warn() > > > context can make the message easier to understand. Can you provide an > > > example? > > > > Hi, > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > format log > > %x Trying to continue... fffffffb > > %d Trying to continue... -5 > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > Casting that to a (void *) with ERR_PTR() does not change that value. > Since variable @ret is already declared as "int" the real fix is to > change "%x" to "%d". There're some other drivers do the same thing in the recent kernel, so I think it's fine to casting the `ret` to a (void *) for more user friendly. But I suppose it would depend on the maintainer's opinion. So how about previous patch I sent, which also fix this issue by using %d. https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-16 13:57 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-11-16 13:57 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > > > > Use %pe format string to print return error code which > > > > make the error message easier to understand. > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > --- > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > index 502b6604b757..2242da320368 100644 > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > dma_get_mask(rproc->dev.parent)); > > > > if (ret) { > > > > dev_warn(dev, > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > returning from a function - I fail to see how doing so in a dev_warn() > > > context can make the message easier to understand. Can you provide an > > > example? > > > > Hi, > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > format log > > %x Trying to continue... fffffffb > > %d Trying to continue... -5 > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > Casting that to a (void *) with ERR_PTR() does not change that value. > Since variable @ret is already declared as "int" the real fix is to > change "%x" to "%d". There're some other drivers do the same thing in the recent kernel, so I think it's fine to casting the `ret` to a (void *) for more user friendly. But I suppose it would depend on the maintainer's opinion. So how about previous patch I sent, which also fix this issue by using %d. https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-11-16 13:57 ` Mark-PK Tsai (?) @ 2021-11-16 16:29 ` Mathieu Poirier -1 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-16 16:29 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang Good day, On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > Use %pe format string to print return error code which > > > > > make the error message easier to understand. > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > --- > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > index 502b6604b757..2242da320368 100644 > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > dma_get_mask(rproc->dev.parent)); > > > > > if (ret) { > > > > > dev_warn(dev, > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > context can make the message easier to understand. Can you provide an > > > > example? > > > > > > Hi, > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > format log > > > %x Trying to continue... fffffffb > > > %d Trying to continue... -5 > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > Casting that to a (void *) with ERR_PTR() does not change that value. > > Since variable @ret is already declared as "int" the real fix is to > > change "%x" to "%d". > > There're some other drivers do the same thing in the recent kernel, so I think > it's fine to casting the `ret` to a (void *) for more user friendly. > But I suppose it would depend on the maintainer's opinion. > > So how about previous patch I sent, which also fix this issue by using %d. > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ I had not seen Russell's reply in the link you posted above. I am not completely sure about his solution but his insight and guidance in kernel programming have precedence over mine. I will take this patch. Thanks, Mathieu > ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-16 16:29 ` Mathieu Poirier 0 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-16 16:29 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang Good day, On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > Use %pe format string to print return error code which > > > > > make the error message easier to understand. > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > --- > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > index 502b6604b757..2242da320368 100644 > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > dma_get_mask(rproc->dev.parent)); > > > > > if (ret) { > > > > > dev_warn(dev, > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > context can make the message easier to understand. Can you provide an > > > > example? > > > > > > Hi, > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > format log > > > %x Trying to continue... fffffffb > > > %d Trying to continue... -5 > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > Casting that to a (void *) with ERR_PTR() does not change that value. > > Since variable @ret is already declared as "int" the real fix is to > > change "%x" to "%d". > > There're some other drivers do the same thing in the recent kernel, so I think > it's fine to casting the `ret` to a (void *) for more user friendly. > But I suppose it would depend on the maintainer's opinion. > > So how about previous patch I sent, which also fix this issue by using %d. > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ I had not seen Russell's reply in the link you posted above. I am not completely sure about his solution but his insight and guidance in kernel programming have precedence over mine. I will take this patch. Thanks, Mathieu > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-16 16:29 ` Mathieu Poirier 0 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-11-16 16:29 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang Good day, On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > Use %pe format string to print return error code which > > > > > make the error message easier to understand. > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > --- > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > index 502b6604b757..2242da320368 100644 > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > dma_get_mask(rproc->dev.parent)); > > > > > if (ret) { > > > > > dev_warn(dev, > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > context can make the message easier to understand. Can you provide an > > > > example? > > > > > > Hi, > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > format log > > > %x Trying to continue... fffffffb > > > %d Trying to continue... -5 > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > Casting that to a (void *) with ERR_PTR() does not change that value. > > Since variable @ret is already declared as "int" the real fix is to > > change "%x" to "%d". > > There're some other drivers do the same thing in the recent kernel, so I think > it's fine to casting the `ret` to a (void *) for more user friendly. > But I suppose it would depend on the maintainer's opinion. > > So how about previous patch I sent, which also fix this issue by using %d. > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ I had not seen Russell's reply in the link you posted above. I am not completely sure about his solution but his insight and guidance in kernel programming have precedence over mine. I will take this patch. Thanks, Mathieu > _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-11-16 16:29 ` Mathieu Poirier (?) @ 2021-12-13 7:20 ` Mark-PK Tsai -1 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-12-13 7:20 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > Good day, > > On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > > Use %pe format string to print return error code which > > > > > > make the error message easier to understand. > > > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > > --- > > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > > index 502b6604b757..2242da320368 100644 > > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > > dma_get_mask(rproc->dev.parent)); > > > > > > if (ret) { > > > > > > dev_warn(dev, > > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > > context can make the message easier to understand. Can you provide an > > > > > example? > > > > > > > > Hi, > > > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > > > format log > > > > %x Trying to continue... fffffffb > > > > %d Trying to continue... -5 > > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > > Casting that to a (void *) with ERR_PTR() does not change that value. > > > Since variable @ret is already declared as "int" the real fix is to > > > change "%x" to "%d". > > > > There're some other drivers do the same thing in the recent kernel, so I think > > it's fine to casting the `ret` to a (void *) for more user friendly. > > But I suppose it would depend on the maintainer's opinion. > > > > So how about previous patch I sent, which also fix this issue by using %d. > > > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ > > I had not seen Russell's reply in the link you posted above. I am not > completely sure about his solution but his insight and guidance in kernel > programming have precedence over mine. > > I will take this patch. > > Thanks, > Mathieu > Hi, Sorry to disturb you. Is this patch queued? Just want to make sure it has not been forgotten. ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-12-13 7:20 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-12-13 7:20 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > Good day, > > On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > > Use %pe format string to print return error code which > > > > > > make the error message easier to understand. > > > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > > --- > > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > > index 502b6604b757..2242da320368 100644 > > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > > dma_get_mask(rproc->dev.parent)); > > > > > > if (ret) { > > > > > > dev_warn(dev, > > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > > context can make the message easier to understand. Can you provide an > > > > > example? > > > > > > > > Hi, > > > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > > > format log > > > > %x Trying to continue... fffffffb > > > > %d Trying to continue... -5 > > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > > Casting that to a (void *) with ERR_PTR() does not change that value. > > > Since variable @ret is already declared as "int" the real fix is to > > > change "%x" to "%d". > > > > There're some other drivers do the same thing in the recent kernel, so I think > > it's fine to casting the `ret` to a (void *) for more user friendly. > > But I suppose it would depend on the maintainer's opinion. > > > > So how about previous patch I sent, which also fix this issue by using %d. > > > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ > > I had not seen Russell's reply in the link you posted above. I am not > completely sure about his solution but his insight and guidance in kernel > programming have precedence over mine. > > I will take this patch. > > Thanks, > Mathieu > Hi, Sorry to disturb you. Is this patch queued? Just want to make sure it has not been forgotten. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-12-13 7:20 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-12-13 7:20 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > Good day, > > On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > > Use %pe format string to print return error code which > > > > > > make the error message easier to understand. > > > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > > --- > > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > > index 502b6604b757..2242da320368 100644 > > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > > dma_get_mask(rproc->dev.parent)); > > > > > > if (ret) { > > > > > > dev_warn(dev, > > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > > context can make the message easier to understand. Can you provide an > > > > > example? > > > > > > > > Hi, > > > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > > > format log > > > > %x Trying to continue... fffffffb > > > > %d Trying to continue... -5 > > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > > Casting that to a (void *) with ERR_PTR() does not change that value. > > > Since variable @ret is already declared as "int" the real fix is to > > > change "%x" to "%d". > > > > There're some other drivers do the same thing in the recent kernel, so I think > > it's fine to casting the `ret` to a (void *) for more user friendly. > > But I suppose it would depend on the maintainer's opinion. > > > > So how about previous patch I sent, which also fix this issue by using %d. > > > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ > > I had not seen Russell's reply in the link you posted above. I am not > completely sure about his solution but his insight and guidance in kernel > programming have precedence over mine. > > I will take this patch. > > Thanks, > Mathieu > Hi, Sorry to disturb you. Is this patch queued? Just want to make sure it has not been forgotten. _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-12-13 7:20 ` Mark-PK Tsai (?) @ 2021-12-13 16:55 ` Mathieu Poirier -1 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-12-13 16:55 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang On Mon, Dec 13, 2021 at 03:20:15PM +0800, Mark-PK Tsai wrote: > > Good day, > > > > On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > > > Use %pe format string to print return error code which > > > > > > > make the error message easier to understand. > > > > > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > > > --- > > > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > > > index 502b6604b757..2242da320368 100644 > > > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > > > dma_get_mask(rproc->dev.parent)); > > > > > > > if (ret) { > > > > > > > dev_warn(dev, > > > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > > > context can make the message easier to understand. Can you provide an > > > > > > example? > > > > > > > > > > Hi, > > > > > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > > > > > format log > > > > > %x Trying to continue... fffffffb > > > > > %d Trying to continue... -5 > > > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > > > Casting that to a (void *) with ERR_PTR() does not change that value. > > > > Since variable @ret is already declared as "int" the real fix is to > > > > change "%x" to "%d". > > > > > > There're some other drivers do the same thing in the recent kernel, so I think > > > it's fine to casting the `ret` to a (void *) for more user friendly. > > > But I suppose it would depend on the maintainer's opinion. > > > > > > So how about previous patch I sent, which also fix this issue by using %d. > > > > > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ > > > > I had not seen Russell's reply in the link you posted above. I am not > > completely sure about his solution but his insight and guidance in kernel > > programming have precedence over mine. > > > > I will take this patch. > > > > Thanks, > > Mathieu > > > > Hi, > > Sorry to disturb you. > Is this patch queued? > Just want to make sure it has not been forgotten. https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/log/?h=for-next ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-12-13 16:55 ` Mathieu Poirier 0 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-12-13 16:55 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang On Mon, Dec 13, 2021 at 03:20:15PM +0800, Mark-PK Tsai wrote: > > Good day, > > > > On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > > > Use %pe format string to print return error code which > > > > > > > make the error message easier to understand. > > > > > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > > > --- > > > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > > > index 502b6604b757..2242da320368 100644 > > > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > > > dma_get_mask(rproc->dev.parent)); > > > > > > > if (ret) { > > > > > > > dev_warn(dev, > > > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > > > context can make the message easier to understand. Can you provide an > > > > > > example? > > > > > > > > > > Hi, > > > > > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > > > > > format log > > > > > %x Trying to continue... fffffffb > > > > > %d Trying to continue... -5 > > > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > > > Casting that to a (void *) with ERR_PTR() does not change that value. > > > > Since variable @ret is already declared as "int" the real fix is to > > > > change "%x" to "%d". > > > > > > There're some other drivers do the same thing in the recent kernel, so I think > > > it's fine to casting the `ret` to a (void *) for more user friendly. > > > But I suppose it would depend on the maintainer's opinion. > > > > > > So how about previous patch I sent, which also fix this issue by using %d. > > > > > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ > > > > I had not seen Russell's reply in the link you posted above. I am not > > completely sure about his solution but his insight and guidance in kernel > > programming have precedence over mine. > > > > I will take this patch. > > > > Thanks, > > Mathieu > > > > Hi, > > Sorry to disturb you. > Is this patch queued? > Just want to make sure it has not been forgotten. https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/log/?h=for-next _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-12-13 16:55 ` Mathieu Poirier 0 siblings, 0 replies; 30+ messages in thread From: Mathieu Poirier @ 2021-12-13 16:55 UTC (permalink / raw) To: Mark-PK Tsai Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, matthias.bgg, ohad, yj.chiang On Mon, Dec 13, 2021 at 03:20:15PM +0800, Mark-PK Tsai wrote: > > Good day, > > > > On Tue, Nov 16, 2021 at 09:57:03PM +0800, Mark-PK Tsai wrote: > > > > > > > Use %pe format string to print return error code which > > > > > > > make the error message easier to understand. > > > > > > > > > > > > > > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > > > > > > > --- > > > > > > > drivers/remoteproc/remoteproc_core.c | 4 ++-- > > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > > > > > > index 502b6604b757..2242da320368 100644 > > > > > > > --- a/drivers/remoteproc/remoteproc_core.c > > > > > > > +++ b/drivers/remoteproc/remoteproc_core.c > > > > > > > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > > > > > > > dma_get_mask(rproc->dev.parent)); > > > > > > > if (ret) { > > > > > > > dev_warn(dev, > > > > > > > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > > > > > > > - dma_get_mask(rproc->dev.parent), ret); > > > > > > > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > > > > > > > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > > > > > > > > > > > > Macro ERR_PTR() is used to convert error codes to pointer type when > > > > > > returning from a function - I fail to see how doing so in a dev_warn() > > > > > > context can make the message easier to understand. Can you provide an > > > > > > example? > > > > > > > > > > Hi, > > > > > > > > > > When dma_coerce_mask_and_coherent() fail, the output log will be as following. > > > > > > > > > > format log > > > > > %x Trying to continue... fffffffb > > > > > %d Trying to continue... -5 > > > > > %pe Trying to continue... -5 (if CONFIG_SYMBOLIC_ERRNAME is not set) > > > > > %pe Trying to continue... -EIO (if CONFIG_SYMBOLIC_ERRNAME=y) > > > > > > > > When failing, functions dma_coerce_mask_and_coherent() returns -EIO. > > > > Casting that to a (void *) with ERR_PTR() does not change that value. > > > > Since variable @ret is already declared as "int" the real fix is to > > > > change "%x" to "%d". > > > > > > There're some other drivers do the same thing in the recent kernel, so I think > > > it's fine to casting the `ret` to a (void *) for more user friendly. > > > But I suppose it would depend on the maintainer's opinion. > > > > > > So how about previous patch I sent, which also fix this issue by using %d. > > > > > > https://lore.kernel.org/lkml/20211102120805.27137-1-mark-pk.tsai@mediatek.com/ > > > > I had not seen Russell's reply in the link you posted above. I am not > > completely sure about his solution but his insight and guidance in kernel > > programming have precedence over mine. > > > > I will take this patch. > > > > Thanks, > > Mathieu > > > > Hi, > > Sorry to disturb you. > Is this patch queued? > Just want to make sure it has not been forgotten. https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/log/?h=for-next _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-12-13 16:55 ` Mathieu Poirier (?) @ 2021-12-14 1:31 ` Mark-PK Tsai -1 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-12-14 1:31 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > > https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/log/?h=for-next > Got it, thanks! ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-12-14 1:31 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-12-14 1:31 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > > https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/log/?h=for-next > Got it, thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-12-14 1:31 ` Mark-PK Tsai 0 siblings, 0 replies; 30+ messages in thread From: Mark-PK Tsai @ 2021-12-14 1:31 UTC (permalink / raw) To: mathieu.poirier Cc: bjorn.andersson, linux-arm-kernel, linux-kernel, linux-mediatek, linux-remoteproc, mark-pk.tsai, matthias.bgg, ohad, yj.chiang > > https://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git/log/?h=for-next > Got it, thanks! _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code 2021-11-02 14:15 ` Mark-PK Tsai (?) @ 2021-11-17 14:59 ` Bjorn Andersson -1 siblings, 0 replies; 30+ messages in thread From: Bjorn Andersson @ 2021-11-17 14:59 UTC (permalink / raw) To: Mark-PK Tsai Cc: ohad, mathieu.poirier, matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang On Tue 02 Nov 09:15 CDT 2021, Mark-PK Tsai wrote: > Use %pe format string to print return error code which > make the error message easier to understand. > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > --- > drivers/remoteproc/remoteproc_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 502b6604b757..2242da320368 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > dma_get_mask(rproc->dev.parent)); > if (ret) { > dev_warn(dev, > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > - dma_get_mask(rproc->dev.parent), ret); > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > } > > /* parse the vrings */ > -- > 2.18.0 > ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-17 14:59 ` Bjorn Andersson 0 siblings, 0 replies; 30+ messages in thread From: Bjorn Andersson @ 2021-11-17 14:59 UTC (permalink / raw) To: Mark-PK Tsai Cc: ohad, mathieu.poirier, matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang On Tue 02 Nov 09:15 CDT 2021, Mark-PK Tsai wrote: > Use %pe format string to print return error code which > make the error message easier to understand. > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > --- > drivers/remoteproc/remoteproc_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 502b6604b757..2242da320368 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > dma_get_mask(rproc->dev.parent)); > if (ret) { > dev_warn(dev, > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > - dma_get_mask(rproc->dev.parent), ret); > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > } > > /* parse the vrings */ > -- > 2.18.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v2] remoteproc: use %pe format string to print return error code @ 2021-11-17 14:59 ` Bjorn Andersson 0 siblings, 0 replies; 30+ messages in thread From: Bjorn Andersson @ 2021-11-17 14:59 UTC (permalink / raw) To: Mark-PK Tsai Cc: ohad, mathieu.poirier, matthias.bgg, linux-remoteproc, linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang On Tue 02 Nov 09:15 CDT 2021, Mark-PK Tsai wrote: > Use %pe format string to print return error code which > make the error message easier to understand. > Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com> > --- > drivers/remoteproc/remoteproc_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 502b6604b757..2242da320368 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -575,8 +575,8 @@ static int rproc_handle_vdev(struct rproc *rproc, void *ptr, > dma_get_mask(rproc->dev.parent)); > if (ret) { > dev_warn(dev, > - "Failed to set DMA mask %llx. Trying to continue... %x\n", > - dma_get_mask(rproc->dev.parent), ret); > + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", > + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); > } > > /* parse the vrings */ > -- > 2.18.0 > _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2021-12-14 1:33 UTC | newest] Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-11-02 14:15 [PATCH v2] remoteproc: use %pe format string to print return error code Mark-PK Tsai 2021-11-02 14:15 ` Mark-PK Tsai 2021-11-02 14:15 ` Mark-PK Tsai 2021-11-11 18:18 ` Mathieu Poirier 2021-11-11 18:18 ` Mathieu Poirier 2021-11-11 18:18 ` Mathieu Poirier 2021-11-12 2:13 ` Mark-PK Tsai 2021-11-12 2:13 ` Mark-PK Tsai 2021-11-12 2:13 ` Mark-PK Tsai 2021-11-12 16:25 ` Mathieu Poirier 2021-11-12 16:25 ` Mathieu Poirier 2021-11-12 16:25 ` Mathieu Poirier 2021-11-16 13:57 ` Mark-PK Tsai 2021-11-16 13:57 ` Mark-PK Tsai 2021-11-16 13:57 ` Mark-PK Tsai 2021-11-16 16:29 ` Mathieu Poirier 2021-11-16 16:29 ` Mathieu Poirier 2021-11-16 16:29 ` Mathieu Poirier 2021-12-13 7:20 ` Mark-PK Tsai 2021-12-13 7:20 ` Mark-PK Tsai 2021-12-13 7:20 ` Mark-PK Tsai 2021-12-13 16:55 ` Mathieu Poirier 2021-12-13 16:55 ` Mathieu Poirier 2021-12-13 16:55 ` Mathieu Poirier 2021-12-14 1:31 ` Mark-PK Tsai 2021-12-14 1:31 ` Mark-PK Tsai 2021-12-14 1:31 ` Mark-PK Tsai 2021-11-17 14:59 ` Bjorn Andersson 2021-11-17 14:59 ` Bjorn Andersson 2021-11-17 14:59 ` Bjorn Andersson
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.