1. 15 Jun, 2018 1 commit
  2. 11 Feb, 2018 1 commit
    • Linus Torvalds's avatar
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds authored
      
      
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      
      Scripted-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  3. 04 Jan, 2018 1 commit
  4. 27 Nov, 2017 1 commit
  5. 31 Oct, 2017 1 commit
  6. 23 Sep, 2017 1 commit
    • Hans Verkuil's avatar
      media: fix media Kconfig help syntax issues · 561b29e4
      Hans Verkuil authored
      
      
      The help text should be indented by at least two spaces after the
      'help' separator. This is both good practice and the media_build system
      for building media drivers makes this assumption.
      
      I went through all Kconfigs under drivers/media and fixed any bad help
      sections. This makes it conform to the common practice and should fix
      problems with 'make menuconfig' when using media_build. This is due to
      a "WARNING" message that media_build can insert in the Kconfig and that
      assumes the help text is indented by at least two spaces. If not, then the
      Kconfig becomes invalid and 'make menuconfig' fails.
      
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Reported-by: default avatarThomas Kaiser <linux-dvb@kaiser-linux.li>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      561b29e4
  7. 27 Aug, 2017 1 commit
  8. 16 Jun, 2017 2 commits
    • Johannes Berg's avatar
      networking: make skb_put & friends return void pointers · 4df864c1
      Johannes Berg authored
      
      
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions (skb_put, __skb_put and pskb_put) return void *
      and remove all the casts across the tree, adding a (u8 *) cast only
      where the unsigned char pointer was used directly, all done with the
      following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_put, __skb_put };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_put, __skb_put };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
      which actually doesn't cover pskb_put since there are only three
      users overall.
      
      A handful of stragglers were converted manually, notably a macro in
      drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
      instances in net/bluetooth/hci_sock.c. In the former file, I also
      had to fix one whitespace problem spatch introduced.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4df864c1
    • Johannes Berg's avatar
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg authored
      
      
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      
      Reviewed-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59ae1d12
  9. 10 Apr, 2017 1 commit
  10. 27 Jan, 2017 1 commit
    • Sakari Ailus's avatar
      [media] media: Drop FSF's postal address from the source code files · bcb63314
      Sakari Ailus authored
      
      
      Drop the FSF's postal address from the source code files that typically
      contain mostly the license text. Of the 628 removed instances, 578 are
      outdated.
      
      The patch has been created with the following command without manual edits:
      
      git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \
      	drivers/media/ include/media|while read i; do i=$i perl -e '
      open(F,"< $ENV{i}");
      $a=join("", <F>);
      $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m
      	&& $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m;
      close(F);
      open(F, "> $ENV{i}");
      print F $a;
      close(F);'; done
      
      Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      bcb63314
  11. 18 Nov, 2016 1 commit
  12. 21 Oct, 2016 1 commit
    • Mauro Carvalho Chehab's avatar
      [media] wl128x: don't break long lines · e84541f0
      Mauro Carvalho Chehab authored
      
      
      Due to the 80-cols restrictions, and latter due to checkpatch
      warnings, several strings were broken into multiple lines. This
      is not considered a good practice anymore, as it makes harder
      to grep for strings at the source code.
      
      As we're right now fixing other drivers due to KERN_CONT, we need
      to be able to identify what printk strings don't end with a "\n".
      It is a way easier to detect those if we don't break long lines.
      
      So, join those continuation lines.
      
      The patch was generated via the script below, and manually
      adjusted if needed.
      
      </script>
      use Text::Tabs;
      while (<>) {
      	if ($next ne "") {
      		$c=$_;
      		if ($c =~ /^\s+\"(.*)/) {
      			$c2=$1;
      			$next =~ s/\"\n$//;
      			$n = expand($next);
      			$funpos = index($n, '(');
      			$pos = index($c2, '",');
      			if ($funpos && $pos > 0) {
      				$s1 = substr $c2, 0, $pos + 2;
      				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
      				$s2 =~ s/^\s+//;
      
      				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
      
      				print unexpand("$next$s1\n");
      				print unexpand("$s2\n") if ($s2 ne "");
      			} else {
      				print "$next$c2\n";
      			}
      			$next="";
      			next;
      		} else {
      			print $next;
      		}
      		$next="";
      	} else {
      		if (m/\"$/) {
      			if (!m/\\n\"$/) {
      				$next=$_;
      				next;
      			}
      		}
      	}
      	print $_;
      }
      </script>
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      e84541f0
  13. 17 Jul, 2016 1 commit
  14. 01 Feb, 2016 1 commit
  15. 06 Jul, 2015 1 commit
  16. 30 May, 2015 1 commit
  17. 30 Apr, 2015 1 commit
  18. 03 Apr, 2015 1 commit
  19. 02 Apr, 2015 1 commit
  20. 27 Jan, 2015 1 commit
  21. 02 Dec, 2014 1 commit
  22. 24 Oct, 2014 1 commit
  23. 03 Sep, 2014 1 commit
    • Hans Verkuil's avatar
      [media] wl128x: fix sparse warnings · 2a8b7e58
      Hans Verkuil authored
      
      
      drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:443:41: warning: incorrect type in assignment (different base types)
      drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16
      drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16
      
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
      2a8b7e58
  24. 15 Oct, 2013 1 commit
  25. 28 Jun, 2013 1 commit
  26. 21 May, 2013 1 commit
  27. 24 Mar, 2013 2 commits
  28. 24 Jan, 2013 1 commit
    • Hans Verkuil's avatar
      [media] radio: set vfl_dir correctly to fix modulator regression · ce4a3d52
      Hans Verkuil authored
      
      
      The vfl_dir field should be set to indicate whether a device can receive
      data, output data or can do both. This is used to let the v4l core know
      which ioctls should be accepted and which can be refused.
      Unfortunately, when this field was added the radio modulator drivers were
      not updated: radio modulators transmit and so vfl_dir should be set to
      VFL_DIR_TX (or VFL_DIR_M2M in the special case of wl128x).
      Because of this omission it is not possible to call g/s_modulator for these
      drivers, which effectively renders them useless.
      This patch sets the correct vfl_dir value for these drivers, correcting
      this bug.
      Thanks to Paul Grinberg for bringing this to my attention.
      
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
      ce4a3d52
  29. 19 Jan, 2013 1 commit
    • Joe Millenbach's avatar
      tty: Added a CONFIG_TTY option to allow removal of TTY · 4f73bc4d
      Joe Millenbach authored
      
      
      The option allows you to remove TTY and compile without errors. This
      saves space on systems that won't support TTY interfaces anyway.
      bloat-o-meter output is below.
      
      The bulk of this patch consists of Kconfig changes adding "depends on
      TTY" to various serial devices and similar drivers that require the TTY
      layer.  Ideally, these dependencies would occur on a common intermediate
      symbol such as SERIO, but most drivers "select SERIO" rather than
      "depends on SERIO", and "select" does not respect dependencies.
      
      bloat-o-meter output comparing our previous minimal to new minimal by
      removing TTY.  The list is filtered to not show removed entries with awk
      '$3 != "-"' as the list was very long.
      
      add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350)
      function                                     old     new   delta
      chr_dev_init                                 166     170      +4
      allow_signal                                  80      82      +2
      static.__warned                              143     142      -1
      disallow_signal                               63      62      -1
      __set_special_pids                            95      94      -1
      unregister_console                           126     121      -5
      start_kernel                                 546     541      -5
      register_console                             593     588      -5
      copy_from_user                                45      40      -5
      sys_setsid                                   128     120      -8
      sys_vhangup                                   32      19     -13
      do_exit                                     1543    1526     -17
      bitmap_zero                                   60      40     -20
      arch_local_irq_save                          137     117     -20
      release_task                                 674     652     -22
      static.spin_unlock_irqrestore                308     260     -48
      
      Signed-off-by: default avatarJoe Millenbach <jmillenbach@gmail.com>
      Reviewed-by: default avatarJamey Sharp <jamey@minilop.net>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4f73bc4d
  30. 27 Dec, 2012 1 commit
  31. 28 Oct, 2012 2 commits
  32. 26 Sep, 2012 4 commits
  33. 09 Aug, 2012 1 commit
  34. 18 Jun, 2012 1 commit