All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Patrick Boettcher <patrick.boettcher@desy.de>,
	v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [v4l-dvb-maintainer] DVB: BANDWIDTH_TO_KHZ strangeness
Date: Mon, 22 Oct 2007 21:54:24 +0200	[thread overview]
Message-ID: <20071022195424.GP30533@stusta.de> (raw)
In-Reply-To: <1193077776.15350.22.camel@gaivota>

On Mon, Oct 22, 2007 at 04:29:36PM -0200, Mauro Carvalho Chehab wrote:
> 
> > I know that in the future the linux-dvb-API will also support other 
> > bandwidths so I'm begging for mercy for those 3 things here to not get too 
> > much out-of-sync with our internal code.
> 
> I don't see much problem on keeping this for a while. 
> 
> However, if not causing to much troubles for you to manage, I would to
> this, instead:
> #if 0
> 	/* Currently, DVB API allows only bandwidths starting from 5 GHz */
>         factor = BANDWIDTH_TO_KHZ(ch->u.ofdm.bandwidth);
>         if (factor >= 5000)
>                 factor = 1;
>         else
>                 factor = 6;
> #else
> 	factor = 6;
> #endif
> 
> With the above code, gentree.pl scripts will automatically remove the
> dead code from the Kernel, while keeping it defined at the development
> environment.
>...

Good compilers like gcc generate the same code for both cases [1], so 
there's no reason for changing anything.

The reason for my email was that it looked strange, but since it's 
intended I'd say it's OK.

> Cheers,
> Mauro

cu
Adrian

[1] except that your #else case contains the wrong value  ;-)

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2007-10-22 19:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-14 17:50 DVB: BANDWIDTH_TO_KHZ strangeness Adrian Bunk
2007-10-22 15:10 ` [v4l-dvb-maintainer] " Patrick Boettcher
2007-10-22 18:29   ` Mauro Carvalho Chehab
2007-10-22 19:54     ` Adrian Bunk [this message]
2007-10-22 20:02       ` Mauro Carvalho Chehab

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=20071022195424.GP30533@stusta.de \
    --to=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=patrick.boettcher@desy.de \
    --cc=v4l-dvb-maintainer@linuxtv.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.