Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1291709 > unrolled thread
| Started by | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> |
|---|---|
| First post | 2015-12-15 01:00 +0100 |
| Last post | 2015-12-15 12:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] char: constify tty_port_operations structs Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> - 2015-12-15 01:00 +0100
Re: [PATCH] char: constify tty_port_operations structs Arnd Bergmann <arnd@arndb.de> - 2015-12-15 12:20 +0100
| From | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> |
|---|---|
| Date | 2015-12-15 01:00 +0100 |
| Subject | [PATCH] char: constify tty_port_operations structs |
| Message-ID | <qFLc6-4Bk-7@gated-at.bofh.it> |
Constifies tty_port_operations structure in
the char driver since it is not modified
after its initialization.
Detected and found using Coccinelle.
Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
---
drivers/char/ttyprintk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
index a15ce4e..b098d2d 100644
--- a/drivers/char/ttyprintk.c
+++ b/drivers/char/ttyprintk.c
@@ -171,7 +171,7 @@ static const struct tty_operations ttyprintk_ops = {
.ioctl = tpk_ioctl,
};
-static struct tty_port_operations null_ops = { };
+static const struct tty_port_operations null_ops = { };
static struct tty_driver *ttyprintk_driver;
--
2.4.3
--
Kind Regards,
Aya Saif El-yazal Mahfouz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-12-15 12:20 +0100 |
| Message-ID | <qFVO9-3j5-9@gated-at.bofh.it> |
| In reply to | #1291709 |
On Tuesday 15 December 2015 01:50:19 Aya Mahfouz wrote: > Constifies tty_port_operations structure in > the char driver since it is not modified > after its initialization. > > Detected and found using Coccinelle. > > Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr> > Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> > Acked-by: Arnd Bergmann <arnd@arndb.de> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web