Message ID | 1b3d5f2ae882cfca37c4422dfd72fd455d01166a.1525443571.git.mchehab+samsung@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, May 04, 2018 at 10:19:34AM -0400, Mauro Carvalho Chehab wrote: > After adding this driver, gcc complains with: > > drivers/media/i2c/video-i2c.c:55:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] > const static struct v4l2_fmtdesc amg88xx_format = { > ^~~~~ > drivers/media/i2c/video-i2c.c:59:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] > const static struct v4l2_frmsize_discrete amg88xx_size = { > ^~~~~ > > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index 971eb46c87f6..0b347cc19aa5 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c @@ -52,11 +52,11 @@ struct video_i2c_data { struct list_head vid_cap_active; }; -const static struct v4l2_fmtdesc amg88xx_format = { +static const struct v4l2_fmtdesc amg88xx_format = { .pixelformat = V4L2_PIX_FMT_Y12, }; -const static struct v4l2_frmsize_discrete amg88xx_size = { +static const struct v4l2_frmsize_discrete amg88xx_size = { .width = 8, .height = 8, };
After adding this driver, gcc complains with: drivers/media/i2c/video-i2c.c:55:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] const static struct v4l2_fmtdesc amg88xx_format = { ^~~~~ drivers/media/i2c/video-i2c.c:59:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] const static struct v4l2_frmsize_discrete amg88xx_size = { ^~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> --- drivers/media/i2c/video-i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)