staging: media: lirc: Resolve checkpatch issues
Subsystems (2)
v2 cover staging: media: lirc: Resolve checkpatch issues
Fix multiple checkpatch issues.
Namrata A Shettar (6):
staging: media: lirc: Remove multiple blank lines
staging: media: lirc: Add space around '*'
staging: media: lirc: Replace pointer of data type with pointer of same type
staging: media: lirc: Add space around binary operators
staging: media: lirc: Convert 'unsigned' to 'unsigned int' Replace data type with pointer in sizeof()
drivers/staging/media/lirc/lirc_bt829.c | 5 +---- drivers/staging/media/lirc/lirc_imon.c | 6 +++--- drivers/staging/media/lirc/lirc_parallel.c | 6 +++--- drivers/staging/media/lirc/lirc_sasem.c | 10 +++++------ 4 files changed, 13 insertions(+), 26 deletions(-)
Signature · 4 lines
Changes in v2: - Subject line and commit messages 2.7.4
PATCH v2 1/6 staging: media: lirc: Remove multiple blank lines
Remove multiple blank lines to resolve checkpatch issue.
--- drivers/staging/media/lirc/lirc_bt829.c | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/media/lirc/lirc_bt829.c +0 -3
@@ -163,7 +163,6 @@ err_put_dev:return rc; } -void cleanup_module (void ) {struct pci_dev *pdev =to_pci_dev (atir_driver.dev);
@@ -174,7 +173,6 @@ void cleanup_module(void)pci_dev_put (pdev); } -static int atir_init_start (void ) { pci_addr_lin =ioremap (pci_addr_phys +DATA_PCI_OFF ,0x400 );
@@ -190,7 +188,6 @@ static void cycle_delay(int cycle)udelay (WAIT_CYCLE *cycle); } -static int poll_main (void ) {unsigned char status_high, status_low;
Signature · 1 line
2.7.4
PATCH v2 3/6 staging: media: lirc: Replace data type with pointer of same type
In reply to Namrata A ShettarReplace data type with pointer of same type in sizeof() to resolve checkpatch issue.
--- drivers/staging/media/lirc/lirc_imon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/media/lirc/lirc_imon.c +3 -3
@@ -702,7 +702,7 @@ static int imon_probe(struct usb_interface *interface,/* prevent races probing devices w/multiple interfaces */ mutex_lock (&driver_lock); - context =kzalloc (sizeof (struct imon_context ),GFP_KERNEL ); + context =kzalloc (sizeof (*context),GFP_KERNEL );if (!context) goto driver_unlock;
@@ -782,11 +782,11 @@ static int imon_probe(struct usb_interface *interface, __func__, vfd_proto_6p); } - driver =kzalloc (sizeof (struct lirc_driver ),GFP_KERNEL ); + driver =kzalloc (sizeof (*driver),GFP_KERNEL );if (!driver) goto free_context; - rbuf =kmalloc (sizeof (struct lirc_buffer ),GFP_KERNEL ); + rbuf =kmalloc (sizeof (*rbuf),GFP_KERNEL );if (!rbuf) goto free_driver;
Signature · 1 line
2.7.4
PATCH v2 4/6 staging: media: lirc: Add space around binary operators
In reply to Namrata A ShettarAdd space around binary operators to resolve checkpatch issue.
--- drivers/staging/media/lirc/lirc_parallel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/media/lirc/lirc_parallel.c +3 -3
@@ -163,12 +163,12 @@ static unsigned int init_lirc_timer(void)if (count >=1000 && timeelapsed >0 ) {if (default_timer ==0 ) {/* autodetect timer */ - newtimer = (1000000 *count)/timeelapsed; + newtimer = (1000000 * count) / timeelapsed;pr_info ("%u Hz timer detected\n" , newtimer);return newtimer; } - newtimer = (1000000 *count)/timeelapsed; -if (abs (newtimer - default_timer) > default_timer/10 ) { + newtimer = (1000000 * count) / timeelapsed; +if (abs (newtimer - default_timer) > default_timer /10 ) {/* bad timer */ pr_notice ("bad timer: %u Hz\n" , newtimer); pr_notice("using default timer: %u Hz\n",
Signature · 1 line
2.7.4
PATCH v2 5/6 staging: media: lirc: Convert 'unsigned' to 'unsigned int'
In reply to Namrata A ShettarMention data type along with the variable to resolve checkpatch issue.
--- drivers/staging/media/lirc/lirc_sasem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/lirc/lirc_sasem.c +2 -2
@@ -73,7 +73,7 @@ static void usb_tx_callback(struct urb *urb);/* VFD file_operations function prototypes */ static int vfd_open (struct inode *inode,struct file *file); -static long vfd_ioctl (struct file *file,unsigned cmd,unsigned long arg); +static long vfd_ioctl (struct file *file,unsigned int cmd,unsigned long arg);static int vfd_close (struct inode *inode,struct file *file);static ssize_t vfd_write (struct file *file,const char __user *buf,size_t n_bytes,loff_t *pos);
@@ -243,7 +243,7 @@ exit:* Called when the VFD device (e.g. /dev/usb/lcd) * is closed by the application. */ -static long vfd_ioctl (struct file *file,unsigned cmd,unsigned long arg) +static long vfd_ioctl (struct file *file,unsigned int cmd,unsigned long arg) {struct sasem_context *context;
Signature · 1 line
2.7.4
PATCH v2 6/6 staging: media: lirc: Replace data type with pointer in sizeof()
In reply to Namrata A ShettarReplace data type with pointer of same type in sizeof() to resolve checkpatch issue.
--- drivers/staging/media/lirc/lirc_sasem.c | 3 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/media/lirc/lirc_sasem.c +3 -3
@@ -735,17 +735,17 @@ static int sasem_probe(struct usb_interface *interface,/* Allocate memory */ alloc_status =0 ; - context =kzalloc (sizeof (struct sasem_context ),GFP_KERNEL ); + context =kzalloc (sizeof (*context),GFP_KERNEL );if (!context) { alloc_status =1 ; goto alloc_status_switch; } - driver =kzalloc (sizeof (struct lirc_driver ),GFP_KERNEL ); + driver =kzalloc (sizeof (*driver),GFP_KERNEL );if (!driver) { alloc_status =2 ; goto alloc_status_switch; } - rbuf =kmalloc (sizeof (struct lirc_buffer ),GFP_KERNEL ); + rbuf =kmalloc (sizeof (*rbuf),GFP_KERNEL );if (!rbuf) { alloc_status =3 ; goto alloc_status_switch;
Signature · 1 line
2.7.4
PATCH v2 2/6 staging: media: lirc: Add space around '*'
In reply to Namrata A ShettarAdd space around '*' to resolve checkpatch issue.
--- drivers/staging/media/lirc/lirc_bt829.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/lirc/lirc_bt829.c +1 -1
@@ -185,7 +185,7 @@ static int atir_init_start(void)static void cycle_delay (int cycle) { -udelay (WAIT_CYCLE *cycle); +udelay (WAIT_CYCLE * cycle); }static int poll_main (void )
Signature · 1 line
2.7.4