lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 Aug 2018 12:52:28 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Mikulas Patocka <mpatocka@...hat.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        sparclinux@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] sunhme: convert printk to pr_cont

On Fri, 17 Aug 2018 15:12:22 -0400 (EDT)
Mikulas Patocka <mpatocka@...hat.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"));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