linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux/hdsmart.h: fix goofups
@ 2008-02-17 17:07 Bartlomiej Zolnierkiewicz
  2008-02-17 17:17 ` Robert P. J. Day
  0 siblings, 1 reply; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-17 17:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Robert P. J. Day

Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
("<linux/hdsmart.h> is not used by kernel code").

Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 include/linux/hdsmart.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/include/linux/hdsmart.h
===================================================================
--- a/include/linux/hdsmart.h
+++ b/include/linux/hdsmart.h
@@ -17,7 +17,7 @@
 #ifndef _LINUX_HDSMART_H
 #define _LINUX_HDSMART_H
 
-#ifndef __KERNEL
+#ifndef __KERNEL__
 #define OFFLINE_FULL_SCAN		0
 #define SHORT_SELF_TEST			1
 #define EXTEND_SELF_TEST		2
@@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s {
 	unsigned char			resevered[2];
 	unsigned char			chksum;
 } __attribute__ ((packed)) ata_smart_selftestlog_t;
-#endif /* __KERNEL__ *
+#endif /* __KERNEL__ */
 
 #endif	/* _LINUX_HDSMART_H */

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

* Re: [PATCH] linux/hdsmart.h: fix goofups
  2008-02-17 17:07 [PATCH] linux/hdsmart.h: fix goofups Bartlomiej Zolnierkiewicz
@ 2008-02-17 17:17 ` Robert P. J. Day
  2008-02-17 17:40   ` Bartlomiej Zolnierkiewicz
  2008-02-18  5:06   ` [PATCH] linux/hdsmart.h: fix goofups Valdis.Kletnieks
  0 siblings, 2 replies; 10+ messages in thread
From: Robert P. J. Day @ 2008-02-17 17:17 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-kernel

On Sun, 17 Feb 2008, Bartlomiej Zolnierkiewicz wrote:

> Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
> ("<linux/hdsmart.h> is not used by kernel code").
>
> Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  include/linux/hdsmart.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: b/include/linux/hdsmart.h
> ===================================================================
> --- a/include/linux/hdsmart.h
> +++ b/include/linux/hdsmart.h
> @@ -17,7 +17,7 @@
>  #ifndef _LINUX_HDSMART_H
>  #define _LINUX_HDSMART_H
>
> -#ifndef __KERNEL
> +#ifndef __KERNEL__
>  #define OFFLINE_FULL_SCAN		0
>  #define SHORT_SELF_TEST			1
>  #define EXTEND_SELF_TEST		2
> @@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s {
>  	unsigned char			resevered[2];
>  	unsigned char			chksum;
>  } __attribute__ ((packed)) ata_smart_selftestlog_t;
> -#endif /* __KERNEL__ *
> +#endif /* __KERNEL__ */
>
>  #endif	/* _LINUX_HDSMART_H */

if that header file isn't used by any kernel code, why bother having a
check for __KERNEL__ in the first place?  it's being exported to
userspace unchecked:

  include/linux/Kbuild:header-y += hdsmart.h

so why not just toss that check entirely?  otherwise, you're going to
get a header file exported to userspace that has a superfluous
__KERNEL__ test in it.

rday
--


========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

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

* Re: [PATCH] linux/hdsmart.h: fix goofups
  2008-02-17 17:40   ` Bartlomiej Zolnierkiewicz
@ 2008-02-17 17:36     ` Adrian Bunk
  2008-02-17 18:04       ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 10+ messages in thread
From: Adrian Bunk @ 2008-02-17 17:36 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Robert P. J. Day, linux-kernel

