Hi Mauro,

Mauro Carvalho Chehab wrote:
> Hi Oliver,
> 
> Oliver Endriss wrote:
> > Mauro,
> > 
> > Please pull from http://endr...@linuxtv.org/hg/~endriss/ngene
> 
> It were not an easy to work on this changeset, since it hit a bug at 
> gentree.pl script.
> Basically, this drivers use #elseif directive instead of #elif, making 
> gentree.pl to
> die, and generating broken converted patches. It took some time to discover 
> and fix
> the bug.
> 
> Anyway, I've applied the converted patches on a temporary git tree:
>       http://git.linuxtv.org/mchehab/ngene.git
> 
> Please double check if everything is ok there.

I noticed that all '#if 0' code has been stripped.

While this is ok (and desired) for the kernel, this stuff should be
preserved at the development trees. This code might be useful, whenever
addional features or cards are to be added.

> I had to add a hack at one of the patches, due to the frontend 
> incompatibilities
> at stv090x, starting on this changeset:
> 
> Author: Matthias Benesch <two...@freenet.de>
> Date:   Sat Dec 19 12:48:22 2009 -0300
> 
>     V4L/DVB: ngene: Added Media-Pointer MP-S2/CineS2 DVB-S2 Twin Tuner
> 
> The hack were removed on this one:
> 
> Author: Oliver Endriss <o.endr...@gmx.de>
> Date:   Mon Feb 1 22:01:31 2010 -0300
> 
>     V4L/DVB: ngene: Adapt to current frontend drivers

There was no problem with HG, because
- the first changeset was applied before the incompatibility occurred
- the second was applied as a fix for the incompatibility 

I don't know how this could be avoided. Except for dropping the HG tree
and creating a new one.

> After applying all the patches, I'm getting this error:
> 
> drivers/media/dvb/ngene/ngene-core.c: In function ‘ngene_i2c_init’:
> drivers/media/dvb/ngene/ngene-core.c:860: warning: passing argument 1 of 
> ‘__mutex_init’ from incompatible pointer type
> 
> On this line:
>         mutex_init(&adap->bus_lock);

Strange, I do not get any warnings with kernel 2.6.32.3 and gcc 4.1.2.

The line causing the problems is

mutex_init(&adap->bus_lock);

mutex.h:
# define mutex_init(mutex) \
        ...
        __mutex_init((mutex), #mutex, &__key);          \
        ...

extern void __mutex_init(struct mutex *lock, const char *name,
                         struct lock_class_key *key);

adap is a pointer to 'struct i2c_adapter':

i2c.h:
struct i2c_adapter {
        ...
        struct mutex bus_lock;
        ...

I do not see any problem here.

Something must have been changed in recent git.

Could you try if
  #include <linux/mutex.h>
helps?


> The final diff also hit a few troubles at the driver, as pointed by 
> checkpatch.pl:
> 
> WARNING: Use #include <linux/io.h> instead of <asm/io.h>
> #113: FILE: drivers/media/dvb/ngene/ngene-core.c:35:
> +#include <asm/io.h>
> 
> WARNING: line over 80 characters
> #348: FILE: drivers/media/dvb/ngene/ngene-core.c:270:
> +             HOST_TO_NGENE, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], 
> buf[6], buf[7]);
> 
> WARNING: line over 80 characters
> #352: FILE: drivers/media/dvb/ngene/ngene-core.c:274:
> +             NGENE_TO_HOST, buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], 
> buf[6], buf[7]);
> 
> ERROR: that open brace { should be on the previous line
> #1693: FILE: drivers/media/dvb/ngene/ngene-core.c:1615:
> +             u8 tsin4_config[6] =
> +                     {3072 / 64, 3072 / 64, 0, 3072 / 64, 3072 / 64, 0};
> 
> ERROR: that open brace { should be on the previous line
> #1695: FILE: drivers/media/dvb/ngene/ngene-core.c:1617:
> +             u8 default_config[6] =
> +                     {4096 / 64, 4096 / 64, 0, 2048 / 64, 2048 / 64, 0};
> 
> WARNING: Use #include <linux/scatterlist.h> instead of <asm/scatterlist.h>
> #2142: FILE: drivers/media/dvb/ngene/ngene.h:32:
> +#include <asm/scatterlist.h>
> 
> WARNING: do not add new typedefs
> #2313: FILE: drivers/media/dvb/ngene/ngene.h:203:
> +typedef struct EVENT_BUFFER *PEVENT_BUFFER;
> 
> WARNING: do not add new typedefs
> #2601: FILE: drivers/media/dvb/ngene/ngene.h:491:
> +typedef struct HW_SCATTER_GATHER_ELEMENT *PHW_SCATTER_GATHER_ELEMENT;
> 
> WARNING: do not add new typedefs
> #2602: FILE: drivers/media/dvb/ngene/ngene.h:492:
> +typedef struct FWRB *PFWRB;
> 
> WARNING: do not add new typedefs
> #2667: FILE: drivers/media/dvb/ngene/ngene.h:557:
> +typedef struct {
> 
> total: 2 errors, 8 warnings, 2935 lines checked
> 
> Your patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.

Now I remember, why I never wanted to submit anything to the kernel
again. As always it was a pleasure to work for this stupid tool. :-(

> The two 80 col warnings and the two errors don't seem relevant, but please 
> fix the other warnings.
> 
> As usual, after receiving your fixes for the above, I'll review the driver
> manually.

Except for the mutex_init() problem, everything should be fixed with
this changeset: http://linuxtv.org/hg/~endriss/ngene/rev/8ad7907e3020
Please check.

Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to