* [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings
@ 2013-08-20 2:33 Chen Gang
2013-08-30 8:41 ` Tomi Valkeinen
2013-08-30 8:47 ` Chen Gang
0 siblings, 2 replies; 3+ messages in thread
From: Chen Gang @ 2013-08-20 2:33 UTC (permalink / raw)
To: linux-fbdev
fb_set_cmap() already checks the parameters, so need remove the
redundancy checking.
This redundancy checking is also incorrect, the related warning:
drivers/video/fbcmap.c:288:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
drivers/video/fbcmap.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
index 5c3960d..f89245b 100644
--- a/drivers/video/fbcmap.c
+++ b/drivers/video/fbcmap.c
@@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
rc = -ENODEV;
goto out;
}
- if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
- !info->fbops->fb_setcmap)) {
- rc = -EINVAL;
- goto out1;
- }
+
rc = fb_set_cmap(&umap, info);
-out1:
unlock_fb_info(info);
out:
fb_dealloc_cmap(&umap);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings
2013-08-20 2:33 [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings Chen Gang
@ 2013-08-30 8:41 ` Tomi Valkeinen
2013-08-30 8:47 ` Chen Gang
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2013-08-30 8:41 UTC (permalink / raw)
To: linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]
On 20/08/13 05:33, Chen Gang wrote:
> fb_set_cmap() already checks the parameters, so need remove the
> redundancy checking.
>
> This redundancy checking is also incorrect, the related warning:
>
> drivers/video/fbcmap.c:288:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> drivers/video/fbcmap.c | 7 +------
> 1 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
> index 5c3960d..f89245b 100644
> --- a/drivers/video/fbcmap.c
> +++ b/drivers/video/fbcmap.c
> @@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
> rc = -ENODEV;
> goto out;
> }
> - if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
> - !info->fbops->fb_setcmap)) {
> - rc = -EINVAL;
> - goto out1;
> - }
> +
> rc = fb_set_cmap(&umap, info);
> -out1:
> unlock_fb_info(info);
> out:
> fb_dealloc_cmap(&umap);
>
Thanks, queued this for 3.12.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings
2013-08-20 2:33 [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings Chen Gang
2013-08-30 8:41 ` Tomi Valkeinen
@ 2013-08-30 8:47 ` Chen Gang
1 sibling, 0 replies; 3+ messages in thread
From: Chen Gang @ 2013-08-30 8:47 UTC (permalink / raw)
To: linux-fbdev
On 08/30/2013 04:41 PM, Tomi Valkeinen wrote:
> On 20/08/13 05:33, Chen Gang wrote:
>> fb_set_cmap() already checks the parameters, so need remove the
>> redundancy checking.
>>
>> This redundancy checking is also incorrect, the related warning:
>>
>> drivers/video/fbcmap.c:288:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> ---
>> drivers/video/fbcmap.c | 7 +------
>> 1 files changed, 1 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
>> index 5c3960d..f89245b 100644
>> --- a/drivers/video/fbcmap.c
>> +++ b/drivers/video/fbcmap.c
>> @@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
>> rc = -ENODEV;
>> goto out;
>> }
>> - if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
>> - !info->fbops->fb_setcmap)) {
>> - rc = -EINVAL;
>> - goto out1;
>> - }
>> +
>> rc = fb_set_cmap(&umap, info);
>> -out1:
>> unlock_fb_info(info);
>> out:
>> fb_dealloc_cmap(&umap);
>>
>
> Thanks, queued this for 3.12.
>
Thank you too.
> Tomi
>
>
--
Chen Gang
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-30 8:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20 2:33 [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings Chen Gang
2013-08-30 8:41 ` Tomi Valkeinen
2013-08-30 8:47 ` Chen Gang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).