On Sun, Feb 17, 2008 at 06:40:31PM +0100, Bartlomiej Zolnierkiewicz wrote:
> On Sunday 17 February 2008, Robert P. J. Day wrote:
> > On Sun, 17 Feb 2008, Bartlomiej Zolnierkiewicz wrote:
> > 
> > > Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
> > > ("<linux/hdsmart.h> is not used by kernel code").
> > >
> > > Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
> > > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > > ---
> > >  include/linux/hdsmart.h |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > Index: b/include/linux/hdsmart.h
> > > ===================================================================
> > > --- a/include/linux/hdsmart.h
> > > +++ b/include/linux/hdsmart.h
> > > @@ -17,7 +17,7 @@
> > >  #ifndef _LINUX_HDSMART_H
> > >  #define _LINUX_HDSMART_H
> > >
> > > -#ifndef __KERNEL
> > > +#ifndef __KERNEL__
> > >  #define OFFLINE_FULL_SCAN		0
> > >  #define SHORT_SELF_TEST			1
> > >  #define EXTEND_SELF_TEST		2
> > > @@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s {
> > >  	unsigned char			resevered[2];
> > >  	unsigned char			chksum;
> > >  } __attribute__ ((packed)) ata_smart_selftestlog_t;
> > > -#endif /* __KERNEL__ *
> > > +#endif /* __KERNEL__ */
> > >
> > >  #endif	/* _LINUX_HDSMART_H */
> > 
> > if that header file isn't used by any kernel code, why bother having a
> > check for __KERNEL__ in the first place?  it's being exported to
> > userspace unchecked:
> > 
> >   include/linux/Kbuild:header-y += hdsmart.h
> > 
> > so why not just toss that check entirely?  otherwise, you're going to
> > get a header file exported to userspace that has a superfluous
> > __KERNEL__ test in it.
> 
> We don't want new (accidental etc.) kernel users of this header. 
>...

Why can't we simply remove it?

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [PATCH] linux/hdsmart.h: fix goofups
  2008-02-17 17:17 ` Robert P. J. Day
@ 2008-02-17 17:40   ` Bartlomiej Zolnierkiewicz
  2008-02-17 17:36     ` Adrian Bunk
  2008-02-18  5:06   ` [PATCH] linux/hdsmart.h: fix goofups Valdis.Kletnieks
  1 sibling, 1 reply; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-17 17:40 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linux-kernel

On Sunday 17 February 2008, Robert P. J. Day wrote:
> On Sun, 17 Feb 2008, Bartlomiej Zolnierkiewicz wrote:
> 
> > Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
> > ("<linux/hdsmart.h> is not used by kernel code").
> >
> > Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > ---
> >  include/linux/hdsmart.h |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Index: b/include/linux/hdsmart.h
> > ===================================================================
> > --- a/include/linux/hdsmart.h
> > +++ b/include/linux/hdsmart.h
> > @@ -17,7 +17,7 @@
> >  #ifndef _LINUX_HDSMART_H
> >  #define _LINUX_HDSMART_H
> >
> > -#ifndef __KERNEL
> > +#ifndef __KERNEL__
> >  #define OFFLINE_FULL_SCAN		0
> >  #define SHORT_SELF_TEST			1
> >  #define EXTEND_SELF_TEST		2
> > @@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s {
> >  	unsigned char			resevered[2];
> >  	unsigned char			chksum;
> >  } __attribute__ ((packed)) ata_smart_selftestlog_t;
> > -#endif /* __KERNEL__ *
> > +#endif /* __KERNEL__ */
> >
> >  #endif	/* _LINUX_HDSMART_H */
> 
> if that header file isn't used by any kernel code, why bother having a
> check for __KERNEL__ in the first place?  it's being exported to
> userspace unchecked:
> 
>   include/linux/Kbuild:header-y += hdsmart.h
> 
> so why not just toss that check entirely?  otherwise, you're going to
> get a header file exported to userspace that has a superfluous
> __KERNEL__ test in it.

We don't want new (accidental etc.) kernel users of this header. 

How's about this version?

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] linux/hdsmart.h: fix goofups (take 2)

Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
("<linux/hdsmart.h> is not used by kernel code").

Also update include/linux/Kbuild to reflect the fact that hdsmart.h
uses __KERNEL__ ifdefs now.

Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 include/linux/Kbuild    |    2 +-
 include/linux/hdsmart.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Index: b/include/linux/Kbuild
===================================================================
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -70,7 +70,6 @@ header-y += fuse.h
 header-y += genetlink.h
 header-y += gen_stats.h
 header-y += gigaset_dev.h
-header-y += hdsmart.h
 header-y += hysdn_if.h
 header-y += i2o-dev.h
 header-y += i8k.h
@@ -211,6 +210,7 @@ unifdef-y += hayesesp.h
 unifdef-y += hdlcdrv.h
 unifdef-y += hdlc.h
 unifdef-y += hdreg.h
+unifdef-y += hdsmart.h
 unifdef-y += hiddev.h
 unifdef-y += hpet.h
 unifdef-y += i2c.h
Index: b/include/linux/hdsmart.h
===================================================================
--- a/include/linux/hdsmart.h
+++ b/include/linux/hdsmart.h
@@ -17,7 +17,7 @@
 #ifndef _LINUX_HDSMART_H
 #define _LINUX_HDSMART_H
 
