* [PATCH 1/2] staging: sm750fb: fixing function return with lock held
@ 2017-03-31 19:22 ` Prasant Jalan
0 siblings, 0 replies; 8+ messages in thread
From: Prasant Jalan @ 2017-03-31 19:10 UTC (permalink / raw)
To: sudipm.mukherjee
Cc: sudip.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel, Prasant Jalan
lynxfb_suspend() & lynxfb_resume() return on errors while holding
console_lock.
Adding 'goto' such that proper cleanups can be done before returning
from function and therefore console_lock can be released before
returning.
Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index c618c56..445c68d 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -419,7 +419,7 @@ static int lynxfb_suspend(struct pci_dev *pdev, pm_message_t mesg)
if (ret) {
dev_err(&pdev->dev,
"error:%d occurred in pci_save_state\n", ret);
- return ret;
+ goto lynxfb_suspend_err;
}
ret = pci_set_power_state(pdev, pci_choose_state(pdev, mesg));
@@ -427,11 +427,13 @@ static int lynxfb_suspend(struct pci_dev *pdev, pm_message_t mesg)
dev_err(&pdev->dev,
"error:%d occurred in pci_set_power_state\n",
ret);
- return ret;
+ goto lynxfb_suspend_err;
}
}
pdev->dev.power.power_state = mesg;
+
+lynxfb_suspend_err:
console_unlock();
return ret;
}
@@ -456,7 +458,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
if (ret) {
dev_err(&pdev->dev,
"error:%d occurred in pci_set_power_state\n", ret);
- return ret;
+ goto lynxfb_resume_err;
}
if (pdev->dev.power.power_state.event != PM_EVENT_FREEZE) {
@@ -466,7 +468,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
dev_err(&pdev->dev,
"error:%d occurred in pci_enable_device\n",
ret);
- return ret;
+ goto lynxfb_resume_err;
}
pci_set_master(pdev);
}
@@ -498,6 +500,8 @@ static int lynxfb_resume(struct pci_dev *pdev)
}
pdev->dev.power.power_state.event = PM_EVENT_RESUME;
+
+lynxfb_resume_err:
console_unlock();
return ret;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings
2017-03-31 19:22 ` Prasant Jalan
@ 2017-03-31 19:22 ` Prasant Jalan
-1 siblings, 0 replies; 8+ messages in thread
From: Prasant Jalan @ 2017-03-31 19:10 UTC (permalink / raw)
To: sudipm.mukherjee
Cc: sudip.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel, Prasant Jalan
checkpatch gives WARNING: Avoid line continuations in quoted strings.
Trivial fix by removing line continuations and adding another quote at
the start of next line.
Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 445c68d..386d4ad 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -837,15 +837,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
/* some member of info->var had been set by fb_find_mode */
- pr_info("Member of info->var is :\n\
- xres=%d\n\
- yres=%d\n\
- xres_virtual=%d\n\
- yres_virtual=%d\n\
- xoffset=%d\n\
- yoffset=%d\n\
- bits_per_pixel=%d\n \
- ...\n",
+ pr_info("Member of info->var is :\n"
+ "xres=%d\n"
+ "yres=%d\n"
+ "xres_virtual=%d\n"
+ "yres_virtual=%d\n"
+ "xoffset=%d\n"
+ "yoffset=%d\n"
+ "bits_per_pixel=%d\n"
+ " ...\n",
var->xres,
var->yres,
var->xres_virtual,
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] staging: sm750fb: fixing function return with lock held
@ 2017-03-31 19:22 ` Prasant Jalan
0 siblings, 0 replies; 8+ messages in thread
From: Prasant Jalan @ 2017-03-31 19:22 UTC (permalink / raw)
To: sudipm.mukherjee
Cc: sudip.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel, Prasant Jalan
lynxfb_suspend() & lynxfb_resume() return on errors while holding
console_lock.
Adding 'goto' such that proper cleanups can be done before returning
from function and therefore console_lock can be released before
returning.
Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index c618c56..445c68d 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -419,7 +419,7 @@ static int lynxfb_suspend(struct pci_dev *pdev, pm_message_t mesg)
if (ret) {
dev_err(&pdev->dev,
"error:%d occurred in pci_save_state\n", ret);
- return ret;
+ goto lynxfb_suspend_err;
}
ret = pci_set_power_state(pdev, pci_choose_state(pdev, mesg));
@@ -427,11 +427,13 @@ static int lynxfb_suspend(struct pci_dev *pdev, pm_message_t mesg)
dev_err(&pdev->dev,
"error:%d occurred in pci_set_power_state\n",
ret);
- return ret;
+ goto lynxfb_suspend_err;
}
}
pdev->dev.power.power_state = mesg;
+
+lynxfb_suspend_err:
console_unlock();
return ret;
}
@@ -456,7 +458,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
if (ret) {
dev_err(&pdev->dev,
"error:%d occurred in pci_set_power_state\n", ret);
- return ret;
+ goto lynxfb_resume_err;
}
if (pdev->dev.power.power_state.event != PM_EVENT_FREEZE) {
@@ -466,7 +468,7 @@ static int lynxfb_resume(struct pci_dev *pdev)
dev_err(&pdev->dev,
"error:%d occurred in pci_enable_device\n",
ret);
- return ret;
+ goto lynxfb_resume_err;
}
pci_set_master(pdev);
}
@@ -498,6 +500,8 @@ static int lynxfb_resume(struct pci_dev *pdev)
}
pdev->dev.power.power_state.event = PM_EVENT_RESUME;
+
+lynxfb_resume_err:
console_unlock();
return ret;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings
@ 2017-03-31 19:22 ` Prasant Jalan
0 siblings, 0 replies; 8+ messages in thread
From: Prasant Jalan @ 2017-03-31 19:22 UTC (permalink / raw)
To: sudipm.mukherjee
Cc: sudip.mukherjee, teddy.wang, gregkh, linux-fbdev, devel,
linux-kernel, Prasant Jalan
checkpatch gives WARNING: Avoid line continuations in quoted strings.
Trivial fix by removing line continuations and adding another quote at
the start of next line.
Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 445c68d..386d4ad 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -837,15 +837,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
/* some member of info->var had been set by fb_find_mode */
- pr_info("Member of info->var is :\n\
- xres=%d\n\
- yres=%d\n\
- xres_virtual=%d\n\
- yres_virtual=%d\n\
- xoffset=%d\n\
- yoffset=%d\n\
- bits_per_pixel=%d\n \
- ...\n",
+ pr_info("Member of info->var is :\n"
+ "xres=%d\n"
+ "yres=%d\n"
+ "xres_virtual=%d\n"
+ "yres_virtual=%d\n"
+ "xoffset=%d\n"
+ "yoffset=%d\n"
+ "bits_per_pixel=%d\n"
+ " ...\n",
var->xres,
var->yres,
var->xres_virtual,
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings
2017-03-31 19:22 ` Prasant Jalan
@ 2017-04-03 16:45 ` Prasant Jalan
-1 siblings, 0 replies; 8+ messages in thread
From: Prasant Jalan @ 2017-04-03 16:33 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: sudip.mukherjee, teddy.wang, Greg KH, linux-fbdev, driverdevel,
LKML, Prasant Jalan
On Sat, Apr 1, 2017 at 12:40 AM, Prasant Jalan <prasant.jalan@gmail.com> wrote:
> checkpatch gives WARNING: Avoid line continuations in quoted strings.
>
> Trivial fix by removing line continuations and adding another quote at
> the start of next line.
>
> Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
> ---
> drivers/staging/sm750fb/sm750.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 445c68d..386d4ad 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -837,15 +837,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
>
> /* some member of info->var had been set by fb_find_mode */
>
> - pr_info("Member of info->var is :\n\
> - xres=%d\n\
> - yres=%d\n\
> - xres_virtual=%d\n\
> - yres_virtual=%d\n\
> - xoffset=%d\n\
> - yoffset=%d\n\
> - bits_per_pixel=%d\n \
> - ...\n",
> + pr_info("Member of info->var is :\n"
> + "xres=%d\n"
> + "yres=%d\n"
> + "xres_virtual=%d\n"
> + "yres_virtual=%d\n"
> + "xoffset=%d\n"
> + "yoffset=%d\n"
> + "bits_per_pixel=%d\n"
> + " ...\n",
> var->xres,
> var->yres,
> var->xres_virtual,
> --
> 2.7.4
>
Hi All,
A gentle reminder for my patches.
Any comments or updates will be helpful!
Regards, Prasant
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings
@ 2017-04-03 16:45 ` Prasant Jalan
0 siblings, 0 replies; 8+ messages in thread
From: Prasant Jalan @ 2017-04-03 16:45 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: sudip.mukherjee, teddy.wang, Greg KH, linux-fbdev, driverdevel,
LKML, Prasant Jalan
On Sat, Apr 1, 2017 at 12:40 AM, Prasant Jalan <prasant.jalan@gmail.com> wrote:
> checkpatch gives WARNING: Avoid line continuations in quoted strings.
>
> Trivial fix by removing line continuations and adding another quote at
> the start of next line.
>
> Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com>
> ---
> drivers/staging/sm750fb/sm750.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 445c68d..386d4ad 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -837,15 +837,15 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
>
> /* some member of info->var had been set by fb_find_mode */
>
> - pr_info("Member of info->var is :\n\
> - xres=%d\n\
> - yres=%d\n\
> - xres_virtual=%d\n\
> - yres_virtual=%d\n\
> - xoffset=%d\n\
> - yoffset=%d\n\
> - bits_per_pixel=%d\n \
> - ...\n",
> + pr_info("Member of info->var is :\n"
> + "xres=%d\n"
> + "yres=%d\n"
> + "xres_virtual=%d\n"
> + "yres_virtual=%d\n"
> + "xoffset=%d\n"
> + "yoffset=%d\n"
> + "bits_per_pixel=%d\n"
> + " ...\n",
> var->xres,
> var->yres,
> var->xres_virtual,
> --
> 2.7.4
>
Hi All,
A gentle reminder for my patches.
Any comments or updates will be helpful!
Regards, Prasant
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings
2017-04-03 16:45 ` Prasant Jalan
@ 2017-04-03 17:55 ` Greg KH
-1 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2017-04-03 17:55 UTC (permalink / raw)
To: Prasant Jalan
Cc: Sudip Mukherjee, driverdevel, linux-fbdev, teddy.wang, LKML,
sudip.mukherjee
On Mon, Apr 03, 2017 at 10:03:34PM +0530, Prasant Jalan wrote:
> On Sat, Apr 1, 2017 at 12:40 AM, Prasant Jalan <prasant.jalan@gmail.com> wrote:
<snip>
> A gentle reminder for my patches.
> Any comments or updates will be helpful!
2 days, over a weekend, for a coding style change is pretty fast, don't
you agree? I will get to these eventually, usually every other week I
flush them all out.
Please be patient, don't worry, the patch is not lost.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings
@ 2017-04-03 17:55 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2017-04-03 17:55 UTC (permalink / raw)
To: Prasant Jalan
Cc: Sudip Mukherjee, driverdevel, linux-fbdev, teddy.wang, LKML,
sudip.mukherjee
On Mon, Apr 03, 2017 at 10:03:34PM +0530, Prasant Jalan wrote:
> On Sat, Apr 1, 2017 at 12:40 AM, Prasant Jalan <prasant.jalan@gmail.com> wrote:
<snip>
> A gentle reminder for my patches.
> Any comments or updates will be helpful!
2 days, over a weekend, for a coding style change is pretty fast, don't
you agree? I will get to these eventually, usually every other week I
flush them all out.
Please be patient, don't worry, the patch is not lost.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-04-03 17:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 19:10 [PATCH 1/2] staging: sm750fb: fixing function return with lock held Prasant Jalan
2017-03-31 19:22 ` Prasant Jalan
2017-03-31 19:10 ` [PATCH 2/2] staging: sm750fb: removed line continuations in quoted strings Prasant Jalan
2017-03-31 19:22 ` Prasant Jalan
2017-04-03 16:33 ` Prasant Jalan
2017-04-03 16:45 ` Prasant Jalan
2017-04-03 17:55 ` Greg KH
2017-04-03 17:55 ` Greg KH
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.