All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] gspca: dubious one-bit signed bitfield
@ 2012-08-05 12:34 ` Emil Goode
  0 siblings, 0 replies; 6+ messages in thread
From: Emil Goode @ 2012-08-05 12:34 UTC (permalink / raw)
  To: hdegoede, mchehab; +Cc: linux-media, kernel-janitors, Emil Goode

This patch changes some signed integers to unsigned because
they are not intended for negative values and sparse
is making noise about it.

Sparse gives eight of these errors:
drivers/media/video/gspca/ov519.c:144:29: error: dubious one-bit signed bitfield

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 drivers/media/video/gspca/ov519.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c
index bfc7cef..c1a21bf 100644
--- a/drivers/media/video/gspca/ov519.c
+++ b/drivers/media/video/gspca/ov519.c
@@ -141,14 +141,14 @@ enum sensors {
 
 /* table of the disabled controls */
 struct ctrl_valid {
-	int has_brightness:1;
-	int has_contrast:1;
-	int has_exposure:1;
-	int has_autogain:1;
-	int has_sat:1;
-	int has_hvflip:1;
-	int has_autobright:1;
-	int has_freq:1;
+	unsigned int has_brightness:1;
+	unsigned int has_contrast:1;
+	unsigned int has_exposure:1;
+	unsigned int has_autogain:1;
+	unsigned int has_sat:1;
+	unsigned int has_hvflip:1;
+	unsigned int has_autobright:1;
+	unsigned int has_freq:1;
 };
 
 static const struct ctrl_valid valid_controls[] = {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] [media] gspca: dubious one-bit signed bitfield
@ 2012-08-05 12:34 ` Emil Goode
  0 siblings, 0 replies; 6+ messages in thread
From: Emil Goode @ 2012-08-05 12:34 UTC (permalink / raw)
  To: hdegoede, mchehab; +Cc: linux-media, kernel-janitors, Emil Goode

This patch changes some signed integers to unsigned because
they are not intended for negative values and sparse
is making noise about it.

Sparse gives eight of these errors:
drivers/media/video/gspca/ov519.c:144:29: error: dubious one-bit signed bitfield

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 drivers/media/video/gspca/ov519.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c
index bfc7cef..c1a21bf 100644
--- a/drivers/media/video/gspca/ov519.c
+++ b/drivers/media/video/gspca/ov519.c
@@ -141,14 +141,14 @@ enum sensors {
 
 /* table of the disabled controls */
 struct ctrl_valid {
-	int has_brightness:1;
-	int has_contrast:1;
-	int has_exposure:1;
-	int has_autogain:1;
-	int has_sat:1;
-	int has_hvflip:1;
-	int has_autobright:1;
-	int has_freq:1;
+	unsigned int has_brightness:1;
+	unsigned int has_contrast:1;
+	unsigned int has_exposure:1;
+	unsigned int has_autogain:1;
+	unsigned int has_sat:1;
+	unsigned int has_hvflip:1;
+	unsigned int has_autobright:1;
+	unsigned int has_freq:1;
 };
 
 static const struct ctrl_valid valid_controls[] = {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] gspca: dubious one-bit signed bitfield
  2012-08-05 12:34 ` Emil Goode
@ 2012-08-06  8:21   ` Hans de Goede
  -1 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2012-08-06  8:21 UTC (permalink / raw)
  To: Emil Goode; +Cc: mchehab, linux-media, kernel-janitors

Hi,

On 08/05/2012 02:34 PM, Emil Goode wrote:
> This patch changes some signed integers to unsigned because
> they are not intended for negative values and sparse
> is making noise about it.
>
> Sparse gives eight of these errors:
> drivers/media/video/gspca/ov519.c:144:29: error: dubious one-bit signed bitfield
>
> Signed-off-by: Emil Goode <emilgoode@gmail.com>

Thanks, I'll add this to my gspca tree.

Regards,

Hans

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] gspca: dubious one-bit signed bitfield
@ 2012-08-06  8:21   ` Hans de Goede
  0 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2012-08-06  8:21 UTC (permalink / raw)
  To: Emil Goode; +Cc: mchehab, linux-media, kernel-janitors

Hi,

On 08/05/2012 02:34 PM, Emil Goode wrote:
> This patch changes some signed integers to unsigned because
> they are not intended for negative values and sparse
> is making noise about it.
>
> Sparse gives eight of these errors:
> drivers/media/video/gspca/ov519.c:144:29: error: dubious one-bit signed bitfield
>
> Signed-off-by: Emil Goode <emilgoode@gmail.com>

Thanks, I'll add this to my gspca tree.

Regards,

Hans

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] gspca: dubious one-bit signed bitfield
  2012-08-05 12:34 ` Emil Goode