-#ifndef __KERNEL
+#ifndef __KERNEL__
 #define OFFLINE_FULL_SCAN		0
 #define SHORT_SELF_TEST			1
 #define EXTEND_SELF_TEST		2
@@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s {
 	unsigned char			resevered[2];
 	unsigned char			chksum;
 } __attribute__ ((packed)) ata_smart_selftestlog_t;
-#endif /* __KERNEL__ *
+#endif /* __KERNEL__ */
 
 #endif	/* _LINUX_HDSMART_H */

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

* Re: [PATCH] linux/hdsmart.h: fix goofups
  2008-02-17 18:04       ` Bartlomiej Zolnierkiewicz
@ 2008-02-17 17:53         ` Robert P. J. Day
  2008-02-19 19:29         ` [2.6 patch] remove include/linux/hdsmart.h Adrian Bunk
  1 sibling, 0 replies; 10+ messages in thread
From: Robert P. J. Day @ 2008-02-17 17:53 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Adrian Bunk, linux-kernel

On Sun, 17 Feb 2008, Bartlomiej Zolnierkiewicz wrote:

> On Sunday 17 February 2008, Adrian Bunk wrote:
> > On Sun, Feb 17, 2008 at 06:40:31PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > > On Sunday 17 February 2008, Robert P. J. Day wrote:
> > > > On Sun, 17 Feb 2008, Bartlomiej Zolnierkiewicz wrote:
> > > >
> > > > > Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
> > > > > ("<linux/hdsmart.h> is not used by kernel code").
> > > > >
> > > > > Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
> > > > > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > > > > ---
> > > > >  include/linux/hdsmart.h |    4 ++--
> > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > > Index: b/include/linux/hdsmart.h
> > > > > ===================================================================
> > > > > --- a/include/linux/hdsmart.h
> > > > > +++ b/include/linux/hdsmart.h
> > > > > @@ -17,7 +17,7 @@
> > > > >  #ifndef _LINUX_HDSMART_H
> > > > >  #define _LINUX_HDSMART_H
> > > > >
> > > > > -#ifndef __KERNEL
> > > > > +#ifndef __KERNEL__
> > > > >  #define OFFLINE_FULL_SCAN		0
> > > > >  #define SHORT_SELF_TEST			1
> > > > >  #define EXTEND_SELF_TEST		2
> > > > > @@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s {
> > > > >  	unsigned char			resevered[2];
> > > > >  	unsigned char			chksum;
> > > > >  } __attribute__ ((packed)) ata_smart_selftestlog_t;
> > > > > -#endif /* __KERNEL__ *
> > > > > +#endif /* __KERNEL__ */
> > > > >
> > > > >  #endif	/* _LINUX_HDSMART_H */
> > > >
> > > > if that header file isn't used by any kernel code, why bother having a
> > > > check for __KERNEL__ in the first place?  it's being exported to
> > > > userspace unchecked:
> > > >
> > > >   include/linux/Kbuild:header-y += hdsmart.h
> > > >
> > > > so why not just toss that check entirely?  otherwise, you're going to
> > > > get a header file exported to userspace that has a superfluous
> > > > __KERNEL__ test in it.
> > >
> > > We don't want new (accidental etc.) kernel users of this header.
> > >...
> >
> > Why can't we simply remove it?
>
> If it is safe w.r.t. userspace then please do it.
>
> [ I don't know and I couldn't get an answer on LKML so... ]
>
> Thanks,
> Bart

i'll leave that decision in someone else's hands.  have fun.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

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

* Re: [PATCH] linux/hdsmart.h: fix goofups
  2008-02-17 17:36     ` Adrian Bunk
