* [PATCH] [media] ad5820: fix one smatch warning
@ 2016-08-24 11:23 Mauro Carvalho Chehab
2016-08-24 11:46 ` Sakari Ailus
0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2016-08-24 11:23 UTC (permalink / raw)
Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
Mauro Carvalho Chehab, Mauro Carvalho Chehab, Pavel Machek,
Pali Rohár, Sakari Ailus
drivers/media/i2c/ad5820.c:61:24: error: dubious one-bit signed bitfield
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
drivers/media/i2c/ad5820.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c
index 62cc1f54622f..d7ad5c1a1219 100644
--- a/drivers/media/i2c/ad5820.c
+++ b/drivers/media/i2c/ad5820.c
@@ -58,7 +58,7 @@ struct ad5820_device {
struct mutex power_lock;
int power_count;
- int standby : 1;
+ unsigned int standby : 1;
};
static int ad5820_write(struct ad5820_device *coil, u16 data)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [media] ad5820: fix one smatch warning
2016-08-24 11:23 [PATCH] [media] ad5820: fix one smatch warning Mauro Carvalho Chehab
@ 2016-08-24 11:46 ` Sakari Ailus
0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2016-08-24 11:46 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Linux Media Mailing List, Mauro Carvalho Chehab,
Mauro Carvalho Chehab, Pavel Machek, Pali Rohár
Hi Mauro,
Mauro Carvalho Chehab wrote:
> drivers/media/i2c/ad5820.c:61:24: error: dubious one-bit signed bitfield
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
> drivers/media/i2c/ad5820.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c
> index 62cc1f54622f..d7ad5c1a1219 100644
> --- a/drivers/media/i2c/ad5820.c
> +++ b/drivers/media/i2c/ad5820.c
> @@ -58,7 +58,7 @@ struct ad5820_device {
> struct mutex power_lock;
> int power_count;
>
> - int standby : 1;
> + unsigned int standby : 1;
I guess a bool would be a better match for this one. It's what it's used
for. [01] assignments should be replaced by boolean values.
I can submit a patch for this as well, up to you.
> };
>
> static int ad5820_write(struct ad5820_device *coil, u16 data)
>
--
Sakari Ailus
sakari.ailus@linux.intel.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-24 11:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24 11:23 [PATCH] [media] ad5820: fix one smatch warning Mauro Carvalho Chehab
2016-08-24 11:46 ` Sakari Ailus
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).