1. 07 Mar, 2015 21 commits
  2. 06 Mar, 2015 19 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
    • Haneen Mohammed's avatar
      Staging: comedi: Clean dev_err() logging · cd25503f
      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, so there is no need for  __func__.
      This was done using Coccinelle, with the following semantic patch:
      
      @A@
      expression E;
      expression  msg;
      @@
      
      dev_err(E, msg, __func__);
      
      @script:python b@
      e << a.msg;
      y;
      @@
      
      if(e.find("%s: ") == True):
      	m = e.replace("%s: ", "");
      	coccinelle.y = m;
      elif(e.find("%s ") == True):
      	m = e.replace("%s ", "");
      	coccinelle.y = m;
      else:
      	m = e.replace("%s", "");
      
      @c@
      expression a.E, a.msg;
      identifier  b.y;
      @@
      
      - dev_err(E, msg, __func__);
      + dev_err(E, y);
      Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cd25503f
    • Ksenija Stanojevic's avatar
      Staging: rtl8192u: Replace TRUE with true · 6d67b3a2
      Ksenija Stanojevic authored
      This patch replaces TRUE by true, since Linux kernel has already a
      boolean type, bool, defined in linux/stddef.h
      Signed-off-by: default avatarKsenija Stanojevic <ksenija.stanojevic@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6d67b3a2
    • Yeliz Taneroglu's avatar
      Staging: rtl8723au: Fixed error 'else should follow close brace '}". · 67d095a0
      Yeliz Taneroglu authored
      This patch fixes error 'else should follow close brace '}"
      found by checkpatch in driver rtl8723au.
      Signed-off-by: default avatarYeliz Taneroglu <yeliztaneroglu@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67d095a0
    • Yeliz Taneroglu's avatar
      Staging: unisys: Remove unnecessary semicolon · 708bca5d
      Yeliz Taneroglu authored
      This fixes the checkpatch.pl warning:
      WARNING: macros should not use a trailing semicolon.
      Signed-off-by: default avatarYeliz Taneroglu <yeliztaneroglu@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      708bca5d
    • Cristina Opriceana's avatar
      Staging: drivers: Bool initializations should use true/false · 19cd2297
      Cristina Opriceana authored
      This patch replaces bool initializations of 1/0 with true/false in order
      to increase readability and respect the standards. Warning found by
      coccinelle.
      Signed-off-by: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      19cd2297
    • Navya Sri Nizamkari's avatar
      staging: rtl8192e: Remove if conditions. · a568dc1f
      Navya Sri Nizamkari authored
      This patch removes if conditions with no exececutable
      statements in the bodies of those ifs and also no variable
      assignments in the if conditional checks. The call to
      rtllib_act_scanning in the condition doesn't have any side
      effects as it too performs conditional checks without changing
      any values. Hence, it's safe to remove the if condition.
      Signed-off-by: default avatarNavya Sri Nizamkari <navyasri.tech@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a568dc1f
    • Somya Anand's avatar
      Staging: rtl8188eu: Remove unnecessary return statements · 3bd52fb1
      Somya Anand authored
      This patch removes unnecessary return statement from a void
      function.
      
      This issue is identified by checkpatch.pl
      Signed-off-by: default avatarSomya Anand <somyaanand214@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3bd52fb1
    • Somya Anand's avatar
      Staging: rtl8188eu: Remove redundant local variable · aea42ee4
      Somya Anand authored
      This patch removes a redundant variable "raid" and adds inline
      return statements.
      
      This issue is identified by the following coccinelle script:
      @@
      expression ret;
      identifier f;
      @@
      
      -ret =
      +return
           f(...);
      -return ret;
      Signed-off-by: default avatarSomya Anand <somyaanand214@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aea42ee4
    • Aya Mahfouz's avatar
      staging: rtl8712: replace memset(x,0,ETH_ALEN) · 22905b85
      Aya Mahfouz authored
      eth_zero_addr() is a wrapper function for memset if 0 is going to
      be assigned to a mac address. The aforementioned function replaces
      memset. In addition, linux/etherdevice.h was included as a header
      since it is the file that defines the inline function eth_zero_addr().
      The changes were carried out using the following coccinelle script:
      
      @header@
      @@
      
      #include <linux/etherdevice.h>
      
      @eth_zero_addr@
      expression e;
      @@
      
      -memset(e,0,ETH_ALEN);
      +eth_zero_addr(e);
      
      @eth_broadcast_addr@
      identifier e;
      @@
      
      -memset(e,\(0xff\|0xFF\|255\),ETH_ALEN);
      +eth_broadcast_addr(e);
      
      @linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @
      @@
      
      + #include <linux/etherdevice.h>
      +
      
      @special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @
      @@
      
      +
      + #include <linux/etherdevice.h>
      +
      
      @custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @
      @@
      
      +
      + #include <linux/etherdevice.h>
      Signed-off-by: default avatarAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      22905b85
    • Aya Mahfouz's avatar
      staging: rtl8188eu: replace memset(x,0,ETH_ALEN) · 8e5d9433
      Aya Mahfouz authored
      eth_zero_addr() is a wrapper function for memset if 0 is going to
      be assigned to a mac address. The aforementioned function replaces
      memset. In addition, linux/etherdevice.h was included as a header
      since it is the file that define the inline function eth_zero_addr().
      The changes were carried out using the following coccinelle script:
      
      @header@
      @@
      
      #include <linux/etherdevice.h>
      
      @eth_zero_addr@
      expression e;
      @@
      
      -memset(e,0,ETH_ALEN);
      +eth_zero_addr(e);
      
      @eth_broadcast_addr@
      identifier e;
      @@
      
      -memset(e,\(0xff\|0xFF\|255\),ETH_ALEN);
      +eth_broadcast_addr(e);
      
      @linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @
      @@
      
      + #include <linux/etherdevice.h>
      +
      
      @special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @
      @@
      
      +
      + #include <linux/etherdevice.h>
      +
      
      @custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @
      @@
      
      +
      + #include <linux/etherdevice.h>
      Signed-off-by: default avatarAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8e5d9433