Re: [PATCH v2] staging: comedi: ni_*: Fix style warnings.

From: Joe Perches
Date: Thu Dec 14 2017 - 01:48:34 EST


On Thu, 2017-12-14 at 00:27 -0600, Aniruddha Shastri wrote:
> Three of these warnings are now line-too-long warnings. I think these
> warnings are preferable to the ones listed below. The longest line
> is only 87 chars wide, which is reasonable.
[]
> diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c
[]
> @@ -209,7 +209,7 @@ static int ni_670x_auto_attach(struct comedi_device *dev,
> const struct comedi_lrange **range_table_list;
>
> range_table_list = kmalloc_array(32,
> - sizeof(struct comedi_lrange *),
> + sizeof(const struct comedi_lrange *),

Adding const to a sizeof is unnecessary