linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n
@ 2008-08-29 21:37 Elias Oltmanns
  2008-08-30 11:19 ` Sergei Shtylyov
  2008-08-31 15:52 ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 8+ messages in thread
From: Elias Oltmanns @ 2008-08-29 21:37 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

Recent changes have broken compilation when CONFIG_IDE_PROC_FS is not set.

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
---
Applies to next-20080829.

 drivers/ide/Makefile     |    9 +++++++--
 drivers/ide/ide-disk.h   |    2 ++
 drivers/ide/ide-floppy.h |    2 ++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile
index 95a6135..e6e7811 100644
--- a/drivers/ide/Makefile
+++ b/drivers/ide/Makefile
@@ -36,9 +36,14 @@ obj-$(CONFIG_IDE_H8300)			+= h8300/
 obj-$(CONFIG_IDE_GENERIC)		+= ide-generic.o
 obj-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
 
-ide-disk_mod-y += ide-disk.o ide-disk_ioctl.o ide-disk_proc.o
+ide-disk_mod-y += ide-disk.o ide-disk_ioctl.o
 ide-cd_mod-y += ide-cd.o ide-cd_ioctl.o ide-cd_verbose.o
-ide-floppy_mod-y += ide-floppy.o ide-floppy_ioctl.o ide-floppy_proc.o
+ide-floppy_mod-y += ide-floppy.o ide-floppy_ioctl.o
+
+ifeq ($(CONFIG_IDE_PROC_FS), y)
+	ide-disk_mod-y += ide-disk_proc.o
+	ide-floppy_mod-y += ide-floppy_proc.o
+endif
 
 obj-$(CONFIG_BLK_DEV_IDEDISK)		+= ide-disk_mod.o
 obj-$(CONFIG_BLK_DEV_IDECD)		+= ide-cd_mod.o
diff --git a/drivers/ide/ide-disk.h b/drivers/ide/ide-disk.h
index f937772..5254cae 100644
--- a/drivers/ide/ide-disk.h
+++ b/drivers/ide/ide-disk.h
@@ -23,8 +23,10 @@ ide_decl_devset(acoustic);
 /* ide-disk_ioctl.c */
 int ide_disk_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
 
+#ifdef CONFIG_IDE_PROC_FS
 /* ide-disk_proc.c */
 extern ide_proc_entry_t ide_disk_proc[];
 extern const struct ide_proc_devset ide_disk_settings[];
+#endif /* CONFIG_IDE_PROC_FS */
 
 #endif /* __IDE_DISK_H */
diff --git a/drivers/ide/ide-floppy.h b/drivers/ide/ide-floppy.h
index 2ad373e..86ee37e 100644
--- a/drivers/ide/ide-floppy.h
+++ b/drivers/ide/ide-floppy.h
@@ -53,8 +53,10 @@ sector_t ide_floppy_capacity(ide_drive_t *);
 /* ide-floppy_ioctl.c */
 int ide_floppy_ioctl(struct inode *, struct file *, unsigned, unsigned long);
 
+#ifdef CONFIG_IDE_PROC_FS
 /* ide-floppy_proc.c */
 extern ide_proc_entry_t ide_floppy_proc[];
 extern const struct ide_proc_devset ide_floppy_settings[];
+#endif /* CONFIG_IDE_PROC_FS */
 
 #endif /*__IDE_FLOPPY_H */



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n
  2008-08-29 21:37 [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n Elias Oltmanns
@ 2008-08-30 11:19 ` Sergei Shtylyov
  2008-08-30 11:22   ` Sergei Shtylyov
  2008-08-31 15:52 ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 8+ messages in thread
From: Sergei Shtylyov @ 2008-08-30 11:19 UTC (permalink / raw)
  To: Elias Oltmanns; +Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-kernel

Hello.

Elias Oltmanns wrote:
> Recent changes have broken compilation when CONFIG_IDE_PROC_FS is not set.
>
> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
>   
[...]
> diff --git a/drivers/ide/ide-disk.h b/drivers/ide/ide-disk.h
> index f937772..5254cae 100644
> --- a/drivers/ide/ide-disk.h
> +++ b/drivers/ide/ide-disk.h
> @@ -23,8 +23,10 @@ ide_decl_devset(acoustic);
>  /* ide-disk_ioctl.c */
>  int ide_disk_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
>  
> +#ifdef CONFIG_IDE_PROC_FS
>  /* ide-disk_proc.c */
>  extern ide_proc_entry_t ide_disk_proc[];
>  extern const struct ide_proc_devset ide_disk_settings[];
> +#endif /* CONFIG_IDE_PROC_FS */
>  
>  #endif /* __IDE_DISK_H */
> diff --git a/drivers/ide/ide-floppy.h b/drivers/ide/ide-floppy.h
> index 2ad373e..86ee37e 100644
> --- a/drivers/ide/ide-floppy.h
> +++ b/drivers/ide/ide-floppy.h
> @@ -53,8 +53,10 @@ sector_t ide_floppy_capacity(ide_drive_t *);
>  /* ide-floppy_ioctl.c */
>  int ide_floppy_ioctl(struct inode *, struct file *, unsigned, unsigned long);
>  
> +#ifdef CONFIG_IDE_PROC_FS
>  /* ide-floppy_proc.c */
>  extern ide_proc_entry_t ide_floppy_proc[];
>  extern const struct ide_proc_devset ide_floppy_settings[];
> +#endif /* CONFIG_IDE_PROC_FS */
>   

   Is surrounding 'extern' declarations by #ifdef's really of any value?
   They shouldn't be used if CONFIG_IDE_PROC_FS=n, so no object file 
records should be generated.

WBR, Sergei



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n
  2008-08-30 11:19 ` Sergei Shtylyov
