* How to create patch for checkpatch.pl cleanups
[not found] ` <4F2EED9F.3020803@gmail.com>
@ 2012-02-05 21:00 ` kashyap gada
2012-02-05 21:07 ` How to use /proc Surenkumar Nihalani
2012-02-05 21:10 ` How to create patch for checkpatch.pl cleanups Daniel Baluta
0 siblings, 2 replies; 11+ messages in thread
From: kashyap gada @ 2012-02-05 21:00 UTC (permalink / raw)
To: kernelnewbies
Hello Linux Newbies, I'm one too.
I was looking out for some clean up work and I ran the checkpatch.pl
script. I came across a file with some 400 errors and 200 warnings. Now
there were bunch of 80 char per line warning , braces and related
things. I don't want to be sending patches for each and every error or
warning I fix as it becomes tedious and If i send lots of correction
patches in one go the kernel maintainers wont accept it. I want to know
Can we correct all similar errors or warnings in one patch? or series of
patches?
Kashyap Gada gada.kashyap at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120206/414fe5bb/attachment.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to use /proc
2012-02-05 21:00 ` How to create patch for checkpatch.pl cleanups kashyap gada
@ 2012-02-05 21:07 ` Surenkumar Nihalani
2012-02-05 21:20 ` Daniel Baluta
2012-02-05 21:10 ` How to create patch for checkpatch.pl cleanups Daniel Baluta
1 sibling, 1 reply; 11+ messages in thread
From: Surenkumar Nihalani @ 2012-02-05 21:07 UTC (permalink / raw)
To: kernelnewbies
Hello Guys,
I am CS student trying to write a kernel module as a part of my class assignment. I wanted to know, from within kernel, how do I read and write data to my proc file?
I need to store state from last call of my function.
Thanks,
Suren Nihalani.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120205/445fe425/attachment.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to create patch for checkpatch.pl cleanups
2012-02-05 21:00 ` How to create patch for checkpatch.pl cleanups kashyap gada
2012-02-05 21:07 ` How to use /proc Surenkumar Nihalani
@ 2012-02-05 21:10 ` Daniel Baluta
2012-02-05 22:51 ` Greg KH
1 sibling, 1 reply; 11+ messages in thread
From: Daniel Baluta @ 2012-02-05 21:10 UTC (permalink / raw)
To: kernelnewbies
On Sun, Feb 5, 2012 at 11:00 PM, kashyap gada <kashyapgada@yahoo.com> wrote:
> Hello Linux Newbies, I'm one too. I was looking out for some clean up work
> and I ran the checkpatch.pl script. I came across a file with some 400
> errors and 200 warnings. Now there were bunch of 80 char per line warning ,
> braces and related things. I don't want to be sending patches for each and
> every error or warning I fix as it becomes tedious and If i send lots of
> correction patches in one go the kernel maintainers wont accept it. I want
> to know Can we correct all similar errors or warnings in one patch? or
> series of patches?
Regarding 80 chars per line issues, people are discussing right now
on increasing the limit to 100. See [1].
For the other issues, just send a patch with all the changes. It should
be fine since you are modifying one single file.
thanks,
Daniel.
[1] https://lkml.org/lkml/2012/2/5/141
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to use /proc
2012-02-05 21:07 ` How to use /proc Surenkumar Nihalani
@ 2012-02-05 21:20 ` Daniel Baluta
2012-02-05 22:14 ` Surenkumar Nihalani
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Baluta @ 2012-02-05 21:20 UTC (permalink / raw)
To: kernelnewbies
On Sun, Feb 5, 2012 at 11:07 PM, Surenkumar Nihalani <suren@gatech.edu> wrote:
> Hello Guys,
>
> I am CS student trying to write a kernel module as a part of my class
> assignment. I wanted to know, from within kernel, how do I read and write
> data to my proc file?
> I need to store state from last call of my function.
Hello,
Have you tried searching on the internet? :D [1].
Another approach is to see how an existing proc
entry is handled. Look for example at /proc/sched_debug [2].
thanks,
Daniel.
[1] http://www.ibm.com/developerworks/linux/library/l-proc/index.html
[2] http://lxr.linux.no/linux+v3.2.4/kernel/sched_debug.c#L393
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to use /proc
2012-02-05 21:20 ` Daniel Baluta
@ 2012-02-05 22:14 ` Surenkumar Nihalani
2012-02-05 22:37 ` Anuz Pratap Singh Tomar
2012-02-05 22:52 ` Greg KH
0 siblings, 2 replies; 11+ messages in thread
From: Surenkumar Nihalani @ 2012-02-05 22:14 UTC (permalink / raw)
To: kernelnewbies
Hey Daniel,
Thanks for the quick reply.
The IBM tutorial helps me writing the function for handling user reads and writes to your corresponding proc file. It doesn't help in terms of opening
and writing from the kernel side.
the example you provided just creates a proc entry. It doesn't tell me how to write to it.
Please help.
Thanks,
Suren Nihalani.
----- Original Message -----
From: "Daniel Baluta" <daniel.baluta@gmail.com>
To: "Surenkumar Nihalani" <suren@gatech.edu>
Cc: Kernelnewbies at kernelnewbies.org
Sent: Sunday, February 5, 2012 4:20:28 PM
Subject: Re: How to use /proc
On Sun, Feb 5, 2012 at 11:07 PM, Surenkumar Nihalani <suren@gatech.edu> wrote:
> Hello Guys,
>
> I am CS student trying to write a kernel module as a part of my class
> assignment. I wanted to know, from within kernel, how do I read and write
> data to my proc file?
> I need to store state from last call of my function.
Hello,
Have you tried searching on the internet? :D [1].
Another approach is to see how an existing proc
entry is handled. Look for example at /proc/sched_debug [2].
thanks,
Daniel.
[1] http://www.ibm.com/developerworks/linux/library/l-proc/index.html
[2] http://lxr.linux.no/linux+v3.2.4/kernel/sched_debug.c#L393
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to use /proc
2012-02-05 22:14 ` Surenkumar Nihalani
@ 2012-02-05 22:37 ` Anuz Pratap Singh Tomar
2012-02-05 22:52 ` Greg KH
1 sibling, 0 replies; 11+ messages in thread
From: Anuz Pratap Singh Tomar @ 2012-02-05 22:37 UTC (permalink / raw)
To: kernelnewbies
Read LDD, there are plenty of examples on using proc interface.
On Sun, Feb 5, 2012 at 10:14 PM, Surenkumar Nihalani <suren@gatech.edu>wrote:
> Hey Daniel,
>
> Thanks for the quick reply.
>
> The IBM tutorial helps me writing the function for handling user reads and
> writes to your corresponding proc file. It doesn't help in terms of opening
> and writing from the kernel side.
> the example you provided just creates a proc entry. It doesn't tell me how
> to write to it.
>
> Please help.
>
> Thanks,
> Suren Nihalani.
>
> ----- Original Message -----
> From: "Daniel Baluta" <daniel.baluta@gmail.com>
> To: "Surenkumar Nihalani" <suren@gatech.edu>
> Cc: Kernelnewbies at kernelnewbies.org
> Sent: Sunday, February 5, 2012 4:20:28 PM
> Subject: Re: How to use /proc
>
> On Sun, Feb 5, 2012 at 11:07 PM, Surenkumar Nihalani <suren@gatech.edu>
> wrote:
> > Hello Guys,
> >
> > I am CS student trying to write a kernel module as a part of my class
> > assignment. I wanted to know, from within kernel, how do I read and write
> > data to my proc file?
> > I need to store state from last call of my function.
>
> Hello,
>
> Have you tried searching on the internet? :D [1].
>
> Another approach is to see how an existing proc
> entry is handled. Look for example at /proc/sched_debug [2].
>
> thanks,
> Daniel.
>
> [1] http://www.ibm.com/developerworks/linux/library/l-proc/index.html
> [2] http://lxr.linux.no/linux+v3.2.4/kernel/sched_debug.c#L393
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120205/457c07c2/attachment.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to create patch for checkpatch.pl cleanups
2012-02-05 21:10 ` How to create patch for checkpatch.pl cleanups Daniel Baluta
@ 2012-02-05 22:51 ` Greg KH
2012-02-05 23:26 ` kashyap gada
0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2012-02-05 22:51 UTC (permalink / raw)
To: kernelnewbies
On Sun, Feb 05, 2012 at 11:10:29PM +0200, Daniel Baluta wrote:
> On Sun, Feb 5, 2012 at 11:00 PM, kashyap gada <kashyapgada@yahoo.com> wrote:
> > Hello Linux Newbies, I'm one too. I was looking out for some clean up work
> > and I ran the checkpatch.pl script. I came across a file with some 400
> > errors and 200 warnings. Now there were bunch of 80 char per line warning ,
> > braces and related things. I don't want to be sending patches for each and
> > every error or warning I fix as it becomes tedious and If i send lots of
> > correction patches in one go the kernel maintainers wont accept it. I want
> > to know Can we correct all similar errors or warnings in one patch? or
> > series of patches?
>
> Regarding 80 chars per line issues, people are discussing right now
> on increasing the limit to 100. See [1].
>
> For the other issues, just send a patch with all the changes. It should
> be fine since you are modifying one single file.
No, please break it up into "one thing per patch" to make it easy to
review, otherwise it will be ignored and/or rejected.
Also realize that a lot of subsystem maintainers do not like these types
of patches, outside of the drivers/staging/ area, so you might want to
ask the subsystem developers if they will take this type of work before
you do it.
greg k-h
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to use /proc
2012-02-05 22:14 ` Surenkumar Nihalani
2012-02-05 22:37 ` Anuz Pratap Singh Tomar
@ 2012-02-05 22:52 ` Greg KH
1 sibling, 0 replies; 11+ messages in thread
From: Greg KH @ 2012-02-05 22:52 UTC (permalink / raw)
To: kernelnewbies
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
On Sun, Feb 05, 2012 at 05:14:02PM -0500, Surenkumar Nihalani wrote:
> Hey Daniel,
>
> Thanks for the quick reply.
>
> The IBM tutorial helps me writing the function for handling user reads
> and writes to your corresponding proc file. It doesn't help in terms
> of opening and writing from the kernel side. the example you provided
> just creates a proc entry. It doesn't tell me how to write to it.
You do not write/read proc files from within the kernel, that makes no
sense. This is a virtual file, just modify the value that the file is
showing.
And please, never create new proc files, unless it really is for process
information, use debugfs for "playing around" type things, that is what
it is there for.
greg k-h
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to create patch for checkpatch.pl cleanups
2012-02-05 22:51 ` Greg KH
@ 2012-02-05 23:26 ` kashyap gada
2012-02-06 1:22 ` Greg KH
2012-02-06 11:56 ` Bernd Petrovitsch
0 siblings, 2 replies; 11+ messages in thread
From: kashyap gada @ 2012-02-05 23:26 UTC (permalink / raw)
To: kernelnewbies
By one thing per patch you mean that I can correct say for example all the 80 char per line warnings in a single file as a patch?
Kashyap Gada
________________________________
From: Greg KH <greg@kroah.com>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: kashyap gada <kashyapgada@yahoo.com>; "kernelnewbies at kernelnewbies.org" <kernelnewbies@kernelnewbies.org>
Sent: Sunday, 5 February 2012 10:51 PM
Subject: Re: How to create patch for checkpatch.pl cleanups
On Sun, Feb 05, 2012 at 11:10:29PM +0200, Daniel Baluta wrote:
> On Sun, Feb 5, 2012 at 11:00 PM, kashyap gada <kashyapgada@yahoo.com> wrote:
> > Hello Linux Newbies, I'm one too. I was looking out for some clean up work
> > and I ran the checkpatch.pl script. I came across a file with some 400
> > errors and 200 warnings. Now there were bunch of 80 char per line warning ,
> > braces and related things. I don't want to be sending patches for each and
> > every error or warning I fix as it becomes tedious and If i send lots of
> > correction patches in one go the kernel maintainers wont accept it. I want
> > to know Can we correct all similar errors or warnings in one patch? or
> > series of patches?
>
> Regarding 80 chars per line issues, people are discussing right now
> on increasing the limit to 100. See [1].
>
> For the other issues, just send a patch with all the changes. It should
> be fine since you are modifying one single file.
No, please break it up into "one thing per patch" to make it easy to
review, otherwise it will be ignored and/or rejected.
Also realize that a lot of subsystem maintainers do not like these types
of patches, outside of the drivers/staging/ area, so you might want to
ask the subsystem developers if they will take this type of work before
you do it.
greg k-h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120206/cf27f85d/attachment-0001.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to create patch for checkpatch.pl cleanups
2012-02-05 23:26 ` kashyap gada
@ 2012-02-06 1:22 ` Greg KH
2012-02-06 11:56 ` Bernd Petrovitsch
1 sibling, 0 replies; 11+ messages in thread
From: Greg KH @ 2012-02-06 1:22 UTC (permalink / raw)
To: kernelnewbies
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
On Mon, Feb 06, 2012 at 04:56:40AM +0530, kashyap gada wrote:
> By one thing per patch you mean that I can correct say for example all the 80
> char per line warnings in a single file as a patch?
Yes.
^ permalink raw reply [flat|nested] 11+ messages in thread
* How to create patch for checkpatch.pl cleanups
2012-02-05 23:26 ` kashyap gada
2012-02-06 1:22 ` Greg KH
@ 2012-02-06 11:56 ` Bernd Petrovitsch
1 sibling, 0 replies; 11+ messages in thread
From: Bernd Petrovitsch @ 2012-02-06 11:56 UTC (permalink / raw)
To: kernelnewbies
On Mon, 2012-02-06 at 04:56 +0530, kashyap gada wrote:
> By one thing per patch you mean that I can correct say for example all
> the 80 char per line warnings in a single file as a patch?
For beginners, don't even try to work on these warnings - it is far more
important to keep the source easily readable (even if these rule is
broken) than to adhere some formatting rules.
[ Full-quote deleted ]
Bernd
--
Bernd Petrovitsch Email : bernd at petrovitsch.priv.at
LUGA : http://www.luga.at
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-02-06 11:56 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4F2EEC4D.8040403@gmail.com>
[not found] ` <4F2EED9F.3020803@gmail.com>
2012-02-05 21:00 ` How to create patch for checkpatch.pl cleanups kashyap gada
2012-02-05 21:07 ` How to use /proc Surenkumar Nihalani
2012-02-05 21:20 ` Daniel Baluta
2012-02-05 22:14 ` Surenkumar Nihalani
2012-02-05 22:37 ` Anuz Pratap Singh Tomar
2012-02-05 22:52 ` Greg KH
2012-02-05 21:10 ` How to create patch for checkpatch.pl cleanups Daniel Baluta
2012-02-05 22:51 ` Greg KH
2012-02-05 23:26 ` kashyap gada
2012-02-06 1:22 ` Greg KH
2012-02-06 11:56 ` Bernd Petrovitsch
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).