mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Moskyto Matejka <mq@suse.cz>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mark Einon <mark@einon.net>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [linux-next] [staging] rtl8821ae: fixed defined-not-used warning
Date: Wed, 30 Apr 2014 14:51:20 +0200	[thread overview]
Message-ID: <20140430125120.GG24832@moskyto.dyndns.org> (raw)
In-Reply-To: <1398861590.18460.7.camel@x220>

[-- Attachment #1: Type: text/plain, Size: 1949 bytes --]

On Wed, Apr 30, 2014 at 02:39:50PM +0200, Paul Bolle wrote:
> On Wed, 2014-04-30 at 14:15 +0200, Jan Moskyto Matejka wrote:
> > --- a/drivers/staging/rtl8821ae/btcoexist/halbtc8192e2ant.c
> > +++ b/drivers/staging/rtl8821ae/btcoexist/halbtc8192e2ant.c
> > @@ -503,6 +503,7 @@ static void halbtc8192e2ant_querybt_info(struct btc_coexist *btcoexist)
> >  	btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter);
> >  }
> >  
> > +#if (BT_AUTO_REPORT_ONLY_8192E_2ANT != 0)
> >  static bool halbtc8192e2ant_iswifi_status_changed(struct btc_coexist *btcoexist)
> >  {
> >  	static bool pre_wifi_busy;
> > @@ -534,6 +535,7 @@ static bool halbtc8192e2ant_iswifi_status_changed(struct btc_coexist *btcoexist)
> >  
> >  	return false;
> >  }
> > +#endif
> >  
> >  static void halbtc8192e2ant_update_btlink_info(struct btc_coexist *btcoexist)
> >  {
> 
> The output of 
>     git grep BT_AUTO_REPORT_ONLY_8192E_2ANT next-20140430
> 
> is
>     next-20140430:drivers/staging/rtl8821ae/btcoexist/halbtc8192e2ant.c:#if (BT_AUTO_REPORT_ONLY_8192E_2ANT == 1)
>     next-20140430:drivers/staging/rtl8821ae/btcoexist/halbtc8192e2ant.c:#if (BT_AUTO_REPORT_ONLY_8192E_2ANT == 0)
>     next-20140430:drivers/staging/rtl8821ae/btcoexist/halbtc8192e2ant.c:#if (BT_AUTO_REPORT_ONLY_8192E_2ANT == 0)
>     next-20140430:drivers/staging/rtl8821ae/btcoexist/halbtc8192e2ant.h:#define     BT_AUTO_REPORT_ONLY_8192E_2ANT                  0
> 
> So it seems that some trivial cleaning up is possible. Ie, drop the
> #define and drop the three tests that are either always true or always
> false. Is there a reason not to do that cleaning up?

I thought this part of code is here for somebody who wants to make a
custom build with this variable changed to compile in the other
behaviour. But after a while, it stopped to make sense for me. I may
clean it up. I'll send a cleanup-patch later.
-- 
Jan Matějka <mq@suse.cz>
SUSE Labs

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-04-30 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 12:15 Jan Moskyto Matejka
2014-04-30 12:39 ` Paul Bolle
2014-04-30 12:51   ` Jan Moskyto Matejka [this message]
2014-04-30 13:22     ` [PATCH v2] " Jan Moskyto Matejka

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=20140430125120.GG24832@moskyto.dyndns.org \
    --to=mq@suse.cz \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@einon.net \
    --cc=pebolle@tiscali.nl \
    /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

all inboxes | Powered by JetHome®