@ 2008-08-30 11:22   ` Sergei Shtylyov
  2008-08-30 16:23     ` Elias Oltmanns
  0 siblings, 1 reply; 8+ messages in thread
From: Sergei Shtylyov @ 2008-08-30 11:22 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Elias Oltmanns, Bartlomiej Zolnierkiewicz, linux-ide,
	linux-kernel

Hello, I have just written:
>> Recent changes have broken compilation when CONFIG_IDE_PROC_FS is not 
>> set.
>>
>> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
>>   
> [...]
>> diff --git a/drivers/ide/ide-disk.h b/drivers/ide/ide-disk.h
>> index f937772..5254cae 100644
>> --- a/drivers/ide/ide-disk.h
>> +++ b/drivers/ide/ide-disk.h
>> @@ -23,8 +23,10 @@ ide_decl_devset(acoustic);
>>  /* ide-disk_ioctl.c */
>>  int ide_disk_ioctl(struct inode *, struct file *, unsigned int, 
>> unsigned long);
>>  
>> +#ifdef CONFIG_IDE_PROC_FS
>>  /* ide-disk_proc.c */
>>  extern ide_proc_entry_t ide_disk_proc[];
>>  extern const struct ide_proc_devset ide_disk_settings[];
>> +#endif /* CONFIG_IDE_PROC_FS */
>>  
>>  #endif /* __IDE_DISK_H */
>> diff --git a/drivers/ide/ide-floppy.h b/drivers/ide/ide-floppy.h
>> index 2ad373e..86ee37e 100644
>> --- a/drivers/ide/ide-floppy.h
>> +++ b/drivers/ide/ide-floppy.h
>> @@ -53,8 +53,10 @@ sector_t ide_floppy_capacity(ide_drive_t *);
>>  /* ide-floppy_ioctl.c */
>>  int ide_floppy_ioctl(struct inode *, struct file *, unsigned, 
>> unsigned long);
>>  
>> +#ifdef CONFIG_IDE_PROC_FS
>>  /* ide-floppy_proc.c */
>>  extern ide_proc_entry_t ide_floppy_proc[];
>>  extern const struct ide_proc_devset ide_floppy_settings[];
>> +#endif /* CONFIG_IDE_PROC_FS */
>>   
>
>   Is surrounding 'extern' declarations by #ifdef's really of any value?
>   They shouldn't be used if CONFIG_IDE_PROC_FS=n, so no object file 
> records should be generated.

   Ah, you probably mean to turn the possible link time errors if the do 