@ 2008-02-17 18:04       ` Bartlomiej Zolnierkiewicz
  2008-02-17 17:53         ` Robert P. J. Day
  2008-02-19 19:29         ` [2.6 patch] remove include/linux/hdsmart.h Adrian Bunk
  0 siblings, 2 replies; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-17 18:04 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Robert P. J. Day, linux-kernel

On Sunday 17 February 2008, Adrian Bunk wrote:
> On Sun, Feb 17, 2008 at 06:40:31PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > On Sunday 17 February 2008, Robert P. J. Day wrote:
> > > On Sun, 17 Feb 2008, Bartlomiej Zolnierkiewicz wrote:
> > > 
> > > > Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
> > > > ("<linux/hdsmart.h> is not used by kernel code").
> > > >
> > > > Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
> > > > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > > > ---
> > > >  include/linux/hdsmart.h |    4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > Index: b/include/linux/hdsmart.h
> > > > ===================================================================
> > > > --- a/include/linux/hdsmart.h
> > > > +++ b/include/linux/hdsmart.h
> > > > @@ -17,7 +17,7 @@
> > > >  #ifndef _LINUX_HDSMART_H
> > > >  #define _LINUX_HDSMART_H
> > > >
> > > > -#ifndef __KERNEL
> > > > +#ifndef __KERNEL__
> > > >  #define OFFLINE_FULL_SCAN		0
> > > >  #define SHORT_SELF_TEST			1
> > > >  #define EXTEND_SELF_TEST		2
> > > > @@ -121,6 +121,6 @@ typedef struct ata_smart_selftestlog_s {
> > > >  	unsigned char			resevered[2];
> > > >  	unsigned char			chksum;
> > > >  } __attribute__ ((packed)) ata_smart_selftestlog_t;
> > > > -#endif /* __KERNEL__ *
> > > > +#endif /* __KERNEL__ */
> > > >
> > > >  #endif	/* _LINUX_HDSMART_H */
> > > 
> > > if that header file isn't used by any kernel code, why bother having a
> > > check for __KERNEL__ in the first place?  it's being exported to
> > > userspace unchecked:
> > > 
> > >   include/linux/Kbuild:header-y += hdsmart.h
> > > 
> > > so why not just toss that check entirely?  otherwise, you're going to
> > > get a header file exported to userspace that has a superfluous
> > > __KERNEL__ test in it.
> > 
> > We don't want new (accidental etc.) kernel users of this header. 
> >...
> 
> Why can't we simply remove it?

If it is safe w.r.t. userspace then please do it.

[ I don't know and I couldn't get an answer on LKML so... ]

Thanks,
Bart

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

* Re: [PATCH] linux/hdsmart.h: fix goofups
  2008-02-17 17:17 ` Robert P. J. Day
  2008-02-17 17:40   ` Bartlomiej Zolnierkiewicz
@ 2008-02-18  5:06   ` Valdis.Kletnieks
  2008-02-18  9:50     ` Robert P. J. Day
  1 sibling, 1 reply; 10+ messages in thread
From: Valdis.Kletnieks @ 2008-02-18  5:06 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 615 bytes --]

On Sun, 17 Feb 2008 12:17:20 EST, "Robert P. J. Day" said:

> if that header file isn't used by any kernel code, why bother having a
> check for __KERNEL__ in the first place?  it's being exported to
> userspace unchecked:
> 
>   include/linux/Kbuild:header-y += hdsmart.h
> 
> so why not just toss that check entirely?  otherwise, you're going to
> get a header file exported to userspace that has a superfluous
> __KERNEL__ test in it.

Umm... if the kernel isn't using it, why are we bothering to export it to
userspace at all?  Or is the kernel using something *else* that should be going
to userspace instead?

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

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

* Re: [PATCH] linux/hdsmart.h: fix goofups
  2008-02-18  5:06   ` [PATCH] linux/hdsmart.h: fix goofups Valdis.Kletnieks
@ 2008-02-18  9:50     ` Robert P. J. Day
  0 siblings, 0 replies; 10+ messages in thread
From: Robert P. J. Day @ 2008-02-18  9:50 UTC (permalink / raw)
  To: Valdis.Kletnieks; +Cc: Bartlomiej Zolnierkiewicz, linux-kernel

On Mon, 18 Feb 2008, Valdis.Kletnieks@vt.edu wrote:

> On Sun, 17 Feb 2008 12:17:20 EST, "Robert P. J. Day" said:
>
> > if that header file isn't used by any kernel code, why bother having a
> > check for __KERNEL__ in the first place?  it's being exported to
> > userspace unchecked:
> >
> >   include/linux/Kbuild:header-y += hdsmart.h
> >
> > so why not just toss that check entirely?  otherwise, you're going to
> > get a header file exported to userspace that has a superfluous
> > __KERNEL__ test in it.
>
> Umm... if the kernel isn't using it, why are we bothering to export
> it to userspace at all?  Or is the kernel using something *else*
> that should be going to userspace instead?

beats me, i just observe 'em, i don't make those judgment calls.  :-)

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

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

* [2.6 patch] remove include/linux/hdsmart.h
  2008-02-17 18:04       ` Bartlomiej Zolnierkiewicz
  2008-02-17 17:53         ` Robert P. J. Day
@ 2008-02-19 19:29         ` Adrian Bunk
  2008-02-19 21:51           ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 10+ messages in thread
