From: Szymon Janc <szymon.janc@tieto.com>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] android/gatt: Fix dead code warnings
Date: Fri, 19 Dec 2014 11:15:43 +0100 [thread overview]
Message-ID: <1971447.3gPWfdfUJW@uw000953> (raw)
In-Reply-To: <20141219101448.GA5094@aemeltch-MOBL1>
Hi Andrei,
On Friday 19 of December 2014 12:14:50 Andrei Emeltchenko wrote:
> Hi Szymon,
>
> On Fri, Dec 19, 2014 at 11:07:55AM +0100, Szymon Janc wrote:
> > Hi Andrei,
> >
> > On Friday 19 of December 2014 11:24:40 Andrei Emeltchenko wrote:
> > > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > >
> > > gatt_db_attribute_get_permissions() used everywhere without check since
> > > those conditions are checked already.
> > > ---
> > > android/gatt.c | 3 +--
> > > 1 file changed, 1 insertion(+), 2 deletions(-)
> > >
> > > diff --git a/android/gatt.c b/android/gatt.c
> > > index 0258d91..169f6db 100644
> > > --- a/android/gatt.c
> > > +++ b/android/gatt.c
> > > @@ -6311,8 +6311,7 @@ static void write_cmd_request(const uint8_t *cmd, uint16_t cmd_len,
> > > if (!attrib)
> > > return;
> > >
> > > - if (!gatt_db_attribute_get_permissions(attrib, &permissions))
> > > - return;
> > > + gatt_db_attribute_get_permissions(attrib, &permissions);
> > >
> > > if (check_device_permissions(dev, cmd[0], permissions))
> > > return;
> >
> > Wasn't identical patch already reviewed few weeks ago?
> >
>
> It is still valid. No better approach was found.
I suggested possible solution which you implemented in V2. But you seem to
ignored comment from Luiz so this didn't moved on.
--
Best regards,
Szymon Janc
next prev parent reply other threads:[~2014-12-19 10:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 9:24 [PATCH] android/gatt: Fix dead code warnings Andrei Emeltchenko
2014-12-19 10:07 ` Szymon Janc
2014-12-19 10:14 ` Andrei Emeltchenko
2014-12-19 10:15 ` Szymon Janc [this message]
2014-12-19 10:18 ` [PATCH] android/gatt: Simplify gatt_db_attribute_get_permissions() Andrei Emeltchenko
2015-01-09 10:10 ` Szymon Janc
2015-01-13 10:09 ` [PATCHv2 1/2] android/gatt: Fix dead code warnings Andrei Emeltchenko
2015-01-13 10:09 ` [PATCHv2 2/2] android/gatt: Refactor gatt_db_attribute_get_permissions() Andrei Emeltchenko
2015-01-20 10:48 ` [PATCHv2 1/2] android/gatt: Fix dead code warnings Szymon Janc
2014-12-19 10:22 ` [PATCH] " Andrei Emeltchenko
2015-01-08 14:19 ` Andrei Emeltchenko
-- strict thread matches above, loose matches on Subject: below --
2014-11-10 13:25 Andrei Emeltchenko
2014-11-10 20:05 ` Szymon Janc
2014-11-11 8:22 ` Andrei Emeltchenko
2014-11-13 13:24 ` Szymon Janc
2014-11-13 13:33 ` Andrei Emeltchenko
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=1971447.3gPWfdfUJW@uw000953 \
--to=szymon.janc@tieto.com \
--cc=Andrei.Emeltchenko.news@gmail.com \
--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