1. 07 Mar, 2015 31 commits
  2. 06 Mar, 2015 9 commits
    • Haneen Mohammed's avatar
      Staging: ste_rmi4: clean dev_err logging · 62af7214
      Haneen Mohammed authored
      This patch removes  __func__ from dev_err. dev_err includes information about:
      (devcice, driver, specific instance of device, etc) in the log printout.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E, R;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__, R);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s:") == True):
      	m = e.replace("%s:", "", 1);
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "",1);
      	coccinelle.y = m;
      
      @c@
      expression a.E, a.msg, a.R;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__, R);
      + dev_err(E, y, R);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      62af7214
    • Haneen Mohammed's avatar
      Staging: slicoss: clean dev_err logging · eb856202
      Haneen Mohammed authored
      This patch removes  __func__ from dev_err. dev_err includes information about:
      (devcice, driver, specific instance of device, etc) in the log printout.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E, R;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__, R);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s:") == True):
      	m = e.replace("%s:", "", 1);
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "",1);
      	coccinelle.y = m;
      
      @c@
      expression a.E, a.msg, a.R;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__, R);
      + dev_err(E, y, R);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      eb856202
    • Haneen Mohammed's avatar
      Staging: iio: clean dev_err logging · 3daf9df3
      Haneen Mohammed authored
      This patch removes  __func__ from dev_err. dev_err includes information about:
      (devcice, driver, specific instance of device, etc) in the log printout.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E, R;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__, R);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s:") == True):
      	m = e.replace("%s:", "", 1);
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "",1);
      	coccinelle.y = m;
      
      @c@
      expression a.E, a.msg, a.R;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__, R);
      + dev_err(E, y, R);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3daf9df3
    • Haneen Mohammed's avatar
      Staging: rts5208: clean dev_err logging · 651cd163
      Haneen Mohammed authored
      This patch removes  __func__ from dev_err. dev_err includes information about:
      (devcice, driver, specific instance of device, etc) in the log printout.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E, R;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__, R);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s:") == True):
      	m = e.replace("%s:", "", 1);
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "",1);
      	coccinelle.y = m;
      
      @c@
      expression a.E, a.msg, a.R;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__, R);
      + dev_err(E, y, R);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      651cd163
    • Haneen Mohammed's avatar
      Staging: comedi: clean dev_err logging · ce82410c
      Haneen Mohammed authored
      This patch removes  __func__ from dev_err. dev_err includes information about:
      (devcice, driver, specific instance of device, etc) in the log printout.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E, R;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__, R);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s:") == True):
      	m = e.replace("%s:", "", 1);
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "",1);
      	coccinelle.y = m;
      
      @c@
      expression a.E, a.msg, a.R;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__, R);
      + dev_err(E, y, R);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ce82410c
    • Haneen Mohammed's avatar
      Staging: gdm72xx: clean dev_err logging · 99beca13
      Haneen Mohammed authored
      This patch removes  __func__ from dev_err. dev_err includes information about:
      (devcice, driver, specific instance of device, etc) in the log printout.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E, R;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__, R);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s:") == True):
      	m = e.replace("%s:", "", 1);
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "",1);
      	coccinelle.y = m;
      
      @c@
      expression a.E, a.msg, a.R;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__, R);
      + dev_err(E, y, R);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      99beca13
    • Haneen Mohammed's avatar
      Staging: media: clean dev_err logging · 8c6ccbeb
      Haneen Mohammed authored
      This patch removes  __func__ from dev_err. dev_err includes information about:
      (devcice, driver, specific instance of device, etc) in the log printout.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E, R;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__, R);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s:") == True):
      	m = e.replace("%s:", "", 1);
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "",1);
      	coccinelle.y = m;
      
      @c@
      expression a.E, a.msg, a.R;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__, R);
      + dev_err(E, y, R);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8c6ccbeb
    • Haneen Mohammed's avatar
      Staging: fbtft: clean dev_err() logging · aed1c72e
      Haneen Mohammed authored
      This patch removes  __func__ from dev_err. dev_err includes information about:
      (devcice, driver, specific instance of device, etc) in the log printout.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E, R;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__, R);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "", 1);
      	coccinelle.y = m;
      elif(e.find("%s:") == True):
      	m = e.replace("%s:", "", 1);
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "",1);
      	coccinelle.y = m;
      
      @c@
      expression a.E, a.msg, a.R;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__, R);
      + dev_err(E, y, R);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aed1c72e
    • Haneen Mohammed's avatar
      Staging: media: Replace dev_err with pr_err to avoid null pointer derefrence · 14f63eee
      Haneen Mohammed authored
      This patch replace dev_err with pr_err, for pointer is derefrenced after comparing it to NULL.
      This was found using the following coccinelle script:
      
      @disable is_null@
      identifier f;
      expression E;
      identifier fld;
      statement S;
      @@
      
      + if(E == NULL) S
      	f(...,E->fld,...);
      -if(E == NULL) S;
      
      @@
      identifier f;
      expression E;
      identifier fld;
      statement S;
      @@
      
      + if(!E) S
      	f(...,E->fld,...);
      -if(!E) S;
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      14f63eee