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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53CE777B.3080301@cogentembedded.com>
Date:	Tue, 22 Jul 2014 18:38:51 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	varkabhadram@...il.com, netdev@...r.kernel.org
CC:	davem@...emloft.net, Varka Bhadram <varkab@...c.in>
Subject: Re: [PATCH net-next v2 1/2] ethernet: realtek: use module_pci_driver

On 07/22/2014 11:20 AM, varkabhadram@...il.com wrote:

> From: Varka Bhadram <varkab@...c.in>

> This patch converts to use the macro module_pci_driver, which makes
> the code smaller and simpler.

> Signed-off-by: Varka Bhadram <varkab@...c.in>
> ---
>   drivers/net/ethernet/realtek/8139cp.c |   22 ++--------------------
>   1 file changed, 2 insertions(+), 20 deletions(-)

> diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
> index 2bc728e..9fb68b9 100644
> --- a/drivers/net/ethernet/realtek/8139cp.c
> +++ b/drivers/net/ethernet/realtek/8139cp.c
> @@ -1887,11 +1887,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
>   	resource_size_t pciaddr;
>   	unsigned int addr_len, i, pci_using_dac;
>
> -#ifndef MODULE
> -	static int version_printed;
> -	if (version_printed++ == 0)
> -		pr_info("%s", version);
> -#endif
> +	pr_info("%s", version);

    Use pr_info_once().

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