2005-11-01 08:12:57

by Michael Krufky

[permalink] [raw]
Subject: [PATCH 01/37] dvb: dst: Correcty Identify Tuner and Daughterboards




Attachments:
2353.patch (3.62 kB)

2005-11-03 03:24:35

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 01/37] dvb: dst: Correcty Identify Tuner and Daughterboards

Michael Krufky <[email protected]> wrote:
>
> +static int dst_get_tuner_info(struct dst_state *state)
> +{
> + u8 get_tuner_1[] = { 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
> + u8 get_tuner_2[] = { 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
> +
> + get_tuner_1[7] = dst_check_sum(get_tuner_1, 7);
> + get_tuner_2[7] = dst_check_sum(get_tuner_2, 7);
> + if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
> + if (dst_command(state, get_tuner_2, 8) < 0) {
> + dprintk(verbose, DST_INFO, 1, "Unsupported Command");
> + return -1;
> + }
> + } else {
> + if (dst_command(state, get_tuner_1, 8) < 0) {
> + dprintk(verbose, DST_INFO, 1, "Unsupported Command");
> + return -1;
> + }
> + }
> + memset(&state->board_info, '\0', 8);
> + memcpy(&state->board_info, &state->rxbuffer, 8);

The memset is unneeded...

2005-11-03 09:36:00

by Manu Abraham

[permalink] [raw]
Subject: Re: [PATCH 01/37] dvb: dst: Correcty Identify Tuner and Daughterboards

Andrew Morton wrote:

>Michael Krufky <[email protected]> wrote:
>
>
>> +static int dst_get_tuner_info(struct dst_state *state)
>> +{
>> + u8 get_tuner_1[] = { 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
>> + u8 get_tuner_2[] = { 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
>> +
>> + get_tuner_1[7] = dst_check_sum(get_tuner_1, 7);
>> + get_tuner_2[7] = dst_check_sum(get_tuner_2, 7);
>> + if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
>> + if (dst_command(state, get_tuner_2, 8) < 0) {
>> + dprintk(verbose, DST_INFO, 1, "Unsupported Command");
>> + return -1;
>> + }
>> + } else {
>> + if (dst_command(state, get_tuner_1, 8) < 0) {
>> + dprintk(verbose, DST_INFO, 1, "Unsupported Command");
>> + return -1;
>> + }
>> + }
>> + memset(&state->board_info, '\0', 8);
>> + memcpy(&state->board_info, &state->rxbuffer, 8);
>>
>>
>
>The memset is unneeded...
>
>
Hello Andrew,

I will have that changed in dvb-kernel CVS. Would you like me to send in
a patch for the same. Or you can have it changed .. ?


Thanks,
Manu

2005-11-03 15:24:39

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 01/37] dvb: dst: Correcty Identify Tuner and Daughterboards

Manu Abraham <[email protected]> wrote:
>
> Andrew Morton wrote:
>
> >Michael Krufky <[email protected]> wrote:
> >
> >
> >> +static int dst_get_tuner_info(struct dst_state *state)
> >> +{
> >> + u8 get_tuner_1[] = { 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
> >> + u8 get_tuner_2[] = { 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
> >> +
> >> + get_tuner_1[7] = dst_check_sum(get_tuner_1, 7);
> >> + get_tuner_2[7] = dst_check_sum(get_tuner_2, 7);
> >> + if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
> >> + if (dst_command(state, get_tuner_2, 8) < 0) {
> >> + dprintk(verbose, DST_INFO, 1, "Unsupported Command");
> >> + return -1;
> >> + }
> >> + } else {
> >> + if (dst_command(state, get_tuner_1, 8) < 0) {
> >> + dprintk(verbose, DST_INFO, 1, "Unsupported Command");
> >> + return -1;
> >> + }
> >> + }
> >> + memset(&state->board_info, '\0', 8);
> >> + memcpy(&state->board_info, &state->rxbuffer, 8);
> >>
> >>
> >
> >The memset is unneeded...
> >
> >
> Hello Andrew,
>
> I will have that changed in dvb-kernel CVS. Would you like me to send in
> a patch for the same. Or you can have it changed .. ?
>

There's certainly no rush ;) Please just add it to the 2.6.16 to-do list.

2005-11-03 17:07:18

by Manu Abraham

[permalink] [raw]
Subject: Re: [PATCH 01/37] dvb: dst: Correcty Identify Tuner and Daughterboards

Andrew Morton wrote:

>Manu Abraham <[email protected]> wrote:
>
>
>>Andrew Morton wrote:
>>
>>
>>
>>>Michael Krufky <[email protected]> wrote:
>>>
>>>
>>>
>>>
>>>>+static int dst_get_tuner_info(struct dst_state *state)
>>>>+{
>>>>+ u8 get_tuner_1[] = { 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
>>>>+ u8 get_tuner_2[] = { 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
>>>>+
>>>>+ get_tuner_1[7] = dst_check_sum(get_tuner_1, 7);
>>>>+ get_tuner_2[7] = dst_check_sum(get_tuner_2, 7);
>>>>+ if (state->type_flags & DST_TYPE_HAS_MULTI_FE) {
>>>>+ if (dst_command(state, get_tuner_2, 8) < 0) {
>>>>+ dprintk(verbose, DST_INFO, 1, "Unsupported Command");
>>>>+ return -1;
>>>>+ }
>>>>+ } else {
>>>>+ if (dst_command(state, get_tuner_1, 8) < 0) {
>>>>+ dprintk(verbose, DST_INFO, 1, "Unsupported Command");
>>>>+ return -1;
>>>>+ }
>>>>+ }
>>>>+ memset(&state->board_info, '\0', 8);
>>>>+ memcpy(&state->board_info, &state->rxbuffer, 8);
>>>>
>>>>
>>>>
>>>>
>>>The memset is unneeded...
>>>
>>>
>>>
>>>
>>Hello Andrew,
>>
>>I will have that changed in dvb-kernel CVS. Would you like me to send in
>>a patch for the same. Or you can have it changed .. ?
>>
>>
>>
>
>There's certainly no rush ;) Please just add it to the 2.6.16 to-do list.
>
>
>

Ok, done. I will queue it up in the TODO list for 2.6.16.


Thanks,
Manu