Skip to contentSkip to conversation

spi: zynq_qspi: Use __func__ on debug

PATCH New Jagan Teki 2 participants 6 messages Oct 25, 2015

Subsystems (2)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/1 spi: zynq_qspi: Use __func__ on debug

- Use __func__ on debug
- Removed unnecessary comment

---
 drivers/spi/zynq_qspi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/spi/zynq_qspi.c +3 -5
index 8aa61d7..defc50e 100644
@@ -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, &regs->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, &regs->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, &regs->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;
 }
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 spi: zynq_qspi: Use __func__ on debug

Quoted 4 lines · Jagan Teki

- Use __func__ on debug
- Removed unnecessary comment

Applied to u-boot-spi/master

Signature · 1 line
Jagan | openedev.
#2 lore raw

PATCH 1/1 spi: zynq_qspi: Use __func__ on debug

In reply to Jagan Teki
Quoted 21 lines · Jagan Teki

- Use __func__ on debug
- Removed unnecessary comment

---
 drivers/spi/zynq_qspi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/spi/zynq_qspi.c +0 -1
index 8aa61d7..defc50e 100644
@@ -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, &regs->ier);
-	/* Start the transfer by enabling manual start bit */
 
 	/* wait for completion */
 	do {

drivers/spi/zynq_qspi.c static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, · line 519

Quoted 6 lines
drivers/spi/zynq_qspi.c +1 -1
@@ -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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151025/ddcde999/attachment.sig>
author
#3 lore raw

PATCH 1/1 spi: zynq_qspi: Use __func__ on debug

Quoted 26 lines · Tom Rini
Quoted 24 lines · Jagan Teki

- Use __func__ on debug
- Removed unnecessary comment

---
 drivers/spi/zynq_qspi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/spi/zynq_qspi.c +0 -1
index 8aa61d7..defc50e 100644
@@ -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, &regs->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;
 
Quoted 5 lines

drivers/spi/zynq_qspi.c static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, · line 519

Quoted 3 lines
drivers/spi/zynq_qspi.c +1 -1
-     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.

Signature · 1 line
Jagan | openedev.
#4 lore raw

PATCH 1/1 spi: zynq_qspi: Use __func__ on debug

Quoted 27 lines · Jagan Teki
Quoted 26 lines · Tom Rini
Quoted 24 lines · Jagan Teki

- Use __func__ on debug
- Removed unnecessary comment

---
 drivers/spi/zynq_qspi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/spi/zynq_qspi.c +0 -1
index 8aa61d7..defc50e 100644
@@ -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, &regs->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;
 
Quoted 7 lines
Quoted 5 lines

drivers/spi/zynq_qspi.c static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, · line 519

Quoted 3 lines
drivers/spi/zynq_qspi.c +1 -1
-     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__ ;)

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151025/cff54957/attachment.sig>
author
#5 lore raw

PATCH 1/1 spi: zynq_qspi: Use __func__ on debug

Quoted 34 lines · Tom Rini
Quoted 33 lines · Jagan Teki
Quoted 31 lines · Tom Rini
Quoted 21 lines · Jagan Teki

- Use __func__ on debug
- Removed unnecessary comment

---
 drivers/spi/zynq_qspi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/spi/zynq_qspi.c +0 -1
index 8aa61d7..defc50e 100644
@@ -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, &regs->ier);
-     /* Start the transfer by enabling manual start bit */
 
      /* wait for completion */
      do {

drivers/spi/zynq_qspi.c static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, · line 519

Quoted 6 lines
drivers/spi/zynq_qspi.c +1 -1
@@ -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.

Quoted 5 lines
Quoted 1 line

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.

Signature · 1 line
Jagan | openedev.