* [PATCH 0/2] Staging: Remove & from function name. @ 2016-03-19 6:12 Sandhya Bankar 2016-03-19 6:14 ` [PATCH 1/2] Staging: netlogic: " Sandhya Bankar 2016-03-19 6:17 ` [PATCH 2/2] Staging: rdma: " Sandhya Bankar 0 siblings, 2 replies; 8+ messages in thread From: Sandhya Bankar @ 2016-03-19 6:12 UTC (permalink / raw) To: outreachy-kernel Remove & from function name,when function name passed as an argument to another function. Function name is used as pointer without &. Sandhya Bankar (2): Staging: netlogic: Remove & from function name. Staging: rdma: Remove & from function name. drivers/staging/netlogic/xlr_net.c | 2 +- drivers/staging/rdma/hfi1/verbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.8.3.4 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] Staging: netlogic: Remove & from function name. 2016-03-19 6:12 [PATCH 0/2] Staging: Remove & from function name Sandhya Bankar @ 2016-03-19 6:14 ` Sandhya Bankar 2016-03-19 6:17 ` [PATCH 2/2] Staging: rdma: " Sandhya Bankar 1 sibling, 0 replies; 8+ messages in thread From: Sandhya Bankar @ 2016-03-19 6:14 UTC (permalink / raw) To: outreachy-kernel Remove & from function name,when function name passed as an argument to another function. Function name is used as pointer without &. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> --- drivers/staging/netlogic/xlr_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index aa1cdf6..99445d0 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -850,7 +850,7 @@ static int xlr_mii_probe(struct xlr_net_priv *priv) /* Attach MAC to PHY */ phydev = phy_connect(priv->ndev, phydev_name(phydev), - &xlr_gmac_link_adjust, priv->nd->phy_interface); + xlr_gmac_link_adjust, priv->nd->phy_interface); if (IS_ERR(phydev)) { pr_err("could not attach PHY\n"); -- 1.8.3.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] Staging: rdma: Remove & from function name. 2016-03-19 6:12 [PATCH 0/2] Staging: Remove & from function name Sandhya Bankar 2016-03-19 6:14 ` [PATCH 1/2] Staging: netlogic: " Sandhya Bankar @ 2016-03-19 6:17 ` Sandhya Bankar 2016-03-19 13:57 ` [Outreachy kernel] " Julia Lawall 1 sibling, 1 reply; 8+ messages in thread From: Sandhya Bankar @ 2016-03-19 6:17 UTC (permalink / raw) To: outreachy-kernel Remove & from function name. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> --- drivers/staging/rdma/hfi1/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rdma/hfi1/verbs.c b/drivers/staging/rdma/hfi1/verbs.c index 1761686..ece62b7 100644 --- a/drivers/staging/rdma/hfi1/verbs.c +++ b/drivers/staging/rdma/hfi1/verbs.c @@ -261,7 +261,7 @@ static const opcode_handler opcode_handler_tbl[256] = { [IB_OPCODE_UD_SEND_ONLY] = &hfi1_ud_rcv, [IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE] = &hfi1_ud_rcv, /* CNP */ - [IB_OPCODE_CNP] = &hfi1_cnp_rcv + [IB_OPCODE_CNP] = hfi1_cnp_rcv }; /* -- 1.8.3.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] Staging: rdma: Remove & from function name. 2016-03-19 6:17 ` [PATCH 2/2] Staging: rdma: " Sandhya Bankar @ 2016-03-19 13:57 ` Julia Lawall 2016-03-19 14:26 ` sandhya bankar 0 siblings, 1 reply; 8+ messages in thread From: Julia Lawall @ 2016-03-19 13:57 UTC (permalink / raw) To: Sandhya Bankar; +Cc: outreachy-kernel On Sat, 19 Mar 2016, Sandhya Bankar wrote: > Remove & from function name. > > Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> > --- > drivers/staging/rdma/hfi1/verbs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rdma/hfi1/verbs.c b/drivers/staging/rdma/hfi1/verbs.c > index 1761686..ece62b7 100644 > --- a/drivers/staging/rdma/hfi1/verbs.c > +++ b/drivers/staging/rdma/hfi1/verbs.c > @@ -261,7 +261,7 @@ static const opcode_handler opcode_handler_tbl[256] = { > [IB_OPCODE_UD_SEND_ONLY] = &hfi1_ud_rcv, > [IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE] = &hfi1_ud_rcv, > /* CNP */ > - [IB_OPCODE_CNP] = &hfi1_cnp_rcv > + [IB_OPCODE_CNP] = hfi1_cnp_rcv Why not make the change in the other cases? julia > }; > > /* > -- > 1.8.3.4 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/6a66bd13896f6f5e6ff2873e697fbc72af8c8185.1458367377.git.bankarsandhya512%40gmail.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] Staging: rdma: Remove & from function name. 2016-03-19 13:57 ` [Outreachy kernel] " Julia Lawall @ 2016-03-19 14:26 ` sandhya bankar 2016-03-19 14:54 ` Amitoj Kaur Chawla 0 siblings, 1 reply; 8+ messages in thread From: sandhya bankar @ 2016-03-19 14:26 UTC (permalink / raw) To: Julia Lawall, outreachy-kernel [-- Attachment #1: Type: text/plain, Size: 3359 bytes --] Hello, I have run the following cocci scripts, ############################################ // // Remove exceptional & on function name // // Target: Linux // Copyright: 2012 - LIP6/INRIA // License: Licensed under ISC. See LICENSE or http://www.isc.org/software/license // Author: Julia Lawall <Julia.Lawall@lip6.fr> // URL: http://coccinelle.lip6.fr/ // URL: http://coccinellery.org/ @script:python@ @@ with_and = 0 without_and = 0 @r@ identifier f; @@ f(...) { ... } @addr1@ identifier r.f; position pa; @@ &f@pa @script:python@ p << addr1.pa; @@ with_and = with_and + 1 @r1@ identifier r.f; position p; declarer name EXPORT_SYMBOL; @@ ( EXPORT_SYMBOL(f@p); | module_init(f@p); | module_exit(f@p); | f@p(...) ) @noaddr1@ identifier r.f; position pn != r1.p; @@ ( &f | f@pn ) @script:python@ p << noaddr1.pn; @@ without_and = without_and + 1 @script:python@ @@ choose_without_and = False #if (with_and * 25 < without_and): # choose_without_and = True if (with_and == 1 and without_and > 9): choose_without_and = True choose_with_and = False #if (without_and * 25 < with_and): # choose_with_and = True if (without_and == 1 and with_and > 9): choose_with_and = True @script:python@ p << addr1.pa; f << r.f; @@ if (choose_with_and or not choose_without_and): cocci.include_match(False) @script:python@ p << noaddr1.pn; f << r.f; @@ if (choose_without_and or not choose_with_and): cocci.include_match(False) @@ identifier f; position addr1.pa; position noaddr1.pn; @@ ( - &f@pa + f | - f@pn + &f ) ############################################################################################# The cocci file reported above change only. should i remove in other case also as these are function names? On Sat, Mar 19, 2016 at 7:27 PM, Julia Lawall <julia.lawall@lip6.fr> wrote: > On Sat, 19 Mar 2016, Sandhya Bankar wrote: > > > Remove & from function name. > > > > Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> > > --- > > drivers/staging/rdma/hfi1/verbs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/staging/rdma/hfi1/verbs.c > b/drivers/staging/rdma/hfi1/verbs.c > > index 1761686..ece62b7 100644 > > --- a/drivers/staging/rdma/hfi1/verbs.c > > +++ b/drivers/staging/rdma/hfi1/verbs.c > > @@ -261,7 +261,7 @@ static const opcode_handler opcode_handler_tbl[256] > = { > > [IB_OPCODE_UD_SEND_ONLY] = &hfi1_ud_rcv, > > [IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE] = &hfi1_ud_rcv, > > /* CNP */ > > - [IB_OPCODE_CNP] = &hfi1_cnp_rcv > > + [IB_OPCODE_CNP] = hfi1_cnp_rcv > > Why not make the change in the other cases? > > julia > > > }; > > > > /* > > -- > > 1.8.3.4 > > > > -- > > You received this message because you are subscribed to the Google > Groups "outreachy-kernel" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to outreachy-kernel+unsubscribe@googlegroups.com. > > To post to this group, send email to outreachy-kernel@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/outreachy-kernel/6a66bd13896f6f5e6ff2873e697fbc72af8c8185.1458367377.git.bankarsandhya512%40gmail.com > . > > For more options, visit https://groups.google.com/d/optout. > > > [-- Attachment #2: Type: text/html, Size: 5299 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] Staging: rdma: Remove & from function name. 2016-03-19 14:26 ` sandhya bankar @ 2016-03-19 14:54 ` Amitoj Kaur Chawla 2016-03-20 15:55 ` sandhya bankar 0 siblings, 1 reply; 8+ messages in thread From: Amitoj Kaur Chawla @ 2016-03-19 14:54 UTC (permalink / raw) To: bankarsandhya512; +Cc: Julia Lawall, outreachy-kernel On Sat, Mar 19, 2016 at 7:56 PM, sandhya bankar <bankarsandhya512@gmail.com> wrote: > Hello, > I have run the following cocci scripts, > > ############################################ > // > // Remove exceptional & on function name > // > // Target: Linux > // Copyright: 2012 - LIP6/INRIA > // License: Licensed under ISC. See LICENSE or > http://www.isc.org/software/license > // Author: Julia Lawall <Julia.Lawall@lip6.fr> > // URL: http://coccinelle.lip6.fr/ > // URL: http://coccinellery.org/ > > @script:python@ > @@ > > with_and = 0 > without_and = 0 > > @r@ > identifier f; > @@ > > f(...) { ... } > > @addr1@ > identifier r.f; > position pa; > @@ > > &f@pa > > @script:python@ > p << addr1.pa; > @@ > > with_and = with_and + 1 > > @r1@ > identifier r.f; > position p; > declarer name EXPORT_SYMBOL; > @@ > > ( > EXPORT_SYMBOL(f@p); > | > module_init(f@p); > | > module_exit(f@p); > | > f@p(...) > ) > > @noaddr1@ > identifier r.f; > position pn != r1.p; > @@ > > ( > &f > | > f@pn > ) > > @script:python@ > p << noaddr1.pn; > @@ > > without_and = without_and + 1 > > @script:python@ > @@ > > choose_without_and = False > #if (with_and * 25 < without_and): > # choose_without_and = True > if (with_and == 1 and without_and > 9): > choose_without_and = True > > choose_with_and = False > #if (without_and * 25 < with_and): > # choose_with_and = True > if (without_and == 1 and with_and > 9): > choose_with_and = True > > @script:python@ > p << addr1.pa; > f << r.f; > @@ > > if (choose_with_and or not choose_without_and): > cocci.include_match(False) > > @script:python@ > p << noaddr1.pn; > f << r.f; > @@ > > if (choose_without_and or not choose_with_and): > cocci.include_match(False) > > @@ > identifier f; > position addr1.pa; > position noaddr1.pn; > @@ > > ( > - &f@pa > + f > | > - f@pn > + &f > ) > ############################################################################################# > > The cocci file reported above change only. should i remove in other case > also as these are function names? > Try running this with --recursive-includes option added in your spatch command: // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f @m@ type T; identifier f; @@ T f(...); @@ identifier m.f; @@ - &f + f // </smpl> Also, maybe try it only for staging/rdma at first since --recursive-includes may take quite some time. I ran into the same issue and with Julia's help, this was the solution I found. Hope it works for you. Amitoj ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] Staging: rdma: Remove & from function name. 2016-03-19 14:54 ` Amitoj Kaur Chawla @ 2016-03-20 15:55 ` sandhya bankar 2016-03-20 16:03 ` Julia Lawall 0 siblings, 1 reply; 8+ messages in thread From: sandhya bankar @ 2016-03-20 15:55 UTC (permalink / raw) To: Amitoj Kaur Chawla, Julia Lawall, outreachy-kernel [-- Attachment #1: Type: text/plain, Size: 3159 bytes --] Thanks for the suggestion Amitoj. I have run spatch with suggested option but i have not got any output since 15-16 hours. Is it expected ? Julia, Should i change all & from function name? however the cocci file have not detected these. Thanks, Sandhya On Sat, Mar 19, 2016 at 8:24 PM, Amitoj Kaur Chawla <amitoj1606@gmail.com> wrote: > On Sat, Mar 19, 2016 at 7:56 PM, sandhya bankar > <bankarsandhya512@gmail.com> wrote: > > Hello, > > I have run the following cocci scripts, > > > > ############################################ > > // > > // Remove exceptional & on function name > > // > > // Target: Linux > > // Copyright: 2012 - LIP6/INRIA > > // License: Licensed under ISC. See LICENSE or > > http://www.isc.org/software/license > > // Author: Julia Lawall <Julia.Lawall@lip6.fr> > > // URL: http://coccinelle.lip6.fr/ > > // URL: http://coccinellery.org/ > > > > @script:python@ > > @@ > > > > with_and = 0 > > without_and = 0 > > > > @r@ > > identifier f; > > @@ > > > > f(...) { ... } > > > > @addr1@ > > identifier r.f; > > position pa; > > @@ > > > > &f@pa > > > > @script:python@ > > p << addr1.pa; > > @@ > > > > with_and = with_and + 1 > > > > @r1@ > > identifier r.f; > > position p; > > declarer name EXPORT_SYMBOL; > > @@ > > > > ( > > EXPORT_SYMBOL(f@p); > > | > > module_init(f@p); > > | > > module_exit(f@p); > > | > > f@p(...) > > ) > > > > @noaddr1@ > > identifier r.f; > > position pn != r1.p; > > @@ > > > > ( > > &f > > | > > f@pn > > ) > > > > @script:python@ > > p << noaddr1.pn; > > @@ > > > > without_and = without_and + 1 > > > > @script:python@ > > @@ > > > > choose_without_and = False > > #if (with_and * 25 < without_and): > > # choose_without_and = True > > if (with_and == 1 and without_and > 9): > > choose_without_and = True > > > > choose_with_and = False > > #if (without_and * 25 < with_and): > > # choose_with_and = True > > if (without_and == 1 and with_and > 9): > > choose_with_and = True > > > > @script:python@ > > p << addr1.pa; > > f << r.f; > > @@ > > > > if (choose_with_and or not choose_without_and): > > cocci.include_match(False) > > > > @script:python@ > > p << noaddr1.pn; > > f << r.f; > > @@ > > > > if (choose_without_and or not choose_with_and): > > cocci.include_match(False) > > > > @@ > > identifier f; > > position addr1.pa; > > position noaddr1.pn; > > @@ > > > > ( > > - &f@pa > > + f > > | > > - f@pn > > + &f > > ) > > > ############################################################################################# > > > > The cocci file reported above change only. should i remove in other case > > also as these are function names? > > > Try running this with --recursive-includes option added in your spatch > command: > > // <smpl> > @r@ > identifier f; > @@ > f(...) { ... } > @@ > identifier r.f; > @@ > - &f > + f > > @m@ > type T; > identifier f; > @@ > T f(...); > @@ > identifier m.f; > @@ > - &f > + f > // </smpl> > > Also, maybe try it only for staging/rdma at first since > --recursive-includes may take quite some time. > > I ran into the same issue and with Julia's help, this was the solution > I found. Hope it works for you. > > > Amitoj > [-- Attachment #2: Type: text/html, Size: 5361 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] Staging: rdma: Remove & from function name. 2016-03-20 15:55 ` sandhya bankar @ 2016-03-20 16:03 ` Julia Lawall 0 siblings, 0 replies; 8+ messages in thread From: Julia Lawall @ 2016-03-20 16:03 UTC (permalink / raw) To: sandhya bankar; +Cc: Amitoj Kaur Chawla, outreachy-kernel [-- Attachment #1: Type: TEXT/PLAIN, Size: 4855 bytes --] On Sun, 20 Mar 2016, sandhya bankar wrote: > Thanks for the suggestion Amitoj. > I have run spatch with suggested option but i have not got any output since > 15-16 hours. > Is it expected ? > > Julia, > Should i change all & from function name? however the cocci file have not > detected these. As Amitoj mentioned, it is because the others are not local functions. Did you use the argument --include-headers-for-types? You can also just looks at the names nearby and check by hand whether they are functions. Just say in your commit message which parts you did by hand. julia > > > > Thanks, > Sandhya > > On Sat, Mar 19, 2016 at 8:24 PM, Amitoj Kaur Chawla <amitoj1606@gmail.com> > wrote: > On Sat, Mar 19, 2016 at 7:56 PM, sandhya bankar > <bankarsandhya512@gmail.com> wrote: > > Hello, > > I have run the following cocci scripts, > > > > ############################################ > > // > > // Remove exceptional & on function name > > // > > // Target: Linux > > // Copyright: 2012 - LIP6/INRIA > > // License: Licensed under ISC. See LICENSE or > > http://www.isc.org/software/license > > // Author: Julia Lawall <Julia.Lawall@lip6.fr> > > // URL: http://coccinelle.lip6.fr/ > > // URL: http://coccinellery.org/ > > > > @script:python@ > > @@ > > > > with_and = 0 > > without_and = 0 > > > > @r@ > > identifier f; > > @@ > > > > f(...) { ... } > > > > @addr1@ > > identifier r.f; > > position pa; > > @@ > > > > &f@pa > > > > @script:python@ > > p << addr1.pa; > > @@ > > > > with_and = with_and + 1 > > > > @r1@ > > identifier r.f; > > position p; > > declarer name EXPORT_SYMBOL; > > @@ > > > > ( > > EXPORT_SYMBOL(f@p); > > | > > module_init(f@p); > > | > > module_exit(f@p); > > | > > f@p(...) > > ) > > > > @noaddr1@ > > identifier r.f; > > position pn != r1.p; > > @@ > > > > ( > > &f > > | > > f@pn > > ) > > > > @script:python@ > > p << noaddr1.pn; > > @@ > > > > without_and = without_and + 1 > > > > @script:python@ > > @@ > > > > choose_without_and = False > > #if (with_and * 25 < without_and): > > # choose_without_and = True > > if (with_and == 1 and without_and > 9): > > choose_without_and = True > > > > choose_with_and = False > > #if (without_and * 25 < with_and): > > # choose_with_and = True > > if (without_and == 1 and with_and > 9): > > choose_with_and = True > > > > @script:python@ > > p << addr1.pa; > > f << r.f; > > @@ > > > > if (choose_with_and or not choose_without_and): > > cocci.include_match(False) > > > > @script:python@ > > p << noaddr1.pn; > > f << r.f; > > @@ > > > > if (choose_without_and or not choose_with_and): > > cocci.include_match(False) > > > > @@ > > identifier f; > > position addr1.pa; > > position noaddr1.pn; > > @@ > > > > ( > > - &f@pa > > + f > > | > > - f@pn > > + &f > > ) > >########################################################################### > ################## > > > > The cocci file reported above change only. should i remove in > other case > > also as these are function names? > > > Try running this with --recursive-includes option added in your spatch > command: > > // <smpl> > @r@ > identifier f; > @@ > f(...) { ... } > @@ > identifier r.f; > @@ > - &f > + f > > @m@ > type T; > identifier f; > @@ > T f(...); > @@ > identifier m.f; > @@ > - &f > + f > // </smpl> > > Also, maybe try it only for staging/rdma at first since > --recursive-includes may take quite some time. > > I ran into the same issue and with Julia's help, this was the solution > I found. Hope it works for you. > > > Amitoj > > > -- > You received this message because you are subscribed to the Google Groups > "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CAA3ASz%3DqorUDcX0%3DT%2 > B3X4j22_rO3Snax%3Db90qxVi32j786vAbQ%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. > > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-03-20 16:03 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-19 6:12 [PATCH 0/2] Staging: Remove & from function name Sandhya Bankar 2016-03-19 6:14 ` [PATCH 1/2] Staging: netlogic: " Sandhya Bankar 2016-03-19 6:17 ` [PATCH 2/2] Staging: rdma: " Sandhya Bankar 2016-03-19 13:57 ` [Outreachy kernel] " Julia Lawall 2016-03-19 14:26 ` sandhya bankar 2016-03-19 14:54 ` Amitoj Kaur Chawla 2016-03-20 15:55 ` sandhya bankar 2016-03-20 16:03 ` 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.