All of lore.kernel.org
 help / color / mirror / Atom feed
* [Outreachy Kernel] [PATCH] staging: greybus: Constify local struct gb_loopback_stats
@ 2016-10-02 19:22 Rehas Sachdeva
  2016-10-02 19:36 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Rehas Sachdeva @ 2016-10-02 19:22 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: Bryan O'Donoghue, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman

The local declaration "struct gb_loopback_stats reset" is not modified
throughout its scope and hence can be made const. Done using Coccinelle.

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
---
 drivers/staging/greybus/loopback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index 7882306..fb5a068 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -837,7 +837,7 @@ static int gb_loopback_request_handler(struct gb_operation *operation)
 
 static void gb_loopback_reset_stats(struct gb_loopback *gb)
 {
-	struct gb_loopback_stats reset = {
+	const struct gb_loopback_stats reset = {
 		.min = U32_MAX,
 	};
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-03 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-02 19:22 [Outreachy Kernel] [PATCH] staging: greybus: Constify local struct gb_loopback_stats Rehas Sachdeva
2016-10-02 19:36 ` [Outreachy kernel] " Julia Lawall
2016-10-03 10:14   ` Greg Kroah-Hartman
     [not found]   ` <1475489763.28319.85.camel@nexus-software.ie>
2016-10-03 10:44     ` Rehas Sachdeva
     [not found]       ` <1475497775.28319.95.camel@nexus-software.ie>
2016-10-03 14:37         ` Julia Lawall

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.