get referenced into the compile time errors...

MBR, Sergei



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n
  2008-08-30 11:22   ` Sergei Shtylyov
@ 2008-08-30 16:23     ` Elias Oltmanns
  2008-08-30 16:29       ` Sergei Shtylyov
  0 siblings, 1 reply; 8+ messages in thread
From: Elias Oltmanns @ 2008-08-30 16:23 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-kernel

Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> Hello, I have just written:
>>> Recent changes have broken compilation when CONFIG_IDE_PROC_FS is
>
>>> not set.
>>>
>>> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
>>>   
>> [...]
>>> diff --git a/drivers/ide/ide-disk.h b/drivers/ide/ide-disk.h
>>> index f937772..5254cae 100644
>>> --- a/drivers/ide/ide-disk.h
>>> +++ b/drivers/ide/ide-disk.h
>>> @@ -23,8 +23,10 @@ ide_decl_devset(acoustic);
>>>  /* ide-disk_ioctl.c */
>>>  int ide_disk_ioctl(struct inode *, struct file *, unsigned int,
>>> unsigned long);
>>>  +#ifdef CONFIG_IDE_PROC_FS
>>>  /* ide-disk_proc.c */
>>>  extern ide_proc_entry_t ide_disk_proc[];
>>>  extern const struct ide_proc_devset ide_disk_settings[];
>>> +#endif /* CONFIG_IDE_PROC_FS */
>>>   #endif /* __IDE_DISK_H */
[...]
>>
>>   Is surrounding 'extern' declarations by #ifdef's really of any value?
>>   They shouldn't be used if CONFIG_IDE_PROC_FS=n, so no object file
>> records should be generated.
>
>   Ah, you probably mean to turn the possible link time errors if the
> do get referenced into the compile time errors...

Sorry, I don't quite understand that last sentence. But we definitely
have compile time errors here because the compiler doesn't even know of
ide_proc_entry_t when CONFIG_IDE_PROC_FS is not set. Therefore the
forward declarations appear to be syntactically incorrect, regardless
whether extern or not.

Regards,

Elias

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n
  2008-08-30 16:23     ` Elias Oltmanns
@ 2008-08-30 16:29       ` Sergei Shtylyov
  0 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2008-08-30 16:29 UTC (permalink / raw)
  To: Elias Oltmanns; +Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-kernel

Elias Oltmanns wrote:

>>>>Recent changes have broken compilation when CONFIG_IDE_PROC_FS is
>>>>not set.

>>>>Signed-off-by: Elias Oltmanns <eo@nebensachen.de>

>>>[...]

>>>>diff --git a/drivers/ide/ide-disk.h b/drivers/ide/ide-disk.h
>>>>index f937772..5254cae 100644
>>>>--- a/drivers/ide/ide-disk.h
>>>>+++ b/drivers/ide/ide-disk.h
>>>>@@ -23,8 +23,10 @@ ide_decl_devset(acoustic);
>>>> /* ide-disk_ioctl.c */
>>>> int ide_disk_ioctl(struct inode *, struct file *, unsigned int,
>>>>unsigned long);
>>>> +#ifdef CONFIG_IDE_PROC_FS
>>>> /* ide-disk_proc.c */
>>>> extern ide_proc_entry_t ide_disk_proc[];
>>>> extern const struct ide_proc_devset ide_disk_settings[];
>>>>+#endif /* CONFIG_IDE_PROC_FS */
>>>>  #endif /* __IDE_DISK_H */

> [...]

>>>  Is surrounding 'extern' declarations by #ifdef's really of any value?
>>>  They shouldn't be used if CONFIG_IDE_PROC_FS=n, so no object file
>>>records should be generated.

>>  Ah, you probably mean to turn the possible link time errors if the
>>do get referenced into the compile time errors...

> Sorry, I don't quite understand that last sentence.

    If a variable declared 'extern' is referenced but the module containing 
its definition is not linked in, you get unresolved symbol at link time, if 
the declaration is missing altogether, you get error at compile time...

> But we definitely
> have compile time errors here because the compiler doesn't even know of
> ide_proc_entry_t when CONFIG_IDE_PROC_FS is not set. Therefore the
> forward declarations appear to be syntactically incorrect, regardless
> whether extern or not.

    Ah. I should've looked at the types of those variables, stupid/hasty me...

> Regards,

> Elias

MBR, Sergei

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n
  2008-08-29 21:37 [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n Elias Oltmanns
  2008-08-30 11:19 ` Sergei Shtylyov
