linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: comedi: comedidev.h: Drop old style zero-length array
@ 2016-12-21 19:13 Cheah Kok Cheong
  2017-01-03 10:56 ` Ian Abbott
  0 siblings, 1 reply; 2+ messages in thread
From: Cheah Kok Cheong @ 2016-12-21 19:13 UTC (permalink / raw)
  To: abbotti, hsweeten, gregkh; +Cc: devel, linux-kernel, Cheah Kok Cheong

According to Documentation/Changes, the minimum gcc version required
to compile the kernel is 3.2 (this is probably outdated too).

Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
---
 drivers/staging/comedi/comedidev.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 0c7c37a..9713d96 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -612,12 +612,6 @@ extern const struct comedi_lrange range_unknown;
 
 #define range_digital		range_unipolar5
 
-#if __GNUC__ >= 3
-#define GCC_ZERO_LENGTH_ARRAY
-#else
-#define GCC_ZERO_LENGTH_ARRAY 0
-#endif
-
 /**
  * struct comedi_lrange - Describes a COMEDI range table
  * @length: Number of entries in the range table.
@@ -631,7 +625,7 @@ extern const struct comedi_lrange range_unknown;
  */
 struct comedi_lrange {
 	int length;
-	struct comedi_krange range[GCC_ZERO_LENGTH_ARRAY];
+	struct comedi_krange range[];
 };
 
 /**
-- 
2.7.4

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

* Re: [PATCH] Staging: comedi: comedidev.h: Drop old style zero-length array
  2016-12-21 19:13 [PATCH] Staging: comedi: comedidev.h: Drop old style zero-length array Cheah Kok Cheong
@ 2017-01-03 10:56 ` Ian Abbott
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Abbott @ 2017-01-03 10:56 UTC (permalink / raw)
  To: Cheah Kok Cheong, hsweeten, gregkh; +Cc: devel, linux-kernel

On 21/12/16 19:13, Cheah Kok Cheong wrote:
> According to Documentation/Changes, the minimum gcc version required
> to compile the kernel is 3.2 (this is probably outdated too).
>
> Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
> ---
>  drivers/staging/comedi/comedidev.h | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
> index 0c7c37a..9713d96 100644
> --- a/drivers/staging/comedi/comedidev.h
> +++ b/drivers/staging/comedi/comedidev.h
> @@ -612,12 +612,6 @@ extern const struct comedi_lrange range_unknown;
>
>  #define range_digital		range_unipolar5
>
> -#if __GNUC__ >= 3
> -#define GCC_ZERO_LENGTH_ARRAY
> -#else
> -#define GCC_ZERO_LENGTH_ARRAY 0
> -#endif
> -
>  /**
>   * struct comedi_lrange - Describes a COMEDI range table
>   * @length: Number of entries in the range table.
> @@ -631,7 +625,7 @@ extern const struct comedi_lrange range_unknown;
>   */
>  struct comedi_lrange {
>  	int length;
> -	struct comedi_krange range[GCC_ZERO_LENGTH_ARRAY];
> +	struct comedi_krange range[];
>  };
>
>  /**
>

Yes, that seems to be redundant.  Thanks!

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

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

end of thread, other threads:[~2017-01-03 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-21 19:13 [PATCH] Staging: comedi: comedidev.h: Drop old style zero-length array Cheah Kok Cheong
2017-01-03 10:56 ` Ian Abbott

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).