@ 2012-08-09 11:28   ` Hans de Goede
  -1 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2012-08-09 11:28 UTC (permalink / raw)
  To: Emil Goode; +Cc: mchehab, linux-media, kernel-janitors

Hi,

Thanks for the patch, I've added it to my tree for 3.7:
http://git.linuxtv.org/hgoede/gspca.git/shortlog/refs/heads/media-for_v3.7-wip

Regards,

Hans



On 08/05/2012 02:34 PM, Emil Goode wrote:
> This patch changes some signed integers to unsigned because
> they are not intended for negative values and sparse
> is making noise about it.
>
> Sparse gives eight of these errors:
> drivers/media/video/gspca/ov519.c:144:29: error: dubious one-bit signed bitfield
>
> Signed-off-by: Emil Goode <emilgoode@gmail.com>
> ---
>   drivers/media/video/gspca/ov519.c |   16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c
> index bfc7cef..c1a21bf 100644
> --- a/drivers/media/video/gspca/ov519.c
> +++ b/drivers/media/video/gspca/ov519.c
> @@ -141,14 +141,14 @@ enum sensors {
>
>   /* table of the disabled controls */
>   struct ctrl_valid {
> -	int has_brightness:1;
> -	int has_contrast:1;
> -	int has_exposure:1;
> -	int has_autogain:1;
> -	int has_sat:1;
> -	int has_hvflip:1;
> -	int has_autobright:1;
> -	int has_freq:1;
> +	unsigned int has_brightness:1;
> +	unsigned int has_contrast:1;
> +	unsigned int has_exposure:1;
> +	unsigned int has_autogain:1;
> +	unsigned int has_sat:1;
> +	unsigned int has_hvflip:1;
> +	unsigned int has_autobright:1;
> +	unsigned int has_freq:1;
>   };
>
>   static const struct ctrl_valid valid_controls[] = {
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] gspca: dubious one-bit signed bitfield
@ 2012-08-09 11:28   ` Hans de Goede
  0 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2012-08-09 11:28 UTC (permalink / raw)
  To: Emil Goode; +Cc: mchehab, linux-media, kernel-janitors

Hi,

Thanks for the patch, I've added it to my tree for 3.7:
http://git.linuxtv.org/hgoede/gspca.git/shortlog/refs/heads/media-for_v3.7-wip

Regards,

Hans



On 08/05/2012 02:34 PM, Emil Goode wrote:
> This patch changes some signed integers to unsigned because
> they are not intended for negative values and sparse
> is making noise about it.
>
> Sparse gives eight of these errors:
> drivers/media/video/gspca/ov519.c:144:29: error: dubious one-bit signed bitfield
>
> Signed-off-by: Emil Goode <emilgoode@gmail.com>
> ---
>   drivers/media/video/gspca/ov519.c |   16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c
> index bfc7cef..c1a21bf 100644
> --- a/drivers/media/video/gspca/ov519.c
> +++ b/drivers/media/video/gspca/ov519.c
> @@ -141,14 +141,14 @@ enum sensors {
>
>   /* table of the disabled controls */
>   struct ctrl_valid {
> -	int has_brightness:1;
> -	int has_contrast:1;
> -	int has_exposure:1;
> -	int has_autogain:1;
> -	int has_sat:1;
> -	int has_hvflip:1;
> -	int has_autobright:1;
> -	int has_freq:1;
> +	unsigned int has_brightness:1;
> +	unsigned int has_contrast:1;
> +	unsigned int has_exposure:1;
> +	unsigned int has_autogain:1;
> +	unsigned int has_sat:1;
> +	unsigned int has_hvflip:1;
> +	unsigned int has_autobright:1;
> +	unsigned int has_freq:1;
>   };
>
>   static const struct ctrl_valid valid_controls[] = {
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-09 11:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-05 12:34 [PATCH] [media] gspca: dubious one-bit signed bitfield Emil Goode
2012-08-05 12:34 ` Emil Goode
2012-08-06  8:21 ` Hans de Goede
2012-08-06  8:21   ` Hans de Goede
2012-08-09 11:28 ` Hans de Goede
2012-08-09 11:28   ` Hans de Goede

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.