All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Constify option structures
@ 2017-03-27 18:45 Gargi Sharma
  2017-03-27 18:45 ` [PATCH 1/4] extensions: libebt_limit: Constify option struct Gargi Sharma
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gargi Sharma @ 2017-03-27 18:45 UTC (permalink / raw)
  To: netfilter-devel; +Cc: pablo, outreachy-kernel, Gargi Sharma

The struct option is generally used only to initialise
fields inside certain structs and is not modified anywhere.
Done using Coccinelle:

@r1 disable optional_qualifier@
identifier s,i;
position p;
@@

static struct option i@p[] ={...};

@ok1@
identifier r1.i;
expression e;
position p;
@@
e = i@p

@bad@
position p != {r1.p,ok1.p};
identifier r1.i;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct option i[] = { ... };


Gargi Sharma (4):
  extensions: libebt_limit: Constify option struct
  extenstions: libebt_mark_m: Constify option struct
  extensions: libebt_mark: Constify option struct
  extensions: libebt_nflog: Constify option struct

 extensions/libebt_limit.c  | 2 +-
 extensions/libebt_mark.c   | 2 +-
 extensions/libebt_mark_m.c | 2 +-
 extensions/libebt_nflog.c  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2017-03-27 18:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-27 18:45 [PATCH 0/4] Constify option structures Gargi Sharma
2017-03-27 18:45 ` [PATCH 1/4] extensions: libebt_limit: Constify option struct Gargi Sharma
2017-03-27 18:45 ` [PATCH 2/4] extenstions: libebt_mark_m: " Gargi Sharma
2017-03-27 18:45 ` [PATCH 3/4] extensions: libebt_mark: " Gargi Sharma
2017-03-27 18:45 ` [PATCH 4/4] extensions: libebt_nflog: " Gargi Sharma
2017-03-27 18:49 ` [Outreachy kernel] [PATCH 0/4] Constify option structures Pablo Neira Ayuso

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.