From: Adrian Bunk @ 2008-02-19 19:29 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Robert P. J. Day, linux-kernel

On Sun, Feb 17, 2008 at 07:04:51PM +0100, Bartlomiej Zolnierkiewicz wrote:
> On Sunday 17 February 2008, Adrian Bunk wrote:
> 
> > Why can't we simply remove it?
> 
> If it is safe w.r.t. userspace then please do it.
> 
> [ I don't know and I couldn't get an answer on LKML so... ]

The purpose of the kernel userapce headers is to contain the interfaces 
between the kernel and userspace.

If nothing in the kernel uses it there's not much value in keeping it.

Removal patch below.

> Thanks,
> Bart

cu
Adrian


<--  snip  -->


include/linux/hdsmart.h is not used by the kernel and should therefore 
be removed.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

 include/linux/Kbuild    |    1 
 include/linux/hdsmart.h |  126 ----------------------------------------
 2 files changed, 127 deletions(-)

a93fe7221c62dbe655e646321a0f1f276f4d05f2 diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index aada32f..0743c5e 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -210,7 +210,6 @@ unifdef-y += hayesesp.h
 unifdef-y += hdlcdrv.h
 unifdef-y += hdlc.h
 unifdef-y += hdreg.h
-unifdef-y += hdsmart.h
 unifdef-y += hiddev.h
 unifdef-y += hpet.h
 unifdef-y += i2c.h
diff --git a/include/linux/hdsmart.h b/include/linux/hdsmart.h
deleted file mode 100644
index 4f4faf9..0000000
--- a/include/linux/hdsmart.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * linux/include/linux/hdsmart.h
- *
- * Copyright (C) 1999-2000	Michael Cornwell <cornwell@acm.org>
- * Copyright (C) 2000		Andre Hedrick <andre@linux-ide.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * You should have received a copy of the GNU General Public License
- * (for example /usr/src/linux/COPYING); if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _LINUX_HDSMART_H
-#define _LINUX_HDSMART_H
-
-#ifndef __KERNEL__
-#define OFFLINE_FULL_SCAN		0
-#define SHORT_SELF_TEST			1
-#define EXTEND_SELF_TEST		2
-#define SHORT_CAPTIVE_SELF_TEST		129
-#define EXTEND_CAPTIVE_SELF_TEST	130
-
-/* smart_attribute is the vendor specific in SFF-8035 spec */
-typedef struct ata_smart_attribute_s {
-	unsigned char			id;
-	unsigned short			status_flag;
-	unsigned char			normalized;
-	unsigned char			worse_normal;
-	unsigned char			raw[6];
-	unsigned char			reserv;
-} __attribute__ ((packed)) ata_smart_attribute_t;
-
-/* smart_values is format of the read drive Atrribute command */
-typedef struct ata_smart_values_s {
-	unsigned short			revnumber;
-	ata_smart_attribute_t		vendor_attributes [30];
-        unsigned char			offline_data_collection_status;
-        unsigned char			self_test_exec_status;
-	unsigned short			total_time_to_complete_off_line;
-	unsigned char			vendor_specific_366;
-	unsigned char			offline_data_collection_capability;
-	unsigned short			smart_capability;
-	unsigned char			errorlog_capability;
-	unsigned char			vendor_specific_371;
-	unsigned char			short_test_completion_time;
-	unsigned char			extend_test_completion_time;
-	unsigned char			reserved_374_385 [12];
-	unsigned char			vendor_specific_386_509 [125];
-	unsigned char			chksum;
-} __attribute__ ((packed)) ata_smart_values_t;
-
-/* Smart Threshold data structures */
-/* Vendor attribute of SMART Threshold */
-typedef struct ata_smart_threshold_entry_s {
-	unsigned char			id;
-	unsigned char			normalized_threshold;
-	unsigned char			reserved[10];
-} __attribute__ ((packed)) ata_smart_threshold_entry_t;
-
-/* Format of Read SMART THreshold Command */
-typedef struct ata_smart_thresholds_s {
-	unsigned short			revnumber;
-	ata_smart_threshold_entry_t	thres_entries[30];
-	unsigned char			reserved[149];
-	unsigned char			chksum;
-} __attribute__ ((packed)) ata_smart_thresholds_t;
-
-typedef struct ata_smart_errorlog_command_struct_s {
-	unsigned char			devicecontrolreg;
-	unsigned char			featuresreg;
-	unsigned char			sector_count;
-	unsigned char			sector_number;
-	unsigned char			cylinder_low;
-	unsigned char			cylinder_high;
-	unsigned char			drive_head;
-	unsigned char			commandreg;
-	unsigned int			timestamp;
-} __attribute__ ((packed)) ata_smart_errorlog_command_struct_t;
-
-typedef struct ata_smart_errorlog_error_struct_s {
-	unsigned char			error_condition;
-	unsigned char			extended_error[14];
-	unsigned char			state;
-	unsigned short			timestamp;
-} __attribute__ ((packed)) ata_smart_errorlog_error_struct_t;
-
-typedef struct ata_smart_errorlog_struct_s {
-	ata_smart_errorlog_command_struct_t	commands[6];
-	ata_smart_errorlog_error_struct_t	error_struct;
-} __attribute__ ((packed)) ata_smart_errorlog_struct_t;
-
-typedef struct ata_smart_errorlog_s {
-	unsigned char			revnumber;
-	unsigned char			error_log_pointer;
-	ata_smart_errorlog_struct_t	errorlog_struct[5];
-	unsigned short			ata_error_count;
-	unsigned short			non_fatal_count;
-	unsigned short			drive_timeout_count;
-	unsigned char			reserved[53];
-	unsigned char			chksum;
-} __attribute__ ((packed)) ata_smart_errorlog_t;
-
-typedef struct ata_smart_selftestlog_struct_s {
-	unsigned char			selftestnumber;
-	unsigned char			selfteststatus;
-	unsigned short			timestamp;
-	unsigned char			selftestfailurecheckpoint;
-	unsigned int			lbafirstfailure;
-	unsigned char			vendorspecific[15];
-} __attribute__ ((packed)) ata_smart_selftestlog_struct_t;
-
-typedef struct ata_smart_selftestlog_s {
-	unsigned short			revnumber;
-	ata_smart_selftestlog_struct_t	selftest_struct[21];
-	unsigned char			vendorspecific[2];
-	unsigned char			mostrecenttest;
-	unsigned char			resevered[2];
-	unsigned char			chksum;
-} __attribute__ ((packed)) ata_smart_selftestlog_t;
-#endif /* __KERNEL__ */
-
-#endif	/* _LINUX_HDSMART_H */


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

