Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@codecoup.pl>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 0/4] Abort on small allocations
Date: Fri, 30 Oct 2015 11:58:27 +0100	[thread overview]
Message-ID: <1516737.rC4sLcXqtY@ix> (raw)
In-Reply-To: <1445896652-16417-1-git-send-email-szymon.janc@codecoup.pl>

On Monday 26 October 2015 22:57:28 Szymon Janc wrote:
> Hi,
> 
> Rebased and resent.
> 
> From original RFC:
> This patchset is an initial work to simplify handling of memory allocation
> failures in BlueZ. The solution is simple: don't check for errors and just
> abort if allocation fails.
> 
> This make error paths (which were most likely never executed) *much*
> simpler.
> 
> Another benefit is increased similarity of src/shared APIs to already used
> Glib APIs which also abort on allocation error (unless _try variant is
> used). This makes transition from Glib APIs to shared APIs easier.
> 
> Patches 1-3 are samples that show how much of the error handling code
> can be removed. Those are initial patches as 'never-fail' API propagates up
> (new0()->queue_new()->foo_add()) and futher error handling can be removed.
> 
> 
> Szymon Janc (4):
>   shared: Make new0 abort on failure
>   shared: Remove dead code
>   android: Remove dead code
>   core: Remove dead code
> 
>  android/avdtp.c               |   5 +-
>  android/avdtptest.c           |   4 -
>  android/bas.c                 |  55 +------
>  android/bluetooth.c           |  17 ---
>  android/dis.c                 |  11 --
>  android/gatt.c                | 336
> +++++------------------------------------- android/handsfree-client.c    | 
> 14 +-
>  android/handsfree.c           |   9 +-
>  android/health.c              |  67 ++-------
>  android/hog.c                 |   2 -
>  android/scpp.c                |  22 +--
>  android/tester-a2dp.c         |   7 +-
>  android/tester-avrcp.c        |   7 +-
>  android/tester-bluetooth.c    |   7 +-
>  android/tester-gatt.c         |   7 +-
>  android/tester-hdp.c          |   7 +-
>  android/tester-hidhost.c      |   7 +-
>  android/tester-map-client.c   |   7 +-
>  android/tester-pan.c          |   7 +-
>  android/tester-socket.c       |   7 +-
>  src/advertising.c             |   6 -
>  src/gatt-client.c             |  67 ---------
>  src/gatt-database.c           | 100 -------------
>  src/shared/ad.c               |  31 ----
>  src/shared/att.c              |  34 +----
>  src/shared/crypto.c           |   2 -
>  src/shared/gap.c              |   7 -
>  src/shared/gatt-client.c      |  59 --------
>  src/shared/gatt-db.c          |  37 -----
>  src/shared/gatt-helpers.c     |  24 ---
>  src/shared/gatt-server.c      |  47 ------
>  src/shared/hci-crypto.c       |   6 -
>  src/shared/hci.c              |  29 ----
>  src/shared/hfp.c              |  40 -----
>  src/shared/io-mainloop.c      |   3 -
>  src/shared/mgmt.c             |  42 ------
>  src/shared/queue.c            |  12 --
>  src/shared/ringbuf.c          |   3 -
>  src/shared/tester.c           |   9 --
>  src/shared/timeout-mainloop.c |   3 -
>  src/shared/uhid.c             |   8 -
>  src/shared/util.c             |  16 ++
>  src/shared/util.h             |  14 +-
>  43 files changed, 97 insertions(+), 1107 deletions(-)

Applied.

-- 
pozdrawiam
Szymon Janc

      parent reply	other threads:[~2015-10-30 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 21:57 [PATCH 0/4] Abort on small allocations Szymon Janc
2015-10-26 21:57 ` [PATCH 1/4] shared: Make new0 abort on failure Szymon Janc
2015-10-26 21:57 ` [PATCH 2/4] shared: Remove dead code Szymon Janc
2015-10-26 21:57 ` [PATCH 3/4] android: " Szymon Janc
2015-10-26 21:57 ` [PATCH 4/4] core: " Szymon Janc
2015-10-30 10:58 ` Szymon Janc [this message]

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=1516737.rC4sLcXqtY@ix \
    --to=szymon.janc@codecoup.pl \
    --cc=linux-bluetooth@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox