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>] [day] [month] [year] [list]
Message-Id: <1311937604-4468-1-git-send-email-ravishankarkm32@gmail.com>
Date:	Fri, 29 Jul 2011 16:36:44 +0530
From:	Ravishankar <ravishankarkm32@...il.com>
To:	gregkh@...e.de, wfp5p@...ginia.edu
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Ravishankar <ravi.shankar@...enturtles.in>,
	Ravishankar <ravishankarkm32@...il.com>
Subject: [PATCH v2] Staging: comedi: fix printk issue in adv_pci_dio.c

From: Ravishankar <ravi.shankar@...enturtles.in>

This is a patch to the adv_pci_dio.c file that fixes up a printk warning found by the checkpatch.pl tool

Signed-off-by: Ravishankar <ravishankarkm32@...il.com>
---
 drivers/staging/comedi/drivers/adv_pci_dio.c |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c b/drivers/staging/comedi/drivers/adv_pci_dio.c
index d23799b..fe66d5f 100644
--- a/drivers/staging/comedi/drivers/adv_pci_dio.c
+++ b/drivers/staging/comedi/drivers/adv_pci_dio.c
@@ -422,7 +422,7 @@ struct pci_dio_private {
 	unsigned short IDIFiltrHigh[8];	/*  IDI's filter value high signal */
 };
 
-static struct pci_dio_private *pci_priv = NULL;	/* list of allocated cards */
+static struct pci_dio_private *pci_priv;	/* list of allocated cards */
 
 #define devpriv ((struct pci_dio_private *)dev->private)
 #define this_board ((const struct dio_boardtype *)dev->board_ptr)
@@ -1106,14 +1106,15 @@ static int pci_dio_attach(struct comedi_device *dev,
 	unsigned long iobase;
 	struct pci_dev *pcidev = NULL;
 
-	printk("comedi%d: adv_pci_dio: ", dev->minor);
+	printk(KERN_INFO "comedi%d: adv_pci_dio: ", dev->minor);
 
 	ret = alloc_private(dev, sizeof(struct pci_dio_private));
 	if (ret < 0) {
-		printk(", Error: Cann't allocate private memory!\n");
+		printk(KERN_WARNING "Error: Can't allocate private memory!\n");
 		return -ENOMEM;
 	}
 
+	printk(KERN_CONT ", Successfully allocated private memory\n");
 	for_each_pci_dev(pcidev) {
 		/*  loop through cards supported by this driver */
 		for (i = 0; i < n_boardtypes; ++i) {
@@ -1140,19 +1141,21 @@ static int pci_dio_attach(struct comedi_device *dev,
 	}
 
 	if (!dev->board_ptr) {
-		printk(", Error: Requested type of the card was not found!\n");
+		printk(KERN_WARNING "Error: Requested type of the card was not found!\n");
 		return -EIO;
 	}
 
+	printk(KERN_CONT ", Requested type of card was found\n");
 	if (comedi_pci_enable(pcidev, driver_pci_dio.driver_name)) {
-		printk
-		    (", Error: Can't enable PCI device and request regions!\n");
+		printk(KERN_WARNING
+		"Error: Can't enable PCI device and request regions!\n");
 		return -EIO;
 	}
+	printk(KERN_CONT "Enabled PCI device and request reqions\n");
 	iobase = pci_resource_start(pcidev, this_board->main_pci_region);
-	printk(", b:s:f=%d:%d:%d, io=0x%4lx",
-	       pcidev->bus->number, PCI_SLOT(pcidev->devfn),
-	       PCI_FUNC(pcidev->devfn), iobase);
+	printk(KERN_CONT ", b:s:f=%d:%d:%d, io=0x%4lx",
+		pcidev->bus->number, PCI_SLOT(pcidev->devfn),
+		PCI_FUNC(pcidev->devfn), iobase);
 
 	dev->iobase = iobase;
 	dev->board_name = this_board->name;
@@ -1178,11 +1181,12 @@ static int pci_dio_attach(struct comedi_device *dev,
 
 	ret = alloc_subdevices(dev, n_subdevices);
 	if (ret < 0) {
-		printk(", Error: Cann't allocate subdevice memory!\n");
+		printk(KERN_WARNING "Error: Can't allocate subdevice memory!\n");
 		return ret;
 	}
 
-	printk(".\n");
+	printk(KERN_CONT ", Successfully allocated subdevice memory\n");
+	printk(KERN_CONT ".\n");
 
 	subdev = 0;
 
-- 
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