* [PATCH v2 0/6] staging: media: lirc: Resolve checkpatch issues
@ 2016-09-24 15:59 Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 1/6] staging: media: lirc: Remove multiple blank lines Namrata A Shettar
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Namrata A Shettar @ 2016-09-24 15:59 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, outreachy-kernel
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(-)
--
Changes in v2:
- Subject line and commit messages
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/6] staging: media: lirc: Remove multiple blank lines
2016-09-24 15:59 [PATCH v2 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
@ 2016-09-24 16:00 ` Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 3/6] staging: media: lirc: Replace data type with pointer of same type Namrata A Shettar
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Namrata A Shettar @ 2016-09-24 16:00 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, outreachy-kernel
Remove multiple blank lines to resolve checkpatch issue.
Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
drivers/staging/media/lirc/lirc_bt829.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c
index f740115..06eac71 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -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;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/6] staging: media: lirc: Replace data type with pointer of same type
2016-09-24 15:59 [PATCH v2 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 1/6] staging: media: lirc: Remove multiple blank lines Namrata A Shettar
@ 2016-09-24 16:00 ` Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 4/6] staging: media: lirc: Add space around binary operators Namrata A Shettar
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Namrata A Shettar @ 2016-09-24 16:00 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, outreachy-kernel
Replace data type with pointer of same type in sizeof() to resolve
checkpatch issue.
Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
drivers/staging/media/lirc/lirc_imon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_imon.c b/drivers/staging/media/lirc/lirc_imon.c
index b1c28e5..198a805 100644
--- a/drivers/staging/media/lirc/lirc_imon.c
+++ b/drivers/staging/media/lirc/lirc_imon.c
@@ -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;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/6] staging: media: lirc: Add space around binary operators
2016-09-24 15:59 [PATCH v2 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 1/6] staging: media: lirc: Remove multiple blank lines Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 3/6] staging: media: lirc: Replace data type with pointer of same type Namrata A Shettar
@ 2016-09-24 16:00 ` Namrata A Shettar
2016-09-24 16:01 ` [PATCH v2 5/6] staging: media: lirc: Convert 'unsigned' to 'unsigned int' Namrata A Shettar
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Namrata A Shettar @ 2016-09-24 16:00 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, outreachy-kernel
Add space around binary operators to resolve checkpatch issue.
Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
drivers/staging/media/lirc/lirc_parallel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_parallel.c b/drivers/staging/media/lirc/lirc_parallel.c
index 3906ac6..64d99ec 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -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",
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 5/6] staging: media: lirc: Convert 'unsigned' to 'unsigned int'
2016-09-24 15:59 [PATCH v2 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
` (2 preceding siblings ...)
2016-09-24 16:00 ` [PATCH v2 4/6] staging: media: lirc: Add space around binary operators Namrata A Shettar
@ 2016-09-24 16:01 ` Namrata A Shettar
2016-09-24 16:01 ` [PATCH v2 6/6] staging: media: lirc: Replace data type with pointer in sizeof() Namrata A Shettar
2016-09-24 16:04 ` [PATCH v2 2/6] staging: media: lirc: Add space around '*' Namrata A Shettar
5 siblings, 0 replies; 7+ messages in thread
From: Namrata A Shettar @ 2016-09-24 16:01 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, outreachy-kernel
Mention data type along with the variable to resolve checkpatch issue.
Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
drivers/staging/media/lirc/lirc_sasem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c
index b080fde..9eb1eec 100644
--- a/drivers/staging/media/lirc/lirc_sasem.c
+++ b/drivers/staging/media/lirc/lirc_sasem.c
@@ -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;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 6/6] staging: media: lirc: Replace data type with pointer in sizeof()
2016-09-24 15:59 [PATCH v2 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
` (3 preceding siblings ...)
2016-09-24 16:01 ` [PATCH v2 5/6] staging: media: lirc: Convert 'unsigned' to 'unsigned int' Namrata A Shettar
@ 2016-09-24 16:01 ` Namrata A Shettar
2016-09-24 16:04 ` [PATCH v2 2/6] staging: media: lirc: Add space around '*' Namrata A Shettar
5 siblings, 0 replies; 7+ messages in thread
From: Namrata A Shettar @ 2016-09-24 16:01 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Wolfram Sang, MaciekBorzecki, Arnd Bergmann, outreachy-kernel
Replace data type with pointer of same type in sizeof() to resolve
checkpatch issue.
Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
drivers/staging/media/lirc/lirc_sasem.c | 3 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c
index 9eb1eec..828efb3 100644
--- a/drivers/staging/media/lirc/lirc_sasem.c
+++ b/drivers/staging/media/lirc/lirc_sasem.c
@@ -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;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/6] staging: media: lirc: Add space around '*'
2016-09-24 15:59 [PATCH v2 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
` (4 preceding siblings ...)
2016-09-24 16:01 ` [PATCH v2 6/6] staging: media: lirc: Replace data type with pointer in sizeof() Namrata A Shettar
@ 2016-09-24 16:04 ` Namrata A Shettar
5 siblings, 0 replies; 7+ messages in thread
From: Namrata A Shettar @ 2016-09-24 16:04 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, outreachy-kernel
Add space around '*' to resolve checkpatch issue.
Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
drivers/staging/media/lirc/lirc_bt829.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/lirc/lirc_bt829.c b/drivers/staging/media/lirc/lirc_bt829.c
index 06eac71..04d881b 100644
--- a/drivers/staging/media/lirc/lirc_bt829.c
+++ b/drivers/staging/media/lirc/lirc_bt829.c
@@ -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)
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-09-24 16:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 15:59 [PATCH v2 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 1/6] staging: media: lirc: Remove multiple blank lines Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 3/6] staging: media: lirc: Replace data type with pointer of same type Namrata A Shettar
2016-09-24 16:00 ` [PATCH v2 4/6] staging: media: lirc: Add space around binary operators Namrata A Shettar
2016-09-24 16:01 ` [PATCH v2 5/6] staging: media: lirc: Convert 'unsigned' to 'unsigned int' Namrata A Shettar
2016-09-24 16:01 ` [PATCH v2 6/6] staging: media: lirc: Replace data type with pointer in sizeof() Namrata A Shettar
2016-09-24 16:04 ` [PATCH v2 2/6] staging: media: lirc: Add space around '*' Namrata A Shettar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.