* Re: [2.6 patch] remove include/linux/hdsmart.h
  2008-02-19 19:29         ` [2.6 patch] remove include/linux/hdsmart.h Adrian Bunk
@ 2008-02-19 21:51           ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-19 21:51 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Robert P. J. Day, linux-kernel

On Tuesday 19 February 2008, Adrian Bunk wrote:
> On Sun, Feb 17, 2008 at 07:04:51PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > On Sunday 17 February 2008, Adrian Bunk wrote:
> > 
> > > Why can't we simply remove it?
> > 
> > If it is safe w.r.t. userspace then please do it.
> > 
> > [ I don't know and I couldn't get an answer on LKML so... ]
> 
> The purpose of the kernel userapce headers is to contain the interfaces 
> between the kernel and userspace.
> 
> If nothing in the kernel uses it there's not much value in keeping it.
> 
> Removal patch below.
> 
> > Thanks,
> > Bart
> 
> cu
> Adrian
> 
> 
> <--  snip  -->
> 
> 
> include/linux/hdsmart.h is not used by the kernel and should therefore 
> be removed.
> 
> Signed-off-by: Adrian Bunk <bunk@kernel.org>

applied

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

end of thread, other threads:[~2008-02-19 22:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-17 17:07 [PATCH] linux/hdsmart.h: fix goofups Bartlomiej Zolnierkiewicz
2008-02-17 17:17 ` Robert P. J. Day
2008-02-17 17:40   ` Bartlomiej Zolnierkiewicz
2008-02-17 17:36     ` Adrian Bunk
2008-02-17 18:04       ` Bartlomiej Zolnierkiewicz
2008-02-17 17:53         ` Robert P. J. Day
2008-02-19 19:29         ` [2.6 patch] remove include/linux/hdsmart.h Adrian Bunk
2008-02-19 21:51           ` Bartlomiej Zolnierkiewicz
2008-02-18  5:06   ` [PATCH] linux/hdsmart.h: fix goofups Valdis.Kletnieks
2008-02-18  9:50     ` Robert P. J. Day

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