Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577023 > unrolled thread
| Started by | Karthik Nayak <karthik.188@gmail.com> |
|---|---|
| First post | 2017-02-08 21:30 +0100 |
| Last post | 2017-02-09 12:40 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] staging: comedi: Fix incorrect type assignment Karthik Nayak <karthik.188@gmail.com> - 2017-02-08 21:30 +0100
Re: [PATCH] staging: comedi: Fix incorrect type assignment Greg KH <gregkh@linuxfoundation.org> - 2017-02-09 12:30 +0100
Re: [PATCH] staging: comedi: Fix incorrect type assignment Ian Abbott <abbotti@mev.co.uk> - 2017-02-09 12:40 +0100
Re: [PATCH] staging: comedi: Fix incorrect type assignment Karthik Nayak <karthik.188@gmail.com> - 2017-02-09 12:40 +0100
| From | Karthik Nayak <karthik.188@gmail.com> |
|---|---|
| Date | 2017-02-08 21:30 +0100 |
| Subject | [PATCH] staging: comedi: Fix incorrect type assignment |
| Message-ID | <t8H2h-4VH-7@gated-at.bofh.it> |
This patch fixes the following sparse error:
drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: warning: incorrect type in assignment (different base types)
drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: expected restricted __be32 [usertype] serial_number
drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: got unsigned int
This is done by removing the whole code block, since the variable
'serial_number' is only assigned but never used.
Helped-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Karthik Nayak <Karthik.188@gmail.com>
---
drivers/staging/comedi/drivers/ni_pcimio.c | 9 ---------
drivers/staging/comedi/drivers/ni_stc.h | 1 -
2 files changed, 10 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c
index cdb66eab1292..3a96913c025e 100644
--- a/drivers/staging/comedi/drivers/ni_pcimio.c
+++ b/drivers/staging/comedi/drivers/ni_pcimio.c
@@ -1202,8 +1202,6 @@ static void m_series_init_eeprom_buffer(struct comedi_device *dev)
resource_size_t daq_phys_addr;
static const int Start_Cal_EEPROM = 0x400;
static const unsigned int window_size = 10;
- static const int serial_number_eeprom_offset = 0x4;
- static const int serial_number_eeprom_length = 0x4;
unsigned int old_iodwbsr_bits;
unsigned int old_iodwbsr1_bits;
unsigned int old_iodwcr1_bits;
@@ -1221,13 +1219,6 @@ static void m_series_init_eeprom_buffer(struct comedi_device *dev)
writel(0x1 | old_iodwcr1_bits, mite->mmio + MITE_IODWCR_1);
writel(0xf, mite->mmio + 0x30);
- BUG_ON(serial_number_eeprom_length > sizeof(devpriv->serial_number));
- for (i = 0; i < serial_number_eeprom_length; ++i) {
- char *byte_ptr = (char *)&devpriv->serial_number + i;
- *byte_ptr = ni_readb(dev, serial_number_eeprom_offset + i);
- }
- devpriv->serial_number = be32_to_cpu(devpriv->serial_number);
-
for (i = 0; i < M_SERIES_EEPROM_SIZE; ++i)
devpriv->eeprom_buffer[i] = ni_readb(dev, Start_Cal_EEPROM + i);
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index f27b545f83eb..61138e86a455 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -1031,7 +1031,6 @@ struct ni_private {
unsigned short ai_fifo_buffer[0x2000];
u8 eeprom_buffer[M_SERIES_EEPROM_SIZE];
- __be32 serial_number;
struct mite *mite;
struct mite_channel *ai_mite_chan;
--
2.11.1
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-02-09 12:30 +0100 |
| Message-ID | <t8V5g-5vY-13@gated-at.bofh.it> |
| In reply to | #1577023 |
On Thu, Feb 09, 2017 at 01:53:56AM +0530, Karthik Nayak wrote: > This patch fixes the following sparse error: > drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: warning: incorrect type in assignment (different base types) > drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: expected restricted __be32 [usertype] serial_number > drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: got unsigned int > > This is done by removing the whole code block, since the variable > 'serial_number' is only assigned but never used. > > Helped-by: Ian Abbott <abbotti@mev.co.uk> There's no such tag, sorry :( And does this obsolete all of your other ones? Please make it obvious what I am supposed to do here. I've now dropped all of these patches from my queue. please resend the proper one. thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Ian Abbott <abbotti@mev.co.uk> |
|---|---|
| Date | 2017-02-09 12:40 +0100 |
| Message-ID | <t8VeW-5zl-23@gated-at.bofh.it> |
| In reply to | #1577477 |
On 09/02/2017 11:04, Greg KH wrote: > On Thu, Feb 09, 2017 at 01:53:56AM +0530, Karthik Nayak wrote: >> This patch fixes the following sparse error: >> drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: warning: incorrect type in assignment (different base types) >> drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: expected restricted __be32 [usertype] serial_number >> drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: got unsigned int >> >> This is done by removing the whole code block, since the variable >> 'serial_number' is only assigned but never used. >> >> Helped-by: Ian Abbott <abbotti@mev.co.uk> > > There's no such tag, sorry :( > > And does this obsolete all of your other ones? Please make it obvious > what I am supposed to do here. > > I've now dropped all of these patches from my queue. please resend the > proper one. > > thanks, > > greg k-h > To add to that, I think the emphasis of the patch title and description should now be on the removal of serial_number, with fixing the sparse error as a useful side-effect/inspiration. The patch title should also mention ni_pcimio. Thanks, Ian. -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-
[toc] | [prev] | [next] | [standalone]
| From | Karthik Nayak <karthik.188@gmail.com> |
|---|---|
| Date | 2017-02-09 12:40 +0100 |
| Message-ID | <t8VeW-5zl-13@gated-at.bofh.it> |
| In reply to | #1577477 |
Hello, On Thu, Feb 9, 2017 at 4:34 PM, Greg KH <gregkh@linuxfoundation.org> wrote: > On Thu, Feb 09, 2017 at 01:53:56AM +0530, Karthik Nayak wrote: >> This patch fixes the following sparse error: >> drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: warning: incorrect type in assignment (different base types) >> drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: expected restricted __be32 [usertype] serial_number >> drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: got unsigned int >> >> This is done by removing the whole code block, since the variable >> 'serial_number' is only assigned but never used. >> >> Helped-by: Ian Abbott <abbotti@mev.co.uk> > > There's no such tag, sorry :( > Ah! This is common back in the Git community, I shall drop it :) > And does this obsolete all of your other ones? Please make it obvious > what I am supposed to do here. > > I've now dropped all of these patches from my queue. please resend the > proper one. > That works! I'll send the patch again, lets ignore the previous patches. On Thu, Feb 9, 2017 at 4:52 PM, Ian Abbott <abbotti@mev.co.uk> wrote: > To add to that, I think the emphasis of the patch title and description > should now be on the removal of serial_number, with fixing the sparse error > as a useful side-effect/inspiration. The patch title should also mention > ni_pcimio. > > Thanks, > Ian. Makes sense, will make the necessary changes. -- Regards, Karthik Nayak
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web