Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1510194

Re: [RFC v1 05/14] bus1: util - pool utility library

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC v1 05/14] bus1: util - pool utility library
Date 2016-10-27 16:00 +0200
Message-ID <swTnS-2Bn-131@gated-at.bofh.it> (permalink)
References <swC3D-87o-1@gated-at.bofh.it> <swC3D-87o-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 26, 2016 at 09:18:01PM +0200, David Herrmann wrote:
> +static struct bus1_pool_slice *
> +bus1_pool_slice_free(struct bus1_pool_slice *slice)
> +{
> +	if (!slice)
> +		return NULL;
> +
> +	kfree(slice);
> +
> +	return NULL;
> +}

The return value is never used. Which reduces the entire thing to:

	kfree(slice);

since kfree() already accepts a NULL.

> +		bus1_pool_slice_free(slice);
> +			bus1_pool_slice_free(slice);
> +			bus1_pool_slice_free(ps);

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC v1 00/14] Bus1 Kernel Message Bus David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
  [RFC v1 02/14] bus1: provide stub cdev /dev/bus1 David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
    Re: [RFC v1 02/14] bus1: provide stub cdev /dev/bus1 Andy Lutomirski <luto@amacapital.net> - 2016-10-27 01:30 +0200
      Re: [RFC v1 02/14] bus1: provide stub cdev /dev/bus1 Tom Gundersen <teg@jklm.no> - 2016-10-27 02:00 +0200
        Re: [RFC v1 02/14] bus1: provide stub cdev /dev/bus1 Arnd Bergmann <arnd@arndb.de> - 2016-10-27 11:20 +0200
          Re: [RFC v1 02/14] bus1: provide stub cdev /dev/bus1 Tom Gundersen <teg@jklm.no> - 2016-10-27 17:30 +0200
            Re: [RFC v1 02/14] bus1: provide stub cdev /dev/bus1 Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-27 18:40 +0200
              Re: [RFC v1 02/14] bus1: provide stub cdev /dev/bus1 Tom Gundersen <teg@jklm.no> - 2016-10-27 18:50 +0200
            Re: [RFC v1 02/14] bus1: provide stub cdev /dev/bus1 Arnd Bergmann <arnd@arndb.de> - 2016-10-30 00:20 +0200
  [RFC v1 09/14] bus1: provide transaction context for multicasts David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
    Re: [RFC v1 09/14] bus1: provide transaction context for multicasts Peter Zijlstra <peterz@infradead.org> - 2016-10-28 16:40 +0200
  [RFC v1 07/14] bus1: tracking user contexts David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
  [RFC v1 03/14] bus1: util - active reference utility library David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
  [RFC v1 05/14] bus1: util - pool utility library David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
    Re: [RFC v1 05/14] bus1: util - pool utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-27 16:00 +0200
      Re: [RFC v1 05/14] bus1: util - pool utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-27 17:10 +0200
    Re: [RFC v1 05/14] bus1: util - pool utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-27 16:00 +0200
    Re: [RFC v1 05/14] bus1: util - pool utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-27 17:20 +0200
  [RFC v1 04/14] bus1: util - fixed list utility library David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
    Re: [RFC v1 04/14] bus1: util - fixed list utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-27 16:30 +0200
      Re: [RFC v1 04/14] bus1: util - fixed list utility library David Herrmann <dh.herrmann@gmail.com> - 2016-10-27 16:50 +0200
  [RFC v1 13/14] bus1: limit and protect resources David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
  [RFC v1 08/14] bus1: implement peer management context David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
    Re: [RFC v1 08/14] bus1: implement peer management context Richard Weinberger <richard.weinberger@gmail.com> - 2016-10-28 14:10 +0200
      Re: [RFC v1 08/14] bus1: implement peer management context Tom Gundersen <teg@jklm.no> - 2016-10-28 15:20 +0200
        Re: [RFC v1 08/14] bus1: implement peer management context Richard Weinberger <richard@nod.at> - 2016-10-28 15:30 +0200
    Re: [RFC v1 08/14] bus1: implement peer management context Richard Weinberger <richard.weinberger@gmail.com> - 2016-10-28 15:10 +0200
      Re: [RFC v1 08/14] bus1: implement peer management context Tom Gundersen <teg@jklm.no> - 2016-10-28 15:30 +0200
        Re: [RFC v1 08/14] bus1: implement peer management context Richard Weinberger <richard@nod.at> - 2016-10-28 16:00 +0200
  [RFC v1 14/14] bus1: basic user-space kselftests David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
  [RFC v1 12/14] bus1: hook up file-operations David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
  [RFC v1 01/14] bus1: add bus1(7) man-page David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
    Re: [RFC v1 01/14] bus1: add bus1(7) man-page "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-10-29 22:30 +0200
  [RFC v1 11/14] bus1: implement message transmission David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
  [RFC v1 06/14] bus1: util - queue utility library David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 21:30 +0200
    Re: [RFC v1 06/14] bus1: util - queue utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-27 17:30 +0200
    Re: [RFC v1 06/14] bus1: util - queue utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-27 18:50 +0200
      Re: [RFC v1 06/14] bus1: util - queue utility library Tom Gundersen <teg@jklm.no> - 2016-10-28 13:40 +0200
        Re: [RFC v1 06/14] bus1: util - queue utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-28 15:40 +0200
          Re: [RFC v1 06/14] bus1: util - queue utility library Tom Gundersen <teg@jklm.no> - 2016-10-28 15:50 +0200
            Re: [RFC v1 06/14] bus1: util - queue utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-28 16:00 +0200
              Re: [RFC v1 06/14] bus1: util - queue utility library Tom Gundersen <teg@jklm.no> - 2016-10-28 16:40 +0200
                Re: [RFC v1 06/14] bus1: util - queue utility library Peter Zijlstra <peterz@infradead.org> - 2016-10-28 18:50 +0200
  Re: [RFC v1 00/14] Bus1 Kernel Message Bus Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-26 21:50 +0200
    Re: [RFC v1 00/14] Bus1 Kernel Message Bus David Herrmann <dh.herrmann@gmail.com> - 2016-10-26 22:40 +0200
      Re: [RFC v1 00/14] Bus1 Kernel Message Bus "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-10-29 22:30 +0200
        Re: [RFC v1 00/14] Bus1 Kernel Message Bus Josh Triplett <josh@joshtriplett.org> - 2016-10-29 23:10 +0200
        Re: [RFC v1 00/14] Bus1 Kernel Message Bus David Herrmann <dh.herrmann@gmail.com> - 2016-11-02 15:50 +0100
  Re: [RFC v1 04/14] bus1: util - fixed list utility library Arnd Bergmann <arnd@arndb.de> - 2016-10-27 16:00 +0200
    Re: [RFC v1 04/14] bus1: util - fixed list utility library David Herrmann <dh.herrmann@gmail.com> - 2016-10-27 16:00 +0200
  Re: [RFC v1 00/14] Bus1 Kernel Message Bus Michael Kerrisk <mtk.manpages@gmail.com> - 2016-10-27 16:40 +0200
  Re: [RFC v1 00/14] Bus1 Kernel Message Bus Richard Weinberger <richard.weinberger@gmail.com> - 2016-10-28 15:20 +0200
    Re: [RFC v1 00/14] Bus1 Kernel Message Bus Tom Gundersen <teg@jklm.no> - 2016-10-28 15:40 +0200

csiph-web