Thread (9 messages) flat view 9 messages, 3 authors, 2014-07-22

Re: [PATCH net-next v2 1/2] ethernet: realtek: use module_pci_driver

From: Varka Bhadram <hidden>
Date: 2014-07-22 08:25:36

On 07/22/2014 12:58 PM, David Miller wrote:
From: varkabhadram@gmail.com
Date: Tue, 22 Jul 2014 12:50:21 +0530
quoted
@@ -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);
Now you're changing behavior undesirably, it will now print the
version string into the logs for every instance of the device which is
discovered.

Seriously, the driver is worse off after these "cleanups".
Here we are having two possibilities here:

1. Removing the version info completely. Ofcourse this is not desirable.
  
2. Accepting the version info to be print into log messages.

I will put like this by removing #ifdefs:
	static int version_printed;
	if (version_printed++ == 0)
		pr_info("%s", version);


Will it be OK ..?

-- 
Regards,
Varka Bhadram.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help