[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1608690263-29411-1-git-send-email-chensong_2000@189.cn>
Date: Wed, 23 Dec 2020 10:24:23 +0800
From: chensong <chensong_2000@....cn>
To: greg@...ah.com, linux-kernel@...r.kernel.org
Cc: abbotti@....co.uk, hsweeten@...ionengravers.com,
chensong@...kylinos.cn, chensong <chensong_2000@....cn>
Subject: [PATCH] staging: comedi: remove warnings of comedi_lrange
Checkpatch.pl reports "warning: struct comedi_lrange should
normally be const" in some places, which are supposed to
be removed.
Signed-off-by: chensong <chensong_2000@....cn>
---
drivers/staging/comedi/drivers/das16.c | 4 ++--
drivers/staging/comedi/drivers/jr3_pci.c | 4 ++--
drivers/staging/comedi/drivers/ni_670x.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c
index 4ac2622..40bfd84 100644
--- a/drivers/staging/comedi/drivers/das16.c
+++ b/drivers/staging/comedi/drivers/das16.c
@@ -958,7 +958,7 @@ static const struct comedi_lrange *das16_ai_range(struct comedi_device *dev,
/* get any user-defined input range */
if (pg_type == das16_pg_none && (min || max)) {
- struct comedi_lrange *lrange;
+ const struct comedi_lrange *lrange;
struct comedi_krange *krange;
/* allocate single-range range table */
@@ -992,7 +992,7 @@ static const struct comedi_lrange *das16_ao_range(struct comedi_device *dev,
/* get any user-defined output range */
if (min || max) {
- struct comedi_lrange *lrange;
+ const struct comedi_lrange *lrange;
struct comedi_krange *krange;
/* allocate single-range range table */
diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index 7a02c4f..c35db0b 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -91,8 +91,8 @@ struct jr3_pci_dev_private {
};
union jr3_pci_single_range {
- struct comedi_lrange l;
- char _reserved[offsetof(struct comedi_lrange, range[1])];
+ const struct comedi_lrange l;
+ char _reserved[offsetof(const struct comedi_lrange, range[1])];
};
enum jr3_pci_poll_state {
diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c
index c197e47..66485ec 100644
--- a/drivers/staging/comedi/drivers/ni_670x.c
+++ b/drivers/staging/comedi/drivers/ni_670x.c
@@ -200,7 +200,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 *),
GFP_KERNEL);
if (!range_table_list)
return -ENOMEM;
--
2.7.4
Powered by blists - more mailing lists