linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drivers: usb: atm: reduce noise
@ 2020-12-08  9:32 Enrico Weigelt, metux IT consult
  2020-12-08  9:32 ` [PATCH 2/3] drivers: usb: atm: use atm_info() instead of atm_printk(KERN_INFO Enrico Weigelt, metux IT consult
  2020-12-08  9:32 ` [PATCH 3/3] drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk() Enrico Weigelt, metux IT consult
  0 siblings, 2 replies; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-12-08  9:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: duncan.sands, accessrunner-general, linux-usb

If drivers work correctly, they should remain silent.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/usb/atm/cxacru.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index e62a770a5d3b..0114cc54e622 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -810,9 +810,6 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance,
 	mutex_unlock(&instance->poll_state_serialize);
 	mutex_unlock(&instance->adsl_state_serialize);
 
-	printk(KERN_INFO "%s%d: %s %pM\n", atm_dev->type, atm_dev->number,
-			usbatm_instance->description, atm_dev->esi);
-
 	if (start_polling)
 		cxacru_poll_status(&instance->poll_work.work);
 	return 0;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] drivers: usb: atm: use atm_info() instead of atm_printk(KERN_INFO ...
  2020-12-08  9:32 [PATCH 1/3] drivers: usb: atm: reduce noise Enrico Weigelt, metux IT consult
@ 2020-12-08  9:32 ` Enrico Weigelt, metux IT consult
  2020-12-08  9:32 ` [PATCH 3/3] drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk() Enrico Weigelt, metux IT consult
  1 sibling, 0 replies; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-12-08  9:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: duncan.sands, accessrunner-general, linux-usb

Since we already have the useful atm_info() macro, use it instead of
raw atm_printk()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/usb/atm/cxacru.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 0114cc54e622..4d3947476f0e 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -849,15 +849,15 @@ static void cxacru_poll_status(struct work_struct *work)
 
 		switch (instance->adsl_status) {
 		case 0:
-			atm_printk(KERN_INFO, usbatm, "ADSL state: running\n");
+			atm_info(usbatm, "ADSL state: running\n");
 			break;
 
 		case 1:
-			atm_printk(KERN_INFO, usbatm, "ADSL state: stopped\n");
+			atm_info(usbatm, "ADSL state: stopped\n");
 			break;
 
 		default:
-			atm_printk(KERN_INFO, usbatm, "Unknown adsl status %02x\n", instance->adsl_status);
+			atm_info(usbatm, "Unknown adsl status %02x\n", instance->adsl_status);
 			break;
 		}
 	}
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk()
  2020-12-08  9:32 [PATCH 1/3] drivers: usb: atm: reduce noise Enrico Weigelt, metux IT consult
  2020-12-08  9:32 ` [PATCH 2/3] drivers: usb: atm: use atm_info() instead of atm_printk(KERN_INFO Enrico Weigelt, metux IT consult
@ 2020-12-08  9:32 ` Enrico Weigelt, metux IT consult
  2020-12-08  9:41   ` Duncan Sands
  1 sibling, 1 reply; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2020-12-08  9:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: duncan.sands, accessrunner-general, linux-usb

Since we have the nice helpers pr_err() and pr_warn(), use them instead
of raw printk().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/usb/atm/usbatm.c  | 2 +-
 drivers/usb/atm/xusbatm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index 56fe30d247da..1c90aa273a41 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -1278,7 +1278,7 @@ EXPORT_SYMBOL_GPL(usbatm_usb_disconnect);
 static int __init usbatm_usb_init(void)
 {
 	if (sizeof(struct usbatm_control) > sizeof_field(struct sk_buff, cb)) {
-		printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name);
+		pr_err("%s unusable with this kernel!\n", usbatm_driver_name);
 		return -EIO;
 	}
 
diff --git a/drivers/usb/atm/xusbatm.c b/drivers/usb/atm/xusbatm.c
index ffc9810070a3..0befbf63d1cc 100644
--- a/drivers/usb/atm/xusbatm.c
+++ b/drivers/usb/atm/xusbatm.c
@@ -179,7 +179,7 @@ static int __init xusbatm_init(void)
 	    num_vendor != num_product ||
 	    num_vendor != num_rx_endpoint ||
 	    num_vendor != num_tx_endpoint) {
-		printk(KERN_WARNING "xusbatm: malformed module parameters\n");
+		pr_warn("xusbatm: malformed module parameters\n");
 		return -EINVAL;
 	}
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk()
  2020-12-08  9:32 ` [PATCH 3/3] drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk() Enrico Weigelt, metux IT consult
@ 2020-12-08  9:41   ` Duncan Sands
  0 siblings, 0 replies; 4+ messages in thread
From: Duncan Sands @ 2020-12-08  9:41 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult, linux-kernel
  Cc: accessrunner-general, linux-usb

On 12/8/20 10:32 AM, Enrico Weigelt, metux IT consult wrote:
> Since we have the nice helpers pr_err() and pr_warn(), use them instead
> of raw printk().
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Duncan Sands <duncan.sands@free.fr>

> ---
>   drivers/usb/atm/usbatm.c  | 2 +-
>   drivers/usb/atm/xusbatm.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
> index 56fe30d247da..1c90aa273a41 100644
> --- a/drivers/usb/atm/usbatm.c
> +++ b/drivers/usb/atm/usbatm.c
> @@ -1278,7 +1278,7 @@ EXPORT_SYMBOL_GPL(usbatm_usb_disconnect);
>   static int __init usbatm_usb_init(void)
>   {
>   	if (sizeof(struct usbatm_control) > sizeof_field(struct sk_buff, cb)) {
> -		printk(KERN_ERR "%s unusable with this kernel!\n", usbatm_driver_name);
> +		pr_err("%s unusable with this kernel!\n", usbatm_driver_name);
>   		return -EIO;
>   	}
>   
> diff --git a/drivers/usb/atm/xusbatm.c b/drivers/usb/atm/xusbatm.c
> index ffc9810070a3..0befbf63d1cc 100644
> --- a/drivers/usb/atm/xusbatm.c
> +++ b/drivers/usb/atm/xusbatm.c
> @@ -179,7 +179,7 @@ static int __init xusbatm_init(void)
>   	    num_vendor != num_product ||
>   	    num_vendor != num_rx_endpoint ||
>   	    num_vendor != num_tx_endpoint) {
> -		printk(KERN_WARNING "xusbatm: malformed module parameters\n");
> +		pr_warn("xusbatm: malformed module parameters\n");
>   		return -EINVAL;
>   	}
>   
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-08  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08  9:32 [PATCH 1/3] drivers: usb: atm: reduce noise Enrico Weigelt, metux IT consult
2020-12-08  9:32 ` [PATCH 2/3] drivers: usb: atm: use atm_info() instead of atm_printk(KERN_INFO Enrico Weigelt, metux IT consult
2020-12-08  9:32 ` [PATCH 3/3] drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk() Enrico Weigelt, metux IT consult
2020-12-08  9:41   ` Duncan Sands

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).