* [PATCH 1/6] staging: media: lirc: Remove multiple blank lines
2016-09-24 9:53 [PATCH 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
@ 2016-09-24 9:53 ` Namrata A Shettar
2016-09-24 9:54 ` [PATCH 2/6] staging: media: lirc: Add space around '+' Namrata A Shettar
` (4 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Namrata A Shettar @ 2016-09-24 9:53 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Namrata A Shettar, Amitoj Kaur Chawla, Tapasweni Pathak,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, Shraddha Barke,
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] 12+ messages in thread* [PATCH 2/6] staging: media: lirc: Add space around '+'
2016-09-24 9:53 [PATCH 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
2016-09-24 9:53 ` [PATCH 1/6] staging: media: lirc: Remove multiple blank lines Namrata A Shettar
@ 2016-09-24 9:54 ` Namrata A Shettar
2016-09-24 12:56 ` [Outreachy kernel] " Julia Lawall
2016-09-24 9:54 ` [PATCH 3/6] staging: media: lirc: Replace data type with pointer of same type Namrata A Shettar
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Namrata A Shettar @ 2016-09-24 9:54 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Namrata A Shettar, Amitoj Kaur Chawla, Tapasweni Pathak,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, Shraddha Barke,
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] 12+ messages in thread* Re: [Outreachy kernel] [PATCH 2/6] staging: media: lirc: Add space around '+'
2016-09-24 9:54 ` [PATCH 2/6] staging: media: lirc: Add space around '+' Namrata A Shettar
@ 2016-09-24 12:56 ` Julia Lawall
0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-09-24 12:56 UTC (permalink / raw)
To: Namrata A Shettar
Cc: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Amitoj Kaur Chawla, Tapasweni Pathak, Wolfram Sang,
Maciek Borzecki, Arnd Bergmann, Shraddha Barke, outreachy-kernel
On Sat, 24 Sep 2016, Namrata A Shettar wrote:
> 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);
This is not a +.
julia
> }
>
> static int poll_main(void)
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/d0f1bdc5ccaa602ba0a53232be35202e326e395f.1474708456.git.namrataashettar%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/6] staging: media: lirc: Replace data type with pointer of same type
2016-09-24 9:53 [PATCH 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
2016-09-24 9:53 ` [PATCH 1/6] staging: media: lirc: Remove multiple blank lines Namrata A Shettar
2016-09-24 9:54 ` [PATCH 2/6] staging: media: lirc: Add space around '+' Namrata A Shettar
@ 2016-09-24 9:54 ` Namrata A Shettar
2016-09-24 12:54 ` [Outreachy kernel] " Julia Lawall
2016-09-24 12:55 ` Julia Lawall
2016-09-24 9:54 ` [PATCH 4/6] staging: media: lirc: Add space around binary operator '+' Namrata A Shettar
` (2 subsequent siblings)
5 siblings, 2 replies; 12+ messages in thread
From: Namrata A Shettar @ 2016-09-24 9:54 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Namrata A Shettar, Amitoj Kaur Chawla, Tapasweni Pathak,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, Shraddha Barke,
outreachy-kernel
Replace data type with pointer of same type in sizeof() to resolve checkpatch issue as both are of same size.
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] 12+ messages in thread* Re: [Outreachy kernel] [PATCH 3/6] staging: media: lirc: Replace data type with pointer of same type
2016-09-24 9:54 ` [PATCH 3/6] staging: media: lirc: Replace data type with pointer of same type Namrata A Shettar
@ 2016-09-24 12:54 ` Julia Lawall
2016-09-24 12:55 ` Julia Lawall
1 sibling, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-09-24 12:54 UTC (permalink / raw)
To: Namrata A Shettar
Cc: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Amitoj Kaur Chawla, Tapasweni Pathak, Wolfram Sang,
Maciek Borzecki, Arnd Bergmann, Shraddha Barke, outreachy-kernel
On Sat, 24 Sep 2016, Namrata A Shettar wrote:
> Replace data type with pointer of same type in sizeof() to resolve checkpatch issue as both are of same size.
There is an unnecessary double space after sizeof() in the commit message,
and the message exceeds 80 characters. It is better to stop around 70 as
the message will end up indented a bit in the git history.
julia
>
> 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
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/328a70961fc82df3d3444f551bdf1e7ab3fc0985.1474708456.git.namrataashettar%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/6] staging: media: lirc: Replace data type with pointer of same type
2016-09-24 9:54 ` [PATCH 3/6] staging: media: lirc: Replace data type with pointer of same type Namrata A Shettar
2016-09-24 12:54 ` [Outreachy kernel] " Julia Lawall
@ 2016-09-24 12:55 ` Julia Lawall
1 sibling, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-09-24 12:55 UTC (permalink / raw)
To: Namrata A Shettar
Cc: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Amitoj Kaur Chawla, Tapasweni Pathak, Wolfram Sang,
Maciek Borzecki, Arnd Bergmann, Shraddha Barke, outreachy-kernel
You are also sending the patch to too many people. Not all of the listed
people are maintainers of this code. See the arguments suggested to
get_maintainers in the Submit a patch section of the tutorial.
julia
On Sat, 24 Sep 2016, Namrata A Shettar wrote:
> Replace data type with pointer of same type in sizeof() to resolve checkpatch issue as both are of same size.
>
> 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
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/328a70961fc82df3d3444f551bdf1e7ab3fc0985.1474708456.git.namrataashettar%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/6] staging: media: lirc: Add space around binary operator '+'
2016-09-24 9:53 [PATCH 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
` (2 preceding siblings ...)
2016-09-24 9:54 ` [PATCH 3/6] staging: media: lirc: Replace data type with pointer of same type Namrata A Shettar
@ 2016-09-24 9:54 ` Namrata A Shettar
2016-09-24 9:55 ` [PATCH 5/6] staging: media: lirc: Mention data type along with 'unsigned' Namrata A Shettar
2016-09-24 9:55 ` [PATCH 6/6] staging: media: lirc: Replace data type with pointer in sizeof() Namrata A Shettar
5 siblings, 0 replies; 12+ messages in thread
From: Namrata A Shettar @ 2016-09-24 9:54 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Namrata A Shettar, Amitoj Kaur Chawla, Tapasweni Pathak,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, Shraddha Barke,
outreachy-kernel
Add space arounf binary operator '+' 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] 12+ messages in thread* [PATCH 5/6] staging: media: lirc: Mention data type along with 'unsigned'
2016-09-24 9:53 [PATCH 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
` (3 preceding siblings ...)
2016-09-24 9:54 ` [PATCH 4/6] staging: media: lirc: Add space around binary operator '+' Namrata A Shettar
@ 2016-09-24 9:55 ` Namrata A Shettar
2016-09-24 12:52 ` [Outreachy kernel] " Julia Lawall
2016-09-24 9:55 ` [PATCH 6/6] staging: media: lirc: Replace data type with pointer in sizeof() Namrata A Shettar
5 siblings, 1 reply; 12+ messages in thread
From: Namrata A Shettar @ 2016-09-24 9:55 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Namrata A Shettar, Amitoj Kaur Chawla, Tapasweni Pathak,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, Shraddha Barke,
outreachy-kernel
Mention the 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] 12+ messages in thread* Re: [Outreachy kernel] [PATCH 5/6] staging: media: lirc: Mention data type along with 'unsigned'
2016-09-24 9:55 ` [PATCH 5/6] staging: media: lirc: Mention data type along with 'unsigned' Namrata A Shettar
@ 2016-09-24 12:52 ` Julia Lawall
0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-09-24 12:52 UTC (permalink / raw)
To: Namrata A Shettar
Cc: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Amitoj Kaur Chawla, Tapasweni Pathak, Wolfram Sang,
Maciek Borzecki, Arnd Bergmann, Shraddha Barke, outreachy-kernel
On Sat, 24 Sep 2016, Namrata A Shettar wrote:
> Mention the data type along with the variable to resolve checkpatch
> issue.
The commit message is a bit obscure. "Convert unsigned to unsigned
int..." would be more explicit.
julia
>
> 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
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/e1de5318efff31d1f7f18242ae534d5979aff12b.1474708456.git.namrataashettar%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 6/6] staging: media: lirc: Replace data type with pointer in sizeof()
2016-09-24 9:53 [PATCH 0/6] staging: media: lirc: Resolve checkpatch issues Namrata A Shettar
` (4 preceding siblings ...)
2016-09-24 9:55 ` [PATCH 5/6] staging: media: lirc: Mention data type along with 'unsigned' Namrata A Shettar
@ 2016-09-24 9:55 ` Namrata A Shettar
2016-09-24 12:51 ` [Outreachy kernel] " Julia Lawall
5 siblings, 1 reply; 12+ messages in thread
From: Namrata A Shettar @ 2016-09-24 9:55 UTC (permalink / raw)
To: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Namrata A Shettar, Amitoj Kaur Chawla, Tapasweni Pathak,
Wolfram Sang, Maciek Borzecki, Arnd Bergmann, Shraddha Barke,
outreachy-kernel
Replace data tupe with pointer of same type in sizeof() to resolve
checkpatch issue as they are of the same size.
Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
drivers/staging/media/lirc/lirc_sasem.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 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
@@ -47,7 +47,6 @@
#include <media/lirc.h>
#include <media/lirc_dev.h>
-
#define MOD_AUTHOR "Oliver Stabel <oliver.stabel@gmx.de>, " \
"Tim Davies <tim@opensystems.net.au>"
#define MOD_DESC "USB Driver for Sasem Remote Controller V1.1"
@@ -86,7 +85,6 @@ static void ir_close(void *data);
#define SASEM_DATA_BUF_SZ 32
struct sasem_context {
-
struct usb_device *dev;
int vfd_isopen; /* VFD port has been opened */
unsigned int vfd_contrast; /* VFD contrast */
@@ -156,7 +154,6 @@ static int debug;
/*** M O D U L E C O D E ***/
-
MODULE_AUTHOR(MOD_AUTHOR);
MODULE_DESCRIPTION(MOD_DESC);
MODULE_LICENSE("GPL");
@@ -186,7 +183,6 @@ static void deregister_from_lirc(struct sasem_context *context)
else
dev_info(&context->dev->dev,
"Deregistered Sasem driver (minor:%d)\n", minor);
-
}
/**
@@ -297,7 +293,6 @@ static int vfd_close(struct inode *inode, struct file *file)
context->vfd_isopen = 0;
dev_info(&context->dev->dev, "VFD port closed\n");
if (!context->dev_present && !context->ir_isopen) {
-
/* Device disconnected before close and IR port is
* not open. If IR port is open, context will be
* deleted by ir_close. */
@@ -548,8 +543,7 @@ static void ir_close(void *data)
deregister_from_lirc(context);
if (!context->vfd_isopen) {
-
- mutex_unlock(&context->ctx_lock);
+ mutex_unlock(&context->ctx_lock);
delete_context(context);
return;
}
@@ -633,7 +627,6 @@ static void usb_rx_callback(struct urb *urb)
return;
switch (urb->status) {
-
case -ENOENT: /* usbcore unlink successful! */
return;
@@ -651,8 +644,6 @@ static void usb_rx_callback(struct urb *urb)
usb_submit_urb(context->rx_urb, GFP_ATOMIC);
}
-
-
/**
* Callback function for USB core API: Probe
*/
@@ -709,7 +700,6 @@ static int sasem_probe(struct usb_interface *interface,
} else if (!vfd_ep_found &&
usb_endpoint_is_int_out(ep)) {
-
tx_endpoint = ep;
vfd_ep_found = 1;
if (debug)
@@ -735,17 +725,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] 12+ messages in thread* Re: [Outreachy kernel] [PATCH 6/6] staging: media: lirc: Replace data type with pointer in sizeof()
2016-09-24 9:55 ` [PATCH 6/6] staging: media: lirc: Replace data type with pointer in sizeof() Namrata A Shettar
@ 2016-09-24 12:51 ` Julia Lawall
0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2016-09-24 12:51 UTC (permalink / raw)
To: Namrata A Shettar
Cc: Jarod Wilson, Mauro Carvalho Chehab, Greg Kroah-Hartman,
Amitoj Kaur Chawla, Tapasweni Pathak, Wolfram Sang,
Maciek Borzecki, Arnd Bergmann, Shraddha Barke, outreachy-kernel
On Sat, 24 Sep 2016, Namrata A Shettar wrote:
> Replace data tupe with pointer of same type in sizeof() to resolve
> checkpatch issue as they are of the same size.
There are lots of removed blank lines in this patch that have nothing to
do with the log message.
julia
> Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
> ---
> drivers/staging/media/lirc/lirc_sasem.c | 18 ++++--------------
> 1 file changed, 4 insertions(+), 14 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
> @@ -47,7 +47,6 @@
> #include <media/lirc.h>
> #include <media/lirc_dev.h>
>
> -
> #define MOD_AUTHOR "Oliver Stabel <oliver.stabel@gmx.de>, " \
> "Tim Davies <tim@opensystems.net.au>"
> #define MOD_DESC "USB Driver for Sasem Remote Controller V1.1"
> @@ -86,7 +85,6 @@ static void ir_close(void *data);
> #define SASEM_DATA_BUF_SZ 32
>
> struct sasem_context {
> -
> struct usb_device *dev;
> int vfd_isopen; /* VFD port has been opened */
> unsigned int vfd_contrast; /* VFD contrast */
> @@ -156,7 +154,6 @@ static int debug;
>
>
> /*** M O D U L E C O D E ***/
> -
> MODULE_AUTHOR(MOD_AUTHOR);
> MODULE_DESCRIPTION(MOD_DESC);
> MODULE_LICENSE("GPL");
> @@ -186,7 +183,6 @@ static void deregister_from_lirc(struct sasem_context *context)
> else
> dev_info(&context->dev->dev,
> "Deregistered Sasem driver (minor:%d)\n", minor);
> -
> }
>
> /**
> @@ -297,7 +293,6 @@ static int vfd_close(struct inode *inode, struct file *file)
> context->vfd_isopen = 0;
> dev_info(&context->dev->dev, "VFD port closed\n");
> if (!context->dev_present && !context->ir_isopen) {
> -
> /* Device disconnected before close and IR port is
> * not open. If IR port is open, context will be
> * deleted by ir_close. */
> @@ -548,8 +543,7 @@ static void ir_close(void *data)
> deregister_from_lirc(context);
>
> if (!context->vfd_isopen) {
> -
> - mutex_unlock(&context->ctx_lock);
> + mutex_unlock(&context->ctx_lock);
> delete_context(context);
> return;
> }
> @@ -633,7 +627,6 @@ static void usb_rx_callback(struct urb *urb)
> return;
>
> switch (urb->status) {
> -
> case -ENOENT: /* usbcore unlink successful! */
> return;
>
> @@ -651,8 +644,6 @@ static void usb_rx_callback(struct urb *urb)
> usb_submit_urb(context->rx_urb, GFP_ATOMIC);
> }
>
> -
> -
> /**
> * Callback function for USB core API: Probe
> */
> @@ -709,7 +700,6 @@ static int sasem_probe(struct usb_interface *interface,
>
> } else if (!vfd_ep_found &&
> usb_endpoint_is_int_out(ep)) {
> -
> tx_endpoint = ep;
> vfd_ep_found = 1;
> if (debug)
> @@ -735,17 +725,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
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/c8caeedace5534475eeadfa5286256e361761edb.1474708456.git.namrataashettar%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 12+ messages in thread