netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	sparclinux@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] sunhme: convert printk to pr_cont
Date: Fri, 17 Aug 2018 12:52:28 -0700	[thread overview]
Message-ID: <20180817125228.25cf47ce@xeon-e3> (raw)
In-Reply-To: <alpine.LRH.2.02.1808171510510.31883@file01.intranet.prod.int.rdu2.redhat.com>

On Fri, 17 Aug 2018 15:12:22 -0400 (EDT)
Mikulas Patocka <mpatocka@redhat.com> wrote:

> ===================================================================
> --- linux-stable.orig/drivers/net/ethernet/sun/sunhme.c	2018-04-20 18:11:00.000000000 +0200
> +++ linux-stable/drivers/net/ethernet/sun/sunhme.c	2018-08-13 22:01:08.000000000 +0200
> @@ -572,21 +572,21 @@ static void display_link_mode(struct hap
>  {
>  	printk(KERN_INFO "%s: Link is up using ", hp->dev->name);
>  	if (hp->tcvr_type == external)
> -		printk("external ");
> +		pr_cont("external ");
>  	else
> -		printk("internal ");
> -	printk("transceiver at ");
> +		pr_cont("internal ");
> +	pr_cont("transceiver at ");
>  	hp->sw_lpa = happy_meal_tcvr_read(hp, tregs, MII_LPA);
>  	if (hp->sw_lpa & (LPA_100HALF | LPA_100FULL)) {
>  		if (hp->sw_lpa & LPA_100FULL)
> -			printk("100Mb/s, Full Duplex.\n");
> +			pr_cont("100Mb/s, Full Duplex.\n");
>  		else
> -			printk("100Mb/s, Half Duplex.\n");
> +			pr_cont("100Mb/s, Half Duplex.\n");
>  	} else {
>  		if (hp->sw_lpa & LPA_10FULL)
> -			printk("10Mb/s, Full Duplex.\n");
> +			pr_cont("10Mb/s, Full Duplex.\n");
>  		else
> -			printk("10Mb/s, Half Duplex.\n");
> +			pr_cont("10Mb/s, Half Duplex.\n");
>  	}
>  }

Why not just  use a single netdev_info (or drop the useless message altogether).

I.e
	netdev_info(hp->dev, "Link is up using %s transceiver at %dMb/s %s Duplex\n",
		(hp->tcvr->type == external) ? "external" : "internal",
		(hp->sw_lpa & (LPA_100HALF | LPA_100FULL)) ? 100 : 10,
		(hw->sw_lpa & (LPA_100FULL | LPA_10FULL)) ? "Full" : "Half"));

  parent reply	other threads:[~2018-08-17 22:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17 19:12 [PATCH] sunhme: convert printk to pr_cont Mikulas Patocka
2018-08-17 19:27 ` David Miller
2018-08-17 19:52 ` Stephen Hemminger [this message]
2018-08-17 20:08   ` Mikulas Patocka
2018-08-17 20:21     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180817125228.25cf47ce@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=mpatocka@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).