Re: [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl II

2008-01-08 Thread Andi Kleen
> [EMAIL PROTECTED]:~/linux-2.6/mm$ grep "struct file_operations" *
> shmem.c:static const struct file_operations shmem_file_operations;
> shmem.c:static const struct file_operations shmem_file_operations = {
> swapfile.c:static const struct file_operations proc_swaps_operations = {
> 
> Am I right in saying that both the files don't need to be modified?

If they don't have an ioctl handler they don't need to be modified, correct.

> 
> There is nothing like:
> struct file_operations xyz_ops = {
>...
>.ioctl = xyz_ioctl
> };
> 
> in there.
> 
> So I guess I need a smarter trick to find out which files need to be modified
> as you previously suggested.

grep -P '\.ioctl.*=' $(grep -rl 'struct file_operations' * )

should work. There are also special multiline greps iirc that might also be able
to do this better (like sgrep)

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl II

2008-01-08 Thread Paolo Ciarrocchi
On Jan 9, 2008 12:06 AM, Andi Kleen <[EMAIL PROTECTED]> wrote:
> > I would suggest to only work on files that compile. e.g. do a
> >
> > make allyesconfig
> > make -j$[$(grep -c processor /proc/cpuinfo)*2] &1 |tee LOG 
> > (will probably take a long time)
> >
> > first and then only modify files when are mentioned in "LOG"
>
> Actually since this will probably take very long on a slower machine you can 
> refer to
>
> http://halobates.de/allyes/

Thank you Andi.

> for some allyes buildlogs of recent kernels for i386 and x86-64. A trick to 
> quickly check
> if something compiles is also to do
>
> make allyesconfig
> make path/to/file.o
>
> That won't catch linker errors, but if you don't have warnings there are 
> normally no
> linker errors either.

I did grep for "struct file_operations" in mm:

[EMAIL PROTECTED]:~/linux-2.6/mm$ grep "struct file_operations" *
shmem.c:static const struct file_operations shmem_file_operations;
shmem.c:static const struct file_operations shmem_file_operations = {
swapfile.c:static const struct file_operations proc_swaps_operations = {

Am I right in saying that both the files don't need to be modified?

There is nothing like:
struct file_operations xyz_ops = {
   ...
   .ioctl = xyz_ioctl
};

in there.

So I guess I need a smarter trick to find out which files need to be modified
as you previously suggested.

Ciao,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [JANITOR PROPOSAL] Switch ioctl functions to ->unlocked_ioctl II

2008-01-08 Thread Andi Kleen
> I would suggest to only work on files that compile. e.g. do a
> 
> make allyesconfig
> make -j$[$(grep -c processor /proc/cpuinfo)*2] &1 |tee LOG (will 
> probably take a long time) 
>
> first and then only modify files when are mentioned in "LOG" 

Actually since this will probably take very long on a slower machine you can 
refer to 

http://halobates.de/allyes/

for some allyes buildlogs of recent kernels for i386 and x86-64. A trick to 
quickly check
if something compiles is also to do

make allyesconfig
make path/to/file.o 

That won't catch linker errors, but if you don't have warnings there are 
normally no
linker errors either.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [JANITOR PROPOSAL] Switch ioctl functions to -unlocked_ioctl II

2008-01-08 Thread Paolo Ciarrocchi
On Jan 9, 2008 12:06 AM, Andi Kleen [EMAIL PROTECTED] wrote:
  I would suggest to only work on files that compile. e.g. do a
 
  make allyesconfig
  make -j$[$(grep -c processor /proc/cpuinfo)*2] 1 |tee LOG 
  (will probably take a long time)
 
  first and then only modify files when are mentioned in LOG

 Actually since this will probably take very long on a slower machine you can 
 refer to

 http://halobates.de/allyes/

Thank you Andi.

 for some allyes buildlogs of recent kernels for i386 and x86-64. A trick to 
 quickly check
 if something compiles is also to do

 make allyesconfig
 make path/to/file.o

 That won't catch linker errors, but if you don't have warnings there are 
 normally no
 linker errors either.

I did grep for struct file_operations in mm:

[EMAIL PROTECTED]:~/linux-2.6/mm$ grep struct file_operations *
shmem.c:static const struct file_operations shmem_file_operations;
shmem.c:static const struct file_operations shmem_file_operations = {
swapfile.c:static const struct file_operations proc_swaps_operations = {

Am I right in saying that both the files don't need to be modified?

There is nothing like:
struct file_operations xyz_ops = {
   ...
   .ioctl = xyz_ioctl
};

in there.

So I guess I need a smarter trick to find out which files need to be modified
as you previously suggested.

Ciao,
-- 
Paolo
http://paolo.ciarrocchi.googlepages.com/
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [JANITOR PROPOSAL] Switch ioctl functions to -unlocked_ioctl II

2008-01-08 Thread Andi Kleen
 I would suggest to only work on files that compile. e.g. do a
 
 make allyesconfig
 make -j$[$(grep -c processor /proc/cpuinfo)*2] 1 |tee LOG (will 
 probably take a long time) 

 first and then only modify files when are mentioned in LOG 

Actually since this will probably take very long on a slower machine you can 
refer to 

http://halobates.de/allyes/

for some allyes buildlogs of recent kernels for i386 and x86-64. A trick to 
quickly check
if something compiles is also to do

make allyesconfig
make path/to/file.o 

That won't catch linker errors, but if you don't have warnings there are 
normally no
linker errors either.

-Andi
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [JANITOR PROPOSAL] Switch ioctl functions to -unlocked_ioctl II

2008-01-08 Thread Andi Kleen
 [EMAIL PROTECTED]:~/linux-2.6/mm$ grep struct file_operations *
 shmem.c:static const struct file_operations shmem_file_operations;
 shmem.c:static const struct file_operations shmem_file_operations = {
 swapfile.c:static const struct file_operations proc_swaps_operations = {
 
 Am I right in saying that both the files don't need to be modified?

If they don't have an ioctl handler they don't need to be modified, correct.

 
 There is nothing like:
 struct file_operations xyz_ops = {
...
.ioctl = xyz_ioctl
 };
 
 in there.
 
 So I guess I need a smarter trick to find out which files need to be modified
 as you previously suggested.

grep -P '\.ioctl.*=' $(grep -rl 'struct file_operations' * )

should work. There are also special multiline greps iirc that might also be able
to do this better (like sgrep)

-Andi
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/