[U-Boot] [PATCH] spi: zynq_qspi: Use __func__ on debug

- Use __func__ on debug - Removed unnecessary comment
Signed-off-by: Jagan Teki jteki@openedev.com --- drivers/spi/zynq_qspi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index 8aa61d7..defc50e 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -430,7 +430,6 @@ static int zynq_qspi_start_transfer(struct zynq_qspi_priv *priv) zynq_qspi_fill_tx_fifo(priv, priv->fifo_depth);
writel(ZYNQ_QSPI_IXR_ALL_MASK, ®s->ier); - /* Start the transfer by enabling manual start bit */
/* wait for completion */ do { @@ -516,7 +515,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, priv->rx_buf = din; priv->len = bitlen / 8;
- debug("spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n", + debug("zynq_spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n", bus->seq, slave_plat->cs, bitlen, priv->len, flags);
/* @@ -569,8 +568,7 @@ static int zynq_qspi_set_speed(struct udevice *bus, uint speed) writel(confr, ®s->cr); priv->freq = speed;
- debug("zynq_spi_set_speed: regs=%p, speed=%d\n", - priv->regs, priv->freq); + debug("%s: regs=%p, speed=%d\n", __func__, priv->regs, priv->freq);
return 0; } @@ -593,7 +591,7 @@ static int zynq_qspi_set_mode(struct udevice *bus, uint mode) writel(confr, ®s->cr); priv->mode = mode;
- debug("zynq_spi_set_mode: regs=%p, mode=%d\n", priv->regs, priv->mode); + debug("%s: regs=%p, mode=%d\n", __func__, priv->regs, priv->mode);
return 0; }

On 25 October 2015 at 09:36, Jagan Teki jteki@openedev.com wrote:
- Use __func__ on debug
- Removed unnecessary comment
Signed-off-by: Jagan Teki jteki@openedev.com
Applied to u-boot-spi/master

On Sun, Oct 25, 2015 at 09:36:59AM +0530, Jagan Teki wrote:
- Use __func__ on debug
- Removed unnecessary comment
Signed-off-by: Jagan Teki jteki@openedev.com
drivers/spi/zynq_qspi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index 8aa61d7..defc50e 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -430,7 +430,6 @@ static int zynq_qspi_start_transfer(struct zynq_qspi_priv *priv) zynq_qspi_fill_tx_fifo(priv, priv->fifo_depth);
writel(ZYNQ_QSPI_IXR_ALL_MASK, ®s->ier);
/* Start the transfer by enabling manual start bit */
/* wait for completion */ do {
@@ -516,7 +515,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, priv->rx_buf = din; priv->len = bitlen / 8;
- debug("spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n",
- debug("zynq_spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n", bus->seq, slave_plat->cs, bitlen, priv->len, flags);
Switch to __func__ here.

On 25 October 2015 at 19:17, Tom Rini trini@konsulko.com wrote:
On Sun, Oct 25, 2015 at 09:36:59AM +0530, Jagan Teki wrote:
- Use __func__ on debug
- Removed unnecessary comment
Signed-off-by: Jagan Teki jteki@openedev.com
drivers/spi/zynq_qspi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index 8aa61d7..defc50e 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -430,7 +430,6 @@ static int zynq_qspi_start_transfer(struct zynq_qspi_priv *priv) zynq_qspi_fill_tx_fifo(priv, priv->fifo_depth);
writel(ZYNQ_QSPI_IXR_ALL_MASK, ®s->ier);
/* Start the transfer by enabling manual start bit */ /* wait for completion */ do {
@@ -516,7 +515,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, priv->rx_buf = din; priv->len = bitlen / 8;
debug("spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n",
debug("zynq_spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n", bus->seq, slave_plat->cs, bitlen, priv->len, flags);
Switch to __func__ here.
Apologies for the mistake here will update the commit message on the branch.

On Sun, Oct 25, 2015 at 07:22:24PM +0530, Jagan Teki wrote:
On 25 October 2015 at 19:17, Tom Rini trini@konsulko.com wrote:
On Sun, Oct 25, 2015 at 09:36:59AM +0530, Jagan Teki wrote:
- Use __func__ on debug
- Removed unnecessary comment
Signed-off-by: Jagan Teki jteki@openedev.com
drivers/spi/zynq_qspi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index 8aa61d7..defc50e 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -430,7 +430,6 @@ static int zynq_qspi_start_transfer(struct zynq_qspi_priv *priv) zynq_qspi_fill_tx_fifo(priv, priv->fifo_depth);
writel(ZYNQ_QSPI_IXR_ALL_MASK, ®s->ier);
/* Start the transfer by enabling manual start bit */ /* wait for completion */ do {
@@ -516,7 +515,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, priv->rx_buf = din; priv->len = bitlen / 8;
debug("spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n",
debug("zynq_spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n", bus->seq, slave_plat->cs, bitlen, priv->len, flags);
Switch to __func__ here.
Apologies for the mistake here will update the commit message on the branch.
Well, not just the commit message but the debug() too, you say "zynq_spi_xfer" in "zynq_qspi_xfer" so we really do want __func__ ;)

On 25 October 2015 at 19:34, Tom Rini trini@konsulko.com wrote:
On Sun, Oct 25, 2015 at 07:22:24PM +0530, Jagan Teki wrote:
On 25 October 2015 at 19:17, Tom Rini trini@konsulko.com wrote:
On Sun, Oct 25, 2015 at 09:36:59AM +0530, Jagan Teki wrote:
- Use __func__ on debug
- Removed unnecessary comment
Signed-off-by: Jagan Teki jteki@openedev.com
drivers/spi/zynq_qspi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index 8aa61d7..defc50e 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -430,7 +430,6 @@ static int zynq_qspi_start_transfer(struct zynq_qspi_priv *priv) zynq_qspi_fill_tx_fifo(priv, priv->fifo_depth);
writel(ZYNQ_QSPI_IXR_ALL_MASK, ®s->ier);
/* Start the transfer by enabling manual start bit */ /* wait for completion */ do {
@@ -516,7 +515,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, priv->rx_buf = din; priv->len = bitlen / 8;
debug("spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n",
debug("zynq_spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n", bus->seq, slave_plat->cs, bitlen, priv->len, flags);
Switch to __func__ here.
Apologies for the mistake here will update the commit message on the branch.
Well, not just the commit message but the debug() too, you say "zynq_spi_xfer" in "zynq_qspi_xfer" so we really do want __func__ ;)
OK, _func__ not used here but for remaining speed and mode functions - Will update accordingly.
participants (2)
-
Jagan Teki
-
Tom Rini