All of lore.kernel.org
 help / color / mirror / Atom feed
From: Varsha Rao <rvarsha016@gmail.com>
To: outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: Problem with coccinelle.
Date: Tue, 28 Feb 2017 05:53:35 -0800 (PST)	[thread overview]
Message-ID: <465dc1ff-b520-4ad1-862f-0fa268803f06@googlegroups.com> (raw)
In-Reply-To: <97a8b35a-3899-436b-8455-6fdd5d3a6ccd@googlegroups.com>


[-- Attachment #1.1: Type: text/plain, Size: 1633 bytes --]

 Hello,

  I tried spatch command again with few other files and it ran 
successfully. (with the same ret.cocci file I sent)

  spatch --sp-file ret.cocci --no-includes 
~/git/kernels/staging/drivers/staging/sm750fb/ddk750_chip.c > ret.out
  init_defs_builtins: /usr/lib64/coccinelle/standard.h
  HANDLING: 
/home/euri/git/kernels/staging/drivers/staging/sm750fb/ddk750_chip.c
  diff = 

   output of ret.out

   --- 
/home/varsha/git/kernels/staging/drivers/staging/sm750fb/ddk750_chip.c
+++ /tmp/cocci-output-3058-919028-ddk750_chip.c
@@ -397,13 +397,11 @@ unsigned int sm750_format_pll_reg(struct
      * register. On returning a 32 bit number, the value can be
      * applied to any PLL in the calling function.
      */
-    reg = PLL_CTRL_POWER |
+    return PLL_CTRL_POWER |
 #ifndef VALIDATION_CHIP
         ((POD << PLL_CTRL_POD_SHIFT) & PLL_CTRL_POD_MASK) |
 #endif
         ((OD << PLL_CTRL_OD_SHIFT) & PLL_CTRL_OD_MASK) |
         ((N << PLL_CTRL_N_SHIFT) & PLL_CTRL_N_MASK) |
         ((M << PLL_CTRL_M_SHIFT) & PLL_CTRL_M_MASK);
-
-    return reg;
 }

   
   But nothing with dim2_sysfs.c file and even ret.out file is empty. But 
no errors this time.

  spatch --sp-file ret.cocci --no-includes 
~/git/kernels/staging/drivers/staging/most/hdm-dim2/dim2_sysfs.c  > ret.out
  init_defs_builtins: /usr/lib64/coccinelle/standard.h
  HANDLING: 
/home/euri/git/kernels/staging/drivers/staging/most/hdm-dim2/dim2_sysfs.c
   
  Does coccinelle need driver to be compiled as a module? As hdm_dim2 
driver is not but sm750fb driver is compiled as a module. Does coccinelle 
require executable file to work?

  Thanks,
  Varsha

[-- Attachment #1.2: Type: text/html, Size: 1890 bytes --]

  parent reply	other threads:[~2017-02-28 13:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28  2:43 Problem with coccinelle Varsha Rao
2017-02-28  2:50 ` Varsha Rao
2017-02-28  6:48   ` [Outreachy kernel] " Julia Lawall
2017-02-28 10:38     ` Varsha Rao
2017-02-28 12:28       ` Vaishali Thakkar
2017-02-28 13:14         ` Julia Lawall
2017-02-28 13:37         ` Varsha Rao
2017-02-28  6:51 ` [Outreachy kernel] " Julia Lawall
2017-02-28 10:41   ` Varsha Rao
2017-02-28 13:53 ` Varsha Rao [this message]
2017-02-28 13:56   ` [Outreachy kernel] " Julia Lawall
2017-02-28 14:17     ` Varsha Rao
2017-02-28 14:38       ` Varsha Rao
2017-02-28 14:40         ` Julia Lawall
2017-02-28 14:39       ` Julia Lawall
2017-02-28 13:59   ` Vaishali Thakkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=465dc1ff-b520-4ad1-862f-0fa268803f06@googlegroups.com \
    --to=rvarsha016@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.