[4/15] - tm6000.h

Message ID 4B69D9AF.4020309@arcor.de (mailing list archive)
State Rejected, archived
Headers

Commit Message

Stefan Ringel Feb. 3, 2010, 8:16 p.m. UTC
  signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>

 int tm6000_init_digital_mode (struct tm6000_core *dev);
@@ -231,7 +242,12 @@ int tm6000_set_standard (struct tm6000_core *dev,
v4l2_std_id *norm);
 int tm6000_i2c_register(struct tm6000_core *dev);
 int tm6000_i2c_unregister(struct tm6000_core *dev);
 
+#if 1
 /* In tm6000-queue.c */
+#if 0
+int tm6000_init_isoc(struct tm6000_core *dev, int max_packets);
+void tm6000_uninit_isoc(struct tm6000_core *dev);
+#endif
 
 int tm6000_v4l2_mmap(struct file *filp, struct vm_area_struct *vma);
 
@@ -276,3 +292,4 @@ extern int tm6000_debug;
         __FUNCTION__ , ##arg); } while (0)
 
 
+#endif
  

Comments

Mauro Carvalho Chehab Feb. 3, 2010, 8:25 p.m. UTC | #1
This one is a very obscure patch. What are you doing this patch and why?

Stefan Ringel wrote:
> signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
> 
> --- a/drivers/staging/tm6000/tm6000.h
> +++ b/drivers/staging/tm6000/tm6000.h
> @@ -90,12 +97,14 @@ enum tm6000_core_state {
>      DEV_MISCONFIGURED = 0x04,
>  };
>  
> +#if 1
>  /* io methods */
>  enum tm6000_io_method {
>      IO_NONE,
>      IO_READ,
>      IO_MMAP,
>  };
> +#endif
>  
>  enum tm6000_mode {
>      TM6000_MODE_UNKNOWN=0,
> @@ -202,6 +211,9 @@ struct tm6000_fh {
>              V4L2_STD_PAL_M|V4L2_STD_PAL_60|V4L2_STD_NTSC_M| \
>              V4L2_STD_NTSC_M_JP|V4L2_STD_SECAM
>  
> +/* In tm6000-cards.c */
> +
> +int tm6000_tuner_callback (void *ptr, int component, int command, int arg);
>  /* In tm6000-core.c */
>  
>  int tm6000_read_write_usb (struct tm6000_core *dev, u8 reqtype, u8 req,
> @@ -209,7 +221,6 @@ int tm6000_read_write_usb (struct tm6000_core *dev,
> u8 reqtype, u8 req,
>  int tm6000_get_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
>  int tm6000_set_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
>  int tm6000_init (struct tm6000_core *dev);
> -int tm6000_init_after_firmware (struct tm6000_core *dev);
>  
>  int tm6000_init_analog_mode (struct tm6000_core *dev);
>  int tm6000_init_digital_mode (struct tm6000_core *dev);
> @@ -231,7 +242,12 @@ int tm6000_set_standard (struct tm6000_core *dev,
> v4l2_std_id *norm);
>  int tm6000_i2c_register(struct tm6000_core *dev);
>  int tm6000_i2c_unregister(struct tm6000_core *dev);
>  
> +#if 1
>  /* In tm6000-queue.c */
> +#if 0
> +int tm6000_init_isoc(struct tm6000_core *dev, int max_packets);
> +void tm6000_uninit_isoc(struct tm6000_core *dev);
> +#endif
>  
>  int tm6000_v4l2_mmap(struct file *filp, struct vm_area_struct *vma);
>  
> @@ -276,3 +292,4 @@ extern int tm6000_debug;
>          __FUNCTION__ , ##arg); } while (0)
>  
>  
> +#endif
>
  
Stefan Ringel Feb. 3, 2010, 8:50 p.m. UTC | #2
Am 03.02.2010 21:25, schrieb Mauro Carvalho Chehab:
> This one is a very obscure patch. What are you doing this patch and why?
>
> Stefan Ringel wrote:
>   
>> signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
>>
>> --- a/drivers/staging/tm6000/tm6000.h
>> +++ b/drivers/staging/tm6000/tm6000.h
>> @@ -90,12 +97,14 @@ enum tm6000_core_state {
>>      DEV_MISCONFIGURED = 0x04,
>>  };
>>  
>> +#if 1
>>  /* io methods */
>>  enum tm6000_io_method {
>>      IO_NONE,
>>      IO_READ,
>>      IO_MMAP,
>>  };
>> +#endif
>>  
>>     
? different between git and hg ? not mine
>>  enum tm6000_mode {
>>      TM6000_MODE_UNKNOWN=0,
>> @@ -202,6 +211,9 @@ struct tm6000_fh {
>>              V4L2_STD_PAL_M|V4L2_STD_PAL_60|V4L2_STD_NTSC_M| \
>>              V4L2_STD_NTSC_M_JP|V4L2_STD_SECAM
>>  
>> +/* In tm6000-cards.c */
>> +
>> +int tm6000_tuner_callback (void *ptr, int component, int command, int arg);
>>  /* In tm6000-core.c */
>>  
>>     
I use that for tuner callback in tm6000-dvb --> frontend structure
>>  int tm6000_read_write_usb (struct tm6000_core *dev, u8 reqtype, u8 req,
>> @@ -209,7 +221,6 @@ int tm6000_read_write_usb (struct tm6000_core *dev,
>> u8 reqtype, u8 req,
>>  int tm6000_get_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
>>  int tm6000_set_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
>>  int tm6000_init (struct tm6000_core *dev);
>> -int tm6000_init_after_firmware (struct tm6000_core *dev);
>>  
>>  int tm6000_init_analog_mode (struct tm6000_core *dev);
>>  int tm6000_init_digital_mode (struct tm6000_core *dev);
>> @@ -231,7 +242,12 @@ int tm6000_set_standard (struct tm6000_core *dev,
>> v4l2_std_id *norm);
>>  int tm6000_i2c_register(struct tm6000_core *dev);
>>  int tm6000_i2c_unregister(struct tm6000_core *dev);
>>  
>> +#if 1
>>  /* In tm6000-queue.c */
>> +#if 0
>> +int tm6000_init_isoc(struct tm6000_core *dev, int max_packets);
>> +void tm6000_uninit_isoc(struct tm6000_core *dev);
>> +#endif
>>  
>>     
? different between git and hg ? not mine
>>  int tm6000_v4l2_mmap(struct file *filp, struct vm_area_struct *vma);
>>  
>> @@ -276,3 +292,4 @@ extern int tm6000_debug;
>>          __FUNCTION__ , ##arg); } while (0)
>>  
>>  
>> +#endif
>>
>>     
>
>
  
Devin Heitmueller Feb. 3, 2010, 8:58 p.m. UTC | #3
On Wed, Feb 3, 2010 at 3:50 PM, Stefan Ringel <stefan.ringel@arcor.de> wrote:
> Am 03.02.2010 21:25, schrieb Mauro Carvalho Chehab:
>> This one is a very obscure patch. What are you doing this patch and why?
>>
>> Stefan Ringel wrote:
>>
>>> signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
>>>
>>> --- a/drivers/staging/tm6000/tm6000.h
>>> +++ b/drivers/staging/tm6000/tm6000.h
>>> @@ -90,12 +97,14 @@ enum tm6000_core_state {
>>>      DEV_MISCONFIGURED = 0x04,
>>>  };
>>>
>>> +#if 1
>>>  /* io methods */
>>>  enum tm6000_io_method {
>>>      IO_NONE,
>>>      IO_READ,
>>>      IO_MMAP,
>>>  };
>>> +#endif
>>>
>>>
> ? different between git and hg ? not mine

Stefan,

The patches *you submitted* included this "#if 1".  Regardless of
whether it's differences between git and hg or some other weird merge
bug, you are responsible for the patches you submit.  You should be
reviewing each patch before sending it, and if it contains things you
do not understand why they are there, then you need to resolve those
inconsistencies before submitting the patch.

Reviewing each patch individually before sending also helps avoid
avoid things like submitting patches which make arbitrary/unnecessary
whitespace changes.

Devin
  
Mauro Carvalho Chehab Feb. 3, 2010, 9:31 p.m. UTC | #4
Stefan Ringel wrote:
> Am 03.02.2010 21:25, schrieb Mauro Carvalho Chehab:
>> This one is a very obscure patch. What are you doing this patch and why?
>>
>> Stefan Ringel wrote:
>>   
>>> signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
>>>
>>> --- a/drivers/staging/tm6000/tm6000.h
>>> +++ b/drivers/staging/tm6000/tm6000.h
>>> @@ -90,12 +97,14 @@ enum tm6000_core_state {
>>>      DEV_MISCONFIGURED = 0x04,
>>>  };
>>>  
>>> +#if 1
>>>  /* io methods */
>>>  enum tm6000_io_method {
>>>      IO_NONE,
>>>      IO_READ,
>>>      IO_MMAP,
>>>  };
>>> +#endif
>>>  
>>>     

> ? different between git and hg ? not mine

On git, all #if 0/#if 1 are stripped (except if an explicit comment /* keep */
is added). We do this way to avoid polluting upstream kernel code with temporary
developers only code.

>>>  enum tm6000_mode {
>>>      TM6000_MODE_UNKNOWN=0,
>>> @@ -202,6 +211,9 @@ struct tm6000_fh {
>>>              V4L2_STD_PAL_M|V4L2_STD_PAL_60|V4L2_STD_NTSC_M| \
>>>              V4L2_STD_NTSC_M_JP|V4L2_STD_SECAM
>>>  
>>> +/* In tm6000-cards.c */
>>> +
>>> +int tm6000_tuner_callback (void *ptr, int component, int command, int arg);
>>>  /* In tm6000-core.c */
>>>  
>>>     
> I use that for tuner callback in tm6000-dvb --> frontend structure
>>>  int tm6000_read_write_usb (struct tm6000_core *dev, u8 reqtype, u8 req,
>>> @@ -209,7 +221,6 @@ int tm6000_read_write_usb (struct tm6000_core *dev,
>>> u8 reqtype, u8 req,
>>>  int tm6000_get_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
>>>  int tm6000_set_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
>>>  int tm6000_init (struct tm6000_core *dev);
>>> -int tm6000_init_after_firmware (struct tm6000_core *dev);
>>>  
>>>  int tm6000_init_analog_mode (struct tm6000_core *dev);
>>>  int tm6000_init_digital_mode (struct tm6000_core *dev);
>>> @@ -231,7 +242,12 @@ int tm6000_set_standard (struct tm6000_core *dev,
>>> v4l2_std_id *norm);
>>>  int tm6000_i2c_register(struct tm6000_core *dev);
>>>  int tm6000_i2c_unregister(struct tm6000_core *dev);
>>>  
>>> +#if 1
>>>  /* In tm6000-queue.c */
>>> +#if 0
>>> +int tm6000_init_isoc(struct tm6000_core *dev, int max_packets);
>>> +void tm6000_uninit_isoc(struct tm6000_core *dev);
>>> +#endif
>>>  
>>>     
> ? different between git and hg ? not mine
>>>  int tm6000_v4l2_mmap(struct file *filp, struct vm_area_struct *vma);
>>>  
>>> @@ -276,3 +292,4 @@ extern int tm6000_debug;
>>>          __FUNCTION__ , ##arg); } while (0)
>>>  
>>>  
>>> +#endif
>>>
>>>     
>>   
> 
>
  

Patch

--- a/drivers/staging/tm6000/tm6000.h
+++ b/drivers/staging/tm6000/tm6000.h
@@ -90,12 +97,14 @@  enum tm6000_core_state {
     DEV_MISCONFIGURED = 0x04,
 };
 
+#if 1
 /* io methods */
 enum tm6000_io_method {
     IO_NONE,
     IO_READ,
     IO_MMAP,
 };
+#endif
 
 enum tm6000_mode {
     TM6000_MODE_UNKNOWN=0,
@@ -202,6 +211,9 @@  struct tm6000_fh {
             V4L2_STD_PAL_M|V4L2_STD_PAL_60|V4L2_STD_NTSC_M| \
             V4L2_STD_NTSC_M_JP|V4L2_STD_SECAM
 
+/* In tm6000-cards.c */
+
+int tm6000_tuner_callback (void *ptr, int component, int command, int arg);
 /* In tm6000-core.c */
 
 int tm6000_read_write_usb (struct tm6000_core *dev, u8 reqtype, u8 req,
@@ -209,7 +221,6 @@  int tm6000_read_write_usb (struct tm6000_core *dev,
u8 reqtype, u8 req,
 int tm6000_get_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
 int tm6000_set_reg (struct tm6000_core *dev, u8 req, u16 value, u16 index);
 int tm6000_init (struct tm6000_core *dev);
-int tm6000_init_after_firmware (struct tm6000_core *dev);
 
 int tm6000_init_analog_mode (struct tm6000_core *dev);