diff for duplicates of <4933F445.2070403@cam.ac.uk> diff --git a/a/1.txt b/N1/1.txt index 20166e4..65f39b9 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -124,7 +124,7 @@ index 0000000..347ace1 + int code; + + /* initial store */ -+ if (unlikely(ring->write_p == 0)) { ++ if (unlikely(ring->write_p = 0)) { + ring->write_p = ring->data; + /* doesn't actually matter if this is out of the set */ + ring->half_p = ring->data - ring->buf.length*ring->buf.bpd/2; @@ -136,18 +136,18 @@ index 0000000..347ace1 + barrier(); + ring->write_p += ring->buf.bpd; + /* End of ring, back to the beginning */ -+ if (ring->write_p == ring->data + ring->buf.length*ring->buf.bpd) { ++ if (ring->write_p = ring->data + ring->buf.length*ring->buf.bpd) { + ring->write_p = ring->data; + ring->buf.loopcount++; + } -+ if (ring->read_p == 0) ++ if (ring->read_p = 0) + ring->read_p = ring->data; + /* Buffer full - move the read pointer and create / escalate + * ring event */ -+ else if (ring->write_p == ring->read_p) { ++ else if (ring->write_p = ring->read_p) { + ring->read_p += ring->buf.bpd; + if (ring->read_p -+ == ring->data + ring->buf.length*ring->buf.bpd) ++ = ring->data + ring->buf.length*ring->buf.bpd) + ring->read_p = ring->data; + + spin_lock(&ring->buf.shared_ev_pointer.lock); @@ -178,9 +178,9 @@ index 0000000..347ace1 + * simultaneous read */ + /* Also need to use loop count to ensure this only happens once */ + ring->half_p += ring->buf.bpd; -+ if (ring->half_p == ring->data + ring->buf.length*ring->buf.bpd) ++ if (ring->half_p = ring->data + ring->buf.length*ring->buf.bpd) + ring->half_p = ring->data; -+ if (ring->half_p == ring->read_p) { ++ if (ring->half_p = ring->read_p) { + spin_lock(&ring->buf.shared_ev_pointer.lock); + code = IIO_EVENT_CODE_RING_50_FULL; + ret = __iio_push_event(&ring->buf.ev_int, @@ -211,14 +211,14 @@ index 0000000..347ace1 + bytes_to_rip = min(ring->buf.bpd*ring->buf.length, bytes_to_rip); + + *data = kmalloc(bytes_to_rip, GFP_KERNEL); -+ if (*data == NULL) { ++ if (*data = NULL) { + ret = -ENOMEM; + goto error_ret; + } + + /* build local copy */ + initial_read_p = ring->read_p; -+ if (unlikely(initial_read_p == 0)) { /* No data here as yet */ ++ if (unlikely(initial_read_p = 0)) { /* No data here as yet */ + ret = 0; + goto error_free_data_cpy; + } @@ -231,7 +231,7 @@ index 0000000..347ace1 + initial_read_p = ring->read_p; + initial_write_p = ring->write_p; + } -+ if (initial_write_p == initial_read_p) { ++ if (initial_write_p = initial_read_p) { + /* No new data available.*/ + ret = 0; + goto error_free_data_cpy; @@ -316,7 +316,7 @@ index 0000000..347ace1 + last_written_p_copy = ring->last_written_p; + barrier(); /*unnessecary? */ + /* Check there is anything here */ -+ if (last_written_p_copy == 0) ++ if (last_written_p_copy = 0) + return -EAGAIN; + memcpy(data, last_written_p_copy, ring->buf.bpd); + @@ -621,3 +621,8 @@ index 0000000..0b85b56 +{}; +#endif /* !CONFIG_IIO_RING_BUFFER */ +#endif /* _IIO_RING_SW_H_ */ + +_______________________________________________ +lm-sensors mailing list +lm-sensors@lm-sensors.org +http://lists.lm-sensors.org/mailman/listinfo/lm-sensors diff --git a/a/content_digest b/N1/content_digest index 4d72bea..42bef99 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,6 @@ "ref\04933F291.4020001@cam.ac.uk\0" "From\0Jonathan Cameron <jic23@cam.ac.uk>\0" - "Subject\0[Industrial I/O] [3/13] RFC: IIO Software ring buffer implementation\0" + "Subject\0[lm-sensors] [Industrial I/O] [3/13] RFC: IIO Software ring buffer\0" "Date\0Mon, 01 Dec 2008 14:27:17 +0000\0" "To\0Jonathan Cameron <jic23@cam.ac.uk>\0" "Cc\0LKML <linux-kernel@vger.kernel.org>" @@ -138,7 +138,7 @@ "+\tint code;\n" "+\n" "+\t/* initial store */\n" - "+\tif (unlikely(ring->write_p == 0)) {\n" + "+\tif (unlikely(ring->write_p = 0)) {\n" "+\t\tring->write_p = ring->data;\n" "+\t\t/* doesn't actually matter if this is out of the set */\n" "+\t\tring->half_p = ring->data - ring->buf.length*ring->buf.bpd/2;\n" @@ -150,18 +150,18 @@ "+\tbarrier();\n" "+\tring->write_p += ring->buf.bpd;\n" "+\t/* End of ring, back to the beginning */\n" - "+\tif (ring->write_p == ring->data + ring->buf.length*ring->buf.bpd) {\n" + "+\tif (ring->write_p = ring->data + ring->buf.length*ring->buf.bpd) {\n" "+\t\tring->write_p = ring->data;\n" "+\t\tring->buf.loopcount++;\n" "+\t}\n" - "+\tif (ring->read_p == 0)\n" + "+\tif (ring->read_p = 0)\n" "+\t\tring->read_p = ring->data;\n" "+\t/* Buffer full - move the read pointer and create / escalate\n" "+\t * ring event */\n" - "+\telse if (ring->write_p == ring->read_p) {\n" + "+\telse if (ring->write_p = ring->read_p) {\n" "+\t\tring->read_p += ring->buf.bpd;\n" "+\t\tif (ring->read_p\n" - "+\t\t == ring->data + ring->buf.length*ring->buf.bpd)\n" + "+\t\t = ring->data + ring->buf.length*ring->buf.bpd)\n" "+\t\t\tring->read_p = ring->data;\n" "+\n" "+\t\tspin_lock(&ring->buf.shared_ev_pointer.lock);\n" @@ -192,9 +192,9 @@ "+\t * simultaneous read */\n" "+\t/* Also need to use loop count to ensure this only happens once */\n" "+\tring->half_p += ring->buf.bpd;\n" - "+\tif (ring->half_p == ring->data + ring->buf.length*ring->buf.bpd)\n" + "+\tif (ring->half_p = ring->data + ring->buf.length*ring->buf.bpd)\n" "+\t\tring->half_p = ring->data;\n" - "+\tif (ring->half_p == ring->read_p) {\n" + "+\tif (ring->half_p = ring->read_p) {\n" "+\t\tspin_lock(&ring->buf.shared_ev_pointer.lock);\n" "+\t\tcode = IIO_EVENT_CODE_RING_50_FULL;\n" "+\t\tret = __iio_push_event(&ring->buf.ev_int,\n" @@ -225,14 +225,14 @@ "+\tbytes_to_rip = min(ring->buf.bpd*ring->buf.length, bytes_to_rip);\n" "+\n" "+\t*data = kmalloc(bytes_to_rip, GFP_KERNEL);\n" - "+\tif (*data == NULL) {\n" + "+\tif (*data = NULL) {\n" "+\t\tret = -ENOMEM;\n" "+\t\tgoto error_ret;\n" "+\t}\n" "+\n" "+\t/* build local copy */\n" "+\tinitial_read_p = ring->read_p;\n" - "+\tif (unlikely(initial_read_p == 0)) { /* No data here as yet */\n" + "+\tif (unlikely(initial_read_p = 0)) { /* No data here as yet */\n" "+\t\tret = 0;\n" "+\t\tgoto error_free_data_cpy;\n" "+\t}\n" @@ -245,7 +245,7 @@ "+\t\tinitial_read_p = ring->read_p;\n" "+\t\tinitial_write_p = ring->write_p;\n" "+\t}\n" - "+\tif (initial_write_p == initial_read_p) {\n" + "+\tif (initial_write_p = initial_read_p) {\n" "+\t\t/* No new data available.*/\n" "+\t\tret = 0;\n" "+\t\tgoto error_free_data_cpy;\n" @@ -330,7 +330,7 @@ "+\tlast_written_p_copy = ring->last_written_p;\n" "+\tbarrier(); /*unnessecary? */\n" "+\t/* Check there is anything here */\n" - "+\tif (last_written_p_copy == 0)\n" + "+\tif (last_written_p_copy = 0)\n" "+\t\treturn -EAGAIN;\n" "+\tmemcpy(data, last_written_p_copy, ring->buf.bpd);\n" "+\n" @@ -634,6 +634,11 @@ "+static inline void iio_ring_sw_register_funcs(struct iio_ring_access_funcs *ra)\n" "+{};\n" "+#endif /* !CONFIG_IIO_RING_BUFFER */\n" - +#endif /* _IIO_RING_SW_H_ */ + "+#endif /* _IIO_RING_SW_H_ */\n" + "\n" + "_______________________________________________\n" + "lm-sensors mailing list\n" + "lm-sensors@lm-sensors.org\n" + http://lists.lm-sensors.org/mailman/listinfo/lm-sensors -650f4d9ca424c248b8113fd58ea41e9d36bc4c7c14e7f19717ebce78c7c1c5bb +1bbb00fa17079f4b951963629eba49125bf035ab632c469019b116cbf8d33f8c
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.