Re: [PATCH] staging: media: cxd2099: Use __func__ macro in messages

2017-05-12 Thread Alex Ghiti

This patch should be dropped as Jasmin is updating this driver.

Thanks,

On 05/09/2017 02:27 PM, Alexandre Ghiti wrote:

Replace hardcoded function names in print info with __func__.

Signed-off-by: Alexandre Ghiti 
---
 drivers/staging/media/cxd2099/cxd2099.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/cxd2099/cxd2099.c 
b/drivers/staging/media/cxd2099/cxd2099.c
index 18186d0..370ecb9 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -473,7 +473,7 @@ static int slot_shutdown(struct dvb_ca_en50221 *ca, int 
slot)
 {
struct cxd *ci = ca->data;

-   dev_info(>i2c->dev, "slot_shutdown\n");
+   dev_info(>i2c->dev, "%s\n", __func__);
mutex_lock(>lock);
write_regm(ci, 0x09, 0x08, 0x08);
write_regm(ci, 0x20, 0x80, 0x80); /* Reset CAM Mode */
@@ -564,7 +564,7 @@ static int read_data(struct dvb_ca_en50221 *ca, int slot, 
u8 *ebuf, int ecount)
campoll(ci);
mutex_unlock(>lock);

-   dev_info(>i2c->dev, "read_data\n");
+   dev_info(>i2c->dev, "%s\n", __func__);
if (!ci->dr)
return 0;

@@ -584,7 +584,7 @@ static int write_data(struct dvb_ca_en50221 *ca, int slot, 
u8 *ebuf, int ecount)
struct cxd *ci = ca->data;

mutex_lock(>lock);
-   dev_info(>i2c->dev, "write_data %d\n", ecount);
+   dev_info(>i2c->dev, "%s %d\n", __func__, ecount);
write_reg(ci, 0x0d, ecount >> 8);
write_reg(ci, 0x0e, ecount & 0xff);
write_block(ci, 0x11, ebuf, ecount);



Re: [PATCH] staging: media: cxd2099: Use __func__ macro in messages

2017-05-09 Thread Jasmin J.

Hi Alexandre!

The current cxd2099 driver is an old version. DD provides a newer variant.
Please see my patch series
  http://www.mail-archive.com/linux-media@vger.kernel.org/msg112410.html
Especially this patch
  http://www.mail-archive.com/linux-media@vger.kernel.org/msg112409.html
where I remove this useless printing already.

I kept the "slot_shutdown" print in my series, because it is useful and called
only if someone removes the CAM.

So I can agree with your first hunk.

BR,
   Jasmin


[PATCH] staging: media: cxd2099: Use __func__ macro in messages

2017-05-09 Thread Alexandre Ghiti
Replace hardcoded function names in print info with __func__.

Signed-off-by: Alexandre Ghiti 
---
 drivers/staging/media/cxd2099/cxd2099.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/cxd2099/cxd2099.c 
b/drivers/staging/media/cxd2099/cxd2099.c
index 18186d0..370ecb9 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -473,7 +473,7 @@ static int slot_shutdown(struct dvb_ca_en50221 *ca, int 
slot)
 {
struct cxd *ci = ca->data;
 
-   dev_info(>i2c->dev, "slot_shutdown\n");
+   dev_info(>i2c->dev, "%s\n", __func__);
mutex_lock(>lock);
write_regm(ci, 0x09, 0x08, 0x08);
write_regm(ci, 0x20, 0x80, 0x80); /* Reset CAM Mode */
@@ -564,7 +564,7 @@ static int read_data(struct dvb_ca_en50221 *ca, int slot, 
u8 *ebuf, int ecount)
campoll(ci);
mutex_unlock(>lock);
 
-   dev_info(>i2c->dev, "read_data\n");
+   dev_info(>i2c->dev, "%s\n", __func__);
if (!ci->dr)
return 0;
 
@@ -584,7 +584,7 @@ static int write_data(struct dvb_ca_en50221 *ca, int slot, 
u8 *ebuf, int ecount)
struct cxd *ci = ca->data;
 
mutex_lock(>lock);
-   dev_info(>i2c->dev, "write_data %d\n", ecount);
+   dev_info(>i2c->dev, "%s %d\n", __func__, ecount);
write_reg(ci, 0x0d, ecount >> 8);
write_reg(ci, 0x0e, ecount & 0xff);
write_block(ci, 0x11, ebuf, ecount);
-- 
2.1.4