Skip to contentSkip to conversation

staging: dgnc: use dev_err() instead of printk()

PATCH New Martin Kepplinger 2 participants 7 messages Apr 29, 2014 – May 5, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: dgnc: use dev_err() instead of printk()

Use dev_err() insted of printk() in order to provice userspace with more useful information and use the common kernel coding style.

---
 drivers/staging/dgnc/dgnc_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_sysfs.c +1 -1
index 946230c..0f0e8fc 100644
@@ -739,7 +739,7 @@ void dgnc_create_tty_sysfs(struct un_t *un, struct device *c)
 
 	ret = sysfs_create_group(&c->kobj, &dgnc_tty_attribute_group);
 	if (ret) {
-		printk(KERN_ERR "dgnc: failed to create sysfs tty device attributes.\n");
+		dev_err(c, "dgnc: failed to create sysfs tty device attributes.\n");
 		sysfs_remove_group(&c->kobj, &dgnc_tty_attribute_group);
 		return;
 	}
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 staging: dgnc: use dev_err() instead of printk()

Use dev_err() insted of printk() and remove "dgnc:" from the message. This should provide userspace with more useful information and use the common kernel coding style.

---
This makes probably more sense than the previous one.

 drivers/staging/dgnc/dgnc_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_sysfs.c +1 -1
index 946230c..88a2106 100644
@@ -739,7 +739,7 @@ void dgnc_create_tty_sysfs(struct un_t *un, struct device *c)
 
 	ret = sysfs_create_group(&c->kobj, &dgnc_tty_attribute_group);
 	if (ret) {
-		printk(KERN_ERR "dgnc: failed to create sysfs tty device attributes.\n");
+		dev_err(c, "failed to create sysfs tty device attributes.\n");
 		sysfs_remove_group(&c->kobj, &dgnc_tty_attribute_group);
 		return;
 	}
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH RESEND 1/1 staging: dgnc: use dev_err() instead of printk()

Use dev_err() instead of printk() and remove "dgnc:" from the message. This should provide userspace with more useful information and use the common kernel coding style.

---
 drivers/staging/dgnc/dgnc_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_sysfs.c +1 -1
index 946230c..88a2106 100644
@@ -739,7 +739,7 @@ void dgnc_create_tty_sysfs(struct un_t *un, struct device *c)
 
 	ret = sysfs_create_group(&c->kobj, &dgnc_tty_attribute_group);
 	if (ret) {
-		printk(KERN_ERR "dgnc: failed to create sysfs tty device attributes.\n");
+		dev_err(c, "failed to create sysfs tty device attributes.\n");
 		sysfs_remove_group(&c->kobj, &dgnc_tty_attribute_group);
 		return;
 	}
Signature · 1 line
1.7.10.4
#3 lore raw
Quoted 4 lines · Martin Kepplinger

Use dev_err() instead of printk() and remove "dgnc:" from the message. This should provide userspace with more useful information and use the common kernel coding style.

Whenever I see a "RESEND" in a subject and no explanation then it means our development process has broken down. Meanwhile this is the first time I have seen this patch so the problem is not on our side.

regards,
dan carpenter

#4 lore raw

Am 2014-05-05 13:35, schrieb Dan Carpenter:

Quoted 6 lines · Martin Kepplinger
Quoted 4 lines

Use dev_err() instead of printk() and remove "dgnc:" from the message. This should provide userspace with more useful information and use the common kernel coding style.

Quoted 7 lines

Whenever I see a "RESEND" in a subject and no explanation then it means our development process has broken down. Meanwhile this is the first time I have seen this patch so the problem is not on our side.

regards,
dan carpenter

I just resent https://lkml.org/lkml/2014/4/29/164 after waiting a week or so. I don't see any breakdown.

martin

#5 lore raw
Quoted 11 lines · Martin Kepplinger

Am 2014-05-05 13:35, schrieb Dan Carpenter:

Quoted 10 lines · Martin Kepplinger
Quoted 4 lines

Use dev_err() instead of printk() and remove "dgnc:" from the message. This should provide userspace with more useful information and use the common kernel coding style.

Whenever I see a "RESEND" in a subject and no explanation then it means our development process has broken down. Meanwhile this is the first time I have seen this patch so the problem is not on our side.

Quoted 6 lines
Quoted 3 lines

regards,
dan carpenter

I just resent https://lkml.org/lkml/2014/4/29/164 after waiting a week or so. I don't see any breakdown.

What I'm saying is just put an explanation after the --- cut off so we know what you did wrong the first time.

Signed-off-by ...
---
Resending because I sent it to the wrong email list the first time. Oops! Next time I will use get_maintainer.pl, I promise!

Just a simple explanation like that is ok.

regards,
dan carpenter

#6 lore raw

Am 2014-05-05 14:36, schrieb Dan Carpenter:

Quoted 28 lines · Martin Kepplinger
Quoted 11 lines

Am 2014-05-05 13:35, schrieb Dan Carpenter:

Quoted 10 lines · Martin Kepplinger
Quoted 4 lines

Use dev_err() instead of printk() and remove "dgnc:" from the message. This should provide userspace with more useful information and use the common kernel coding style.

Whenever I see a "RESEND" in a subject and no explanation then it means our development process has broken down. Meanwhile this is the first time I have seen this patch so the problem is not on our side.

Quoted 6 lines
Quoted 3 lines

regards,
dan carpenter

I just resent https://lkml.org/lkml/2014/4/29/164 after waiting a week or so. I don't see any breakdown.

What I'm saying is just put an explanation after the --- cut off so we know what you did wrong the first time.

Signed-off-by ...
---
Resending because I sent it to the wrong email list the first time. Oops! Next time I will use get_maintainer.pl, I promise!

Quoted 5 lines

Just a simple explanation like that is ok.

regards,
dan carpenter

sure, thanks.