linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: Danny Kukawka <danny.kukawka@bisect.de>
Cc: ivtv-devel@ivtvdriver.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, mchehab@redhat.com,
	Rusty Russell <rusty@rustcorp.com.au>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH v2 08/16] ivtv-driver: fix handling of 'radio' module parameter
Date: Tue, 31 Jan 2012 10:00:31 -0500	[thread overview]
Message-ID: <88b53197-44ea-4949-9758-534fad5d8a71@email.android.com> (raw)
In-Reply-To: <201201311445.27230.danny.kukawka@bisect.de>

Danny Kukawka <danny.kukawka@bisect.de> wrote:

>On Dienstag, 31. Januar 2012, Andy Walls wrote:
>> On Mon, 2012-01-30 at 20:40 +0100, Danny Kukawka wrote:
>> > Fixed handling of 'radio' module parameter from module_param_array
>> > to module_param_named to fix these compiler warnings in
>ivtv-driver.c:
>> >
>> > In function ‘__check_radio’:
>> > 113:1: warning: return from incompatible pointer type [enabled by
>> > default] At top level:
>> > 113:1: warning: initialization from incompatible pointer type
>[enabled by
>> > default] 113:1: warning: (near initialization for
>> > ‘__param_arr_radio.num’) [enabled by default]
>> >
>> > Set initial state of radio_c to true instead of 1.
>>
>> NACK.
>>
>> "radio" is an array of tristate values (-1, 0, 1) per installed card:
>>
>> 	static int radio[IVTV_MAX_CARDS] = { -1, -1,
>>
>> and must remain an array or you will break the driver.
>>
>> Calling "radio_c" a module parameter named "radio" is wrong.
>>
>> The correct fix is to reverse Rusty Russel's patch to the driver in
>> commit  90ab5ee94171b3e28de6bb42ee30b527014e0be7
>> to change the "bool" to an "int" as it should be in
>> "module_param_array(radio, ...)"
>
>Overseen this. But wouldn't be the correct fix in this case to:
>a) reverse the part of 90ab5ee94171b3e28de6bb42ee30b527014e0be7 to get:
>   static unsigned int radio_c = 1;
>
>b) change the following line:
>   module_param_array(radio, bool, &radio_c, 0644);
>   to:
>   module_param_array(radio, int, &radio_c, 0644);
>
>Without b) you would get a warning from the compiler again.
>
>Danny 

Yes both need to happen.

I mentioned b) in my original email.

Regards,
Andy

  reply	other threads:[~2012-01-31 15:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 22:00 [PATCH RESEND 00/16] some compiler warning fixes Danny Kukawka
2012-01-30 22:00 ` [PATCH 01/16] eicon: fix -Warray-bounds warning Danny Kukawka
2012-01-30 23:09   ` Ben Hutchings
2012-01-31 15:25     ` Karsten Keil
2012-01-31 17:04       ` Danny Kukawka
2012-02-01  9:04         ` David Laight
2012-02-01 12:52           ` Danny Kukawka
2012-02-02 18:25             ` Karsten Keil
2012-01-30 22:00 ` [PATCH v2 02/16] max2165: trival fix for some -Wuninitialized warning Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 03/16] mmc: " Danny Kukawka
2012-01-30 22:00 ` [PATCH 05/16] cx18: fix handling of 'radio' module parameter Danny Kukawka
2012-01-31 13:45   ` Danny Kukawka
2012-01-31 14:59     ` Andy Walls
2012-02-01  2:29     ` Rusty Russell
2012-01-30 22:00 ` [PATCH 06/16] cpcihp: fix debug module parameter to be bool Danny Kukawka
2012-02-03  0:06   ` Scott Murray
2012-02-10 19:40   ` Jesse Barnes
2012-01-30 22:00 ` [PATCH v2 07/16] hdaps: trivial fix for -Wuninitialized Danny Kukawka
2012-01-30 22:00 ` [PATCH 09/16] [RFC] aic94xx: " Danny Kukawka
2012-01-30 22:00 ` [PATCH 10/16] ixj: fix Wsequence-point compiler warnings Danny Kukawka
2012-01-30 22:00 ` [PATCH 11/16] ath5k: make ath5k_modparam_no_hw_rfkill_switch real Danny Kukawka
2012-01-30 22:11   ` Jiri Slaby
2012-01-30 23:09     ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 12/16] kobil_sct: fix debug module parameter to be bool Danny Kukawka
2012-01-30 23:13   ` Danny Kukawka
2012-01-30 22:00 ` [PATCH 13/16] riva/fbdev: fix several -Wuninitialized Danny Kukawka
2012-02-13 21:26   ` Florian Tobias Schandinat
2012-01-30 22:00 ` [PATCH 14/16] hamradio: fix incompatible pointer in module parameter Danny Kukawka
2012-02-01 19:40   ` David Miller
2012-01-30 22:00 ` [PATCH v2 15/16] leds-lp5521: fix compiler warning Danny Kukawka
2012-01-30 22:00 ` [PATCH v2 16/16] leds-lp5523: " Danny Kukawka
     [not found] ` <1327960820-11867-9-git-send-email-danny.kukawka@bisect.de>
2012-01-31 13:45   ` [PATCH v2 08/16] ivtv-driver: fix handling of 'radio' module parameter Danny Kukawka
2012-01-31 15:00     ` Andy Walls [this message]
     [not found] <1327952458-7424-1-git-send-email-danny.kukawka@bisect.de>
     [not found] ` <1327952458-7424-9-git-send-email-danny.kukawka@bisect.de>
2012-01-31 10:07   ` Andy Walls

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=88b53197-44ea-4949-9758-534fad5d8a71@email.android.com \
    --to=awalls@md.metrocast.net \
    --cc=danny.kukawka@bisect.de \
    --cc=ivtv-devel@ivtvdriver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@redhat.com \
    --cc=rusty@rustcorp.com.au \
    /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;
as well as URLs for NNTP newsgroup(s).