@ 2008-08-31 15:52 ` Bartlomiej Zolnierkiewicz
  2008-09-01 22:52   ` Elias Oltmanns
  1 sibling, 1 reply; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-31 15:52 UTC (permalink / raw)
  To: Elias Oltmanns; +Cc: linux-ide, linux-kernel

On Friday 29 August 2008, Elias Oltmanns wrote:
> Recent changes have broken compilation when CONFIG_IDE_PROC_FS is not set.
> 
> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>

Thanks!

I integrated your fixes into guilty patches ("ide-floppy: move /proc handling
to ide-floppy_proc.c" and "ide-disk: move /proc handling to ide-disk_proc.c")
to preserve bisection.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n
  2008-08-31 15:52 ` Bartlomiej Zolnierkiewicz
@ 2008-09-01 22:52   ` Elias Oltmanns
  2008-09-02 10:35     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 8+ messages in thread
From: Elias Oltmanns @ 2008-09-01 22:52 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> On Friday 29 August 2008, Elias Oltmanns wrote:
>> Recent changes have broken compilation when CONFIG_IDE_PROC_FS is not set.
>> 
>> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
>
> Thanks!
>
> I integrated your fixes into guilty patches ("ide-floppy: move /proc handling
> to ide-floppy_proc.c" and "ide-disk: move /proc handling to ide-disk_proc.c")
> to preserve bisection.

Yes, that's fine with me, but in the case of ide-disk_proc.h things
apparently went wrong. As of next-20080901, I still have the line

ide-disk_mod-y += ide-disk.o ide-disk_ioctl.o ide-disk_proc.o

in the Makefile. Could you please truncate that line appropriately?

Regards,

Elias

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n
  2008-09-01 22:52   ` Elias Oltmanns
@ 2008-09-02 10:35     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 8+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-09-02 10:35 UTC (permalink / raw)
  To: Elias Oltmanns; +Cc: linux-ide, linux-kernel

On Tuesday 02 September 2008, Elias Oltmanns wrote:
> Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> > On Friday 29 August 2008, Elias Oltmanns wrote:
> >> Recent changes have broken compilation when CONFIG_IDE_PROC_FS is not set.
> >> 
> >> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
> >
> > Thanks!
> >
> > I integrated your fixes into guilty patches ("ide-floppy: move /proc handling
> > to ide-floppy_proc.c" and "ide-disk: move /proc handling to ide-disk_proc.c")
> > to preserve bisection.
> 
> Yes, that's fine with me, but in the case of ide-disk_proc.h things
> apparently went wrong. As of next-20080901, I still have the line
> 
> ide-disk_mod-y += ide-disk.o ide-disk_ioctl.o ide-disk_proc.o
> 
> in the Makefile. Could you please truncate that line appropriately?

Fixed, thanks for noticing.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-09-02 10:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-29 21:37 [PATCH] ide: Build fix for CONFIG_IDE_PROC_FS=n Elias Oltmanns
2008-08-30 11:19 ` Sergei Shtylyov
2008-08-30 11:22   ` Sergei Shtylyov
2008-08-30 16:23     ` Elias Oltmanns
2008-08-30 16:29       ` Sergei Shtylyov
2008-08-31 15:52 ` Bartlomiej Zolnierkiewicz
2008-09-01 22:52   ` Elias Oltmanns
2008-09-02 10:35     ` Bartlomiej Zolnierkiewicz

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).