Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3557cc1 authored by Benjamin Adolphi's avatar Benjamin Adolphi Committed by Greg Kroah-Hartman
Browse files

Staging: rar: Fix all coding style issues.



This fixes all coding style issues and some spelling mistakes.

Signed-off-by: default avatarBenjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 88e05d85
Loading
Loading
Loading
Loading
+64 −68
Original line number Diff line number Diff line
@@ -68,7 +68,8 @@ static void __exit rar_exit_handler(void);
/*
  function that is activated on the successfull probe of the RAR device
*/
static int __devinit rar_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static int __devinit rar_probe(struct pci_dev *pdev,
			       const struct pci_device_id *ent);

static struct pci_device_id rar_pci_id_tbl[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4110) },
@@ -150,8 +151,8 @@ static int memrar_get_rar_addr(struct pci_dev* pdev,
					LNC_MCR_OFFSET,
					message);

	printk(KERN_WARNING "rar- result from send ctl register is %x\n"
	  ,result);
	printk(KERN_WARNING "rar- result from send ctl register is %x\n",
	       result);

	if (!result)
		result = pci_read_config_dword(pdev,
@@ -235,8 +236,8 @@ static int memrar_set_rar_addr(struct pci_dev* pdev,
					LNC_MDR_OFFSET,
					addr);

	printk(KERN_WARNING "rar- result from send ctl register is %x\n"
	  ,result);
	printk(KERN_WARNING "rar- result from send ctl register is %x\n",
	       result);

	if (!result)
		result = pci_write_config_dword(pdev,
@@ -305,7 +306,8 @@ static int memrar_init_rar_params(struct pci_dev *pdev)
		if (1) {
			size_t z;
			for (z = 0; z != MRST_NUM_RAR; ++z) {
			printk(KERN_WARNING "rar - BRAR[%Zd] physical address low\n"
				printk(KERN_WARNING
				       "rar - BRAR[%Zd] physical address low\n"
				       "\tlow:  0x%08x\n"
				       "\thigh: 0x%08x\n",
				       z,
@@ -321,7 +323,8 @@ static int memrar_init_rar_params(struct pci_dev *pdev)
/*
  function that is activated on the successfull probe of the RAR device
*/
static int __devinit rar_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
static int __devinit rar_probe(struct pci_dev *pdev,
			       const struct pci_device_id *ent)
{
	/* error */
	int error;
@@ -362,7 +365,7 @@ static int __devinit rar_probe(struct pci_dev *pdev, const struct pci_device_id
}

/*
  this function registers th driver to
  this function registers the driver to
  the device subsystem (either PCI, USB, etc)
*/
static int __init rar_init_handler(void)
@@ -404,17 +407,12 @@ int get_rar_address(int rar_index,struct RAR_address_struct *addresses)
		addresses->low = addresses->low & 0xfffffff0;
		addresses->high = addresses->high & 0xfffffff0;
		return 0;
		}

	else {
	} else
		return -ENODEV;
}
}


EXPORT_SYMBOL(get_rar_address);

/* The lock_rar function is ued by other device drivers to lock an RAR.
/* The lock_rar function is used by other device drivers to lock an RAR.
 * once an RAR is locked, it stays locked until the next system reboot.
 * The function takes one parameter:
 *
@@ -429,6 +427,7 @@ int lock_rar(int rar_index)
{
	u32 working_addr;
	int result;

	if (registered && (rar_index < 3) && (rar_index >= 0)) {
		/* first make sure that lock bits are clear (this does lock) */
		working_addr = rar_addr[rar_index].low & 0xfffffff0;
@@ -436,9 +435,6 @@ if (registered && (rar_index < 3) && (rar_index >= 0)) {
		/* now send that value to the register using the IPC */
		result = memrar_set_rar_addr(rar_dev, rar_index, working_addr);
		return result;
	}

else {
	} else
		return -ENODEV;
}
}
+29 −39
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ struct RAR_address_struct {
int get_rar_address(int rar_index, struct RAR_address_struct *addresses);


/* The lock_rar function is ued by other device drivers to lock an RAR.
/* The lock_rar function is used by other device drivers to lock an RAR.
 * once an RAR is locked, it stays locked until the next system reboot.
 * The function takes one parameter:
 *
@@ -49,50 +49,40 @@ int lock_rar(int rar_index);

/* debug macro without paramaters */
#define DEBUG_PRINT_0(DEBUG_LEVEL , info) \
do \
{ \
  if(DEBUG_LEVEL) \
  { \
do { \
	if (DEBUG_LEVEL) { \
		printk(KERN_WARNING info); \
	} \
} while (0)

/* debug macro with 1 paramater */
#define DEBUG_PRINT_1(DEBUG_LEVEL , info , param1) \
do \
{ \
  if(DEBUG_LEVEL) \
  { \
do { \
	if (DEBUG_LEVEL) { \
		printk(KERN_WARNING info , param1); \
	} \
} while (0)

/* debug macro with 2 paramaters */
#define DEBUG_PRINT_2(DEBUG_LEVEL , info , param1, param2) \
do \
{ \
  if(DEBUG_LEVEL) \
  { \
do { \
	if (DEBUG_LEVEL) { \
		printk(KERN_WARNING info , param1, param2); \
	} \
} while (0)

/* debug macro with 3 paramaters */
#define DEBUG_PRINT_3(DEBUG_LEVEL , info , param1, param2 , param3) \
do \
{ \
  if(DEBUG_LEVEL) \
  { \
do { \
	if (DEBUG_LEVEL) { \
		printk(KERN_WARNING info , param1, param2 , param3); \
	} \
} while (0)

/* debug macro with 4 paramaters */
#define DEBUG_PRINT_4(DEBUG_LEVEL , info , param1, param2 , param3 , param4) \
do \
{ \
  if(DEBUG_LEVEL) \
  { \
do { \
	if (DEBUG_LEVEL) { \
		printk(KERN_WARNING info , param1, param2 , param3 , param4); \
	} \
} while (0)