Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1560151 > unrolled thread
| Started by | Rob Herring <robh@kernel.org> |
|---|---|
| First post | 2017-01-17 00:00 +0100 |
| Last post | 2017-01-19 17:30 +0100 |
| Articles | 2 — 2 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 v2 4/9] tty: constify tty_ldisc_receive_buf buffer pointer Rob Herring <robh@kernel.org> - 2017-01-17 00:00 +0100
Re: [PATCH v2 4/9] tty: constify tty_ldisc_receive_buf buffer pointer Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-19 17:30 +0100
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-01-17 00:00 +0100 |
| Subject | [PATCH v2 4/9] tty: constify tty_ldisc_receive_buf buffer pointer |
| Message-ID | <t0opP-760-13@gated-at.bofh.it> |
This is needed to work with the client operations which uses const ptrs.
Really, the flags pointer could be const, too, but this would be a tree
wide fix.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-By: Sebastian Reichel <sre@kernel.org>
---
v2:
- no change
drivers/tty/tty_buffer.c | 2 +-
include/linux/tty.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index aa80dc94ddc2..f4dc3e296dd5 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -422,7 +422,7 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
*
* Returns the number of bytes not processed
*/
-int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p,
+int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
char *f, int count)
{
if (ld->ops->receive_buf2)
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 86c7853282b7..21c0fabfed60 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -657,7 +657,7 @@ extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty);
extern void tty_ldisc_release(struct tty_struct *tty);
extern void tty_ldisc_init(struct tty_struct *tty);
extern void tty_ldisc_deinit(struct tty_struct *tty);
-extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p,
+extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
char *f, int count);
/* n_tty.c */
--
2.10.1
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-01-19 17:30 +0100 |
| Message-ID | <t1nL3-3PP-17@gated-at.bofh.it> |
| In reply to | #1560151 |
On Mon, Jan 16, 2017 at 04:54:31PM -0600, Rob Herring wrote: > This is needed to work with the client operations which uses const ptrs. > > Really, the flags pointer could be const, too, but this would be a tree > wide fix. > > Signed-off-by: Rob Herring <robh@kernel.org> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Reviewed-By: Sebastian Reichel <sre@kernel.org> I've applied the first 4 patches in this series to my tree now, thanks. greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web