* [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check
@ 2013-04-30 6:16 Sachin Kamat
2013-04-30 6:16 ` [PATCH 2/4] [media] s3c-camif: Fix incorrect variable type Sachin Kamat
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Sachin Kamat @ 2013-04-30 6:16 UTC (permalink / raw)
To: linux-media; +Cc: s.nawrocki, sachin.kamat, patches
clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
to IS_ERR only.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/media/platform/s3c-camif/camif-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
index 0d0fab1..2449f13 100644
--- a/drivers/media/platform/s3c-camif/camif-core.c
+++ b/drivers/media/platform/s3c-camif/camif-core.c
@@ -341,7 +341,7 @@ static void camif_clk_put(struct camif_dev *camif)
int i;
for (i = 0; i < CLK_MAX_NUM; i++) {
- if (IS_ERR_OR_NULL(camif->clock[i]))
+ if (IS_ERR(camif->clock[i]))
continue;
clk_unprepare(camif->clock[i]);
clk_put(camif->clock[i]);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] [media] s3c-camif: Fix incorrect variable type
2013-04-30 6:16 [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sachin Kamat
@ 2013-04-30 6:16 ` Sachin Kamat
2013-04-30 6:16 ` [PATCH 3/4] [media] s3c-camif: Staticize local symbols Sachin Kamat
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Sachin Kamat @ 2013-04-30 6:16 UTC (permalink / raw)
To: linux-media; +Cc: s.nawrocki, sachin.kamat, patches
'rotation' was an 8 bit variable and hence could not have values
greater than 255. Since we need higher values, chnage it to 16
bit type.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/media/platform/s3c-camif/camif-core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/s3c-camif/camif-core.h b/drivers/media/platform/s3c-camif/camif-core.h
index 261134b..35d2fcd 100644
--- a/drivers/media/platform/s3c-camif/camif-core.h
+++ b/drivers/media/platform/s3c-camif/camif-core.h
@@ -229,7 +229,7 @@ struct camif_vp {
unsigned int state;
u16 fmt_flags;
u8 id;
- u8 rotation;
+ u16 rotation;
u8 hflip;
u8 vflip;
unsigned int offset;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] [media] s3c-camif: Staticize local symbols
2013-04-30 6:16 [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sachin Kamat
2013-04-30 6:16 ` [PATCH 2/4] [media] s3c-camif: Fix incorrect variable type Sachin Kamat
@ 2013-04-30 6:16 ` Sachin Kamat
2013-04-30 6:16 ` [PATCH 4/4] [media] s3c-camif: Use dev_info instead of printk Sachin Kamat
2013-05-01 9:32 ` [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sylwester Nawrocki
3 siblings, 0 replies; 6+ messages in thread
From: Sachin Kamat @ 2013-04-30 6:16 UTC (permalink / raw)
To: linux-media; +Cc: s.nawrocki, sachin.kamat, patches
These symbols are local to the file and should be static.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/media/platform/s3c-camif/camif-regs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/s3c-camif/camif-regs.c b/drivers/media/platform/s3c-camif/camif-regs.c
index 1a3b4fc..7b22d6c 100644
--- a/drivers/media/platform/s3c-camif/camif-regs.c
+++ b/drivers/media/platform/s3c-camif/camif-regs.c
@@ -379,7 +379,7 @@ static void camif_hw_set_prescaler(struct camif_vp *vp)
camif_write(camif, S3C_CAMIF_REG_CISCPREDST(vp->id, vp->offset), cfg);
}
-void camif_s3c244x_hw_set_scaler(struct camif_vp *vp)
+static void camif_s3c244x_hw_set_scaler(struct camif_vp *vp)
{
struct camif_dev *camif = vp->camif;
struct camif_scaler *scaler = &vp->scaler;
@@ -426,7 +426,7 @@ void camif_s3c244x_hw_set_scaler(struct camif_vp *vp)
scaler->main_h_ratio, scaler->main_v_ratio);
}
-void camif_s3c64xx_hw_set_scaler(struct camif_vp *vp)
+static void camif_s3c64xx_hw_set_scaler(struct camif_vp *vp)
{
struct camif_dev *camif = vp->camif;
struct camif_scaler *scaler = &vp->scaler;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] [media] s3c-camif: Use dev_info instead of printk
2013-04-30 6:16 [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sachin Kamat
2013-04-30 6:16 ` [PATCH 2/4] [media] s3c-camif: Fix incorrect variable type Sachin Kamat
2013-04-30 6:16 ` [PATCH 3/4] [media] s3c-camif: Staticize local symbols Sachin Kamat
@ 2013-04-30 6:16 ` Sachin Kamat
2013-05-01 9:32 ` [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sylwester Nawrocki
3 siblings, 0 replies; 6+ messages in thread
From: Sachin Kamat @ 2013-04-30 6:16 UTC (permalink / raw)
To: linux-media; +Cc: s.nawrocki, sachin.kamat, patches
dev_info is preferred to printk. Silences the related checkpatch
warning.
WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ...
then pr_info(... to printk(KERN_INFO ...
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/media/platform/s3c-camif/camif-regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/s3c-camif/camif-regs.c b/drivers/media/platform/s3c-camif/camif-regs.c
index 7b22d6c..a9e3b16 100644
--- a/drivers/media/platform/s3c-camif/camif-regs.c
+++ b/drivers/media/platform/s3c-camif/camif-regs.c
@@ -601,6 +601,6 @@ void camif_hw_dump_regs(struct camif_dev *camif, const char *label)
pr_info("--- %s ---\n", label);
for (i = 0; i < ARRAY_SIZE(registers); i++) {
u32 cfg = readl(camif->io_base + registers[i].offset);
- printk(KERN_INFO "%s:\t0x%08x\n", registers[i].name, cfg);
+ dev_info(camif->dev, "%s:\t0x%08x\n", registers[i].name, cfg);
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check
2013-04-30 6:16 [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sachin Kamat
` (2 preceding siblings ...)
2013-04-30 6:16 ` [PATCH 4/4] [media] s3c-camif: Use dev_info instead of printk Sachin Kamat
@ 2013-05-01 9:32 ` Sylwester Nawrocki
2013-05-02 4:20 ` Sachin Kamat
3 siblings, 1 reply; 6+ messages in thread
From: Sylwester Nawrocki @ 2013-05-01 9:32 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-media, s.nawrocki, patches
On 04/30/2013 08:16 AM, Sachin Kamat wrote:
> clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
> to IS_ERR only.
>
> Signed-off-by: Sachin Kamat<sachin.kamat@linaro.org>
> ---
> drivers/media/platform/s3c-camif/camif-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c
> index 0d0fab1..2449f13 100644
> --- a/drivers/media/platform/s3c-camif/camif-core.c
> +++ b/drivers/media/platform/s3c-camif/camif-core.c
> @@ -341,7 +341,7 @@ static void camif_clk_put(struct camif_dev *camif)
> int i;
>
> for (i = 0; i< CLK_MAX_NUM; i++) {
> - if (IS_ERR_OR_NULL(camif->clock[i]))
> + if (IS_ERR(camif->clock[i]))
> continue;
> clk_unprepare(camif->clock[i]);
> clk_put(camif->clock[i]);
Patch applied for 3.11 with following chunk squashed to it:
diff --git a/drivers/media/platform/s3c-camif/camif-core.c
b/drivers/media/platform/s3c-camif/camif-core.c
index 2449f13..b385747 100644
--- a/drivers/media/platform/s3c-camif/camif-core.c
+++ b/drivers/media/platform/s3c-camif/camif-core.c
@@ -345,6 +345,7 @@ static void camif_clk_put(struct camif_dev *camif)
continue;
clk_unprepare(camif->clock[i]);
clk_put(camif->clock[i]);
+ camif->clock[i] = ERR_PTR(-EINVAL);
}
}
@@ -352,6 +353,9 @@ static int camif_clk_get(struct camif_dev *camif)
{
int ret, i;
+ for (i = 1; i < CLK_MAX_NUM; i++)
+ camif->clock[i] = ERR_PTR(-EINVAL);
+
for (i = 0; i < CLK_MAX_NUM; i++) {
camif->clock[i] = clk_get(camif->dev, camif_clocks[i]);
if (IS_ERR(camif->clock[i])) {
Thanks!
Sylwester
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check
2013-05-01 9:32 ` [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sylwester Nawrocki
@ 2013-05-02 4:20 ` Sachin Kamat
0 siblings, 0 replies; 6+ messages in thread
From: Sachin Kamat @ 2013-05-02 4:20 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: linux-media, s.nawrocki, patches
On 1 May 2013 15:02, Sylwester Nawrocki <sylvester.nawrocki@gmail.com> wrote:
> On 04/30/2013 08:16 AM, Sachin Kamat wrote:
>>
>> clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
>> to IS_ERR only.
>>
>> Signed-off-by: Sachin Kamat<sachin.kamat@linaro.org>
>> ---
>> drivers/media/platform/s3c-camif/camif-core.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/s3c-camif/camif-core.c
>> b/drivers/media/platform/s3c-camif/camif-core.c
>> index 0d0fab1..2449f13 100644
>> --- a/drivers/media/platform/s3c-camif/camif-core.c
>> +++ b/drivers/media/platform/s3c-camif/camif-core.c
>> @@ -341,7 +341,7 @@ static void camif_clk_put(struct camif_dev *camif)
>> int i;
>>
>> for (i = 0; i< CLK_MAX_NUM; i++) {
>> - if (IS_ERR_OR_NULL(camif->clock[i]))
>> + if (IS_ERR(camif->clock[i]))
>> continue;
>> clk_unprepare(camif->clock[i]);
>> clk_put(camif->clock[i]);
>
>
> Patch applied for 3.11 with following chunk squashed to it:
Thanks Sylwester.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-05-02 4:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30 6:16 [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sachin Kamat
2013-04-30 6:16 ` [PATCH 2/4] [media] s3c-camif: Fix incorrect variable type Sachin Kamat
2013-04-30 6:16 ` [PATCH 3/4] [media] s3c-camif: Staticize local symbols Sachin Kamat
2013-04-30 6:16 ` [PATCH 4/4] [media] s3c-camif: Use dev_info instead of printk Sachin Kamat
2013-05-01 9:32 ` [PATCH 1/4] [media] s3c-camif: Remove redundant NULL check Sylwester Nawrocki
2013-05-02 4:20 ` Sachin Kamat
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.