2006-11-12 17:20:59

by Burman Yan

[permalink] [raw]
Subject: [PATH] Replace kmalloc+memset with kzalloc 1/17

Hi.

This is the first part of the patches I made that do trivial change of
replacing
kmalloc and memset with kzalloc

Yan Burman

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Attachments:
kzalloc_acpi.patch (21.40 kB)

2006-11-12 17:31:11

by Russell King

[permalink] [raw]
Subject: Re: [PATH] Replace kmalloc+memset with kzalloc 1/17

On Sun, Nov 12, 2006 at 07:20:53PM +0200, Burman Yan wrote:
> This is the first part of the patches I made that do trivial change of
> replacing
> kmalloc and memset with kzalloc

Please follow the guidelines in SubmittingPatches in the kernel source
when sending patches out. You must not expect everyone here to read
each of the attachments in your messages in detail to work out whether
they need to do something with it or not.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2006-11-12 18:29:52

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATH] Replace kmalloc+memset with kzalloc 1/17

On Sun, 12 Nov 2006 17:31:03 +0000 Russell King wrote:

> On Sun, Nov 12, 2006 at 07:20:53PM +0200, Burman Yan wrote:
> > This is the first part of the patches I made that do trivial change of
> > replacing
> > kmalloc and memset with kzalloc
>
> Please follow the guidelines in SubmittingPatches in the kernel source
> when sending patches out. You must not expect everyone here to read
> each of the attachments in your messages in detail to work out whether
> they need to do something with it or not.

You should also use a different subject for each one,
something that is related to the subsystem being patched,
e.g., [PATCH] scsi: use kzalloc

Besides Documentation/SubmittingPatches, please also read
http://linux.yyz.us/patch-format.html
and http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt

---
~Randy

2006-11-12 19:36:14

by Burman Yan

[permalink] [raw]
Subject: Re: [PATH] Replace kmalloc+memset with kzalloc 1/17


OK.
Sorry.

I had to attach the patch, since hotmail does line wrapping, but I will note
the part regarding
the more descriptive subject.

Also, some of the patches are one line per file, so I joined them together
in one single patch.
I thought that splitting that into many tiny patches will actually be more
annoying than
a single bigger patch.

Does that mean I should send those patches again?

>From: Russell King <[email protected]>
>To: Burman Yan <[email protected]>
>CC: [email protected], [email protected]
>Subject: Re: [PATH] Replace kmalloc+memset with kzalloc 1/17
>Date: Sun, 12 Nov 2006 17:31:03 +0000
>
>On Sun, Nov 12, 2006 at 07:20:53PM +0200, Burman Yan wrote:
> > This is the first part of the patches I made that do trivial change of
> > replacing
> > kmalloc and memset with kzalloc
>
>Please follow the guidelines in SubmittingPatches in the kernel source
>when sending patches out. You must not expect everyone here to read
>each of the attachments in your messages in detail to work out whether
>they need to do something with it or not.
>
>--
>Russell King
> Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
> maintainer of: 2.6 Serial core

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

2006-11-12 21:43:48

by Jan Engelhardt

[permalink] [raw]
Subject: Re: [PATH] Replace kmalloc+memset with kzalloc 1/17

>> > This is the first part of the patches I made that do trivial change of
>> > replacing
>> > kmalloc and memset with kzalloc
>>
>> Please follow the guidelines in SubmittingPatches in the kernel source
>> when sending patches out. You must not expect everyone here to read
>> each of the attachments in your messages in detail to work out whether
>> they need to do something with it or not.
>
>You should also use a different subject for each one,


And if possible, attach it using a text/plain mime type or text/x-patch
instead of application/octet-stream. Because if it's octet-stream, PINE
won't let me view it in an instant (gotta export it first).


-`J'
--

2006-11-13 12:51:49

by Paulo Marques

[permalink] [raw]
Subject: Re: [PATH] Replace kmalloc+memset with kzalloc 1/17

Burman Yan wrote:
> OK.
> Sorry.
>
> I had to attach the patch, since hotmail does line wrapping, but I will
> note the part regarding
> the more descriptive subject.

Hotmail is probably the _worse_ email client you could use to send
patches to the kernel.

> Also, some of the patches are one line per file, so I joined them
> together in one single patch.
> I thought that splitting that into many tiny patches will actually be
> more annoying than
> a single bigger patch.

The logical separation you did isn't bad, but there is no mention on the
*subject line* what section is targeted by your patch.

Also you should CC the maintainer for each section you're targeting. For
instance, for the ACPI patch you should also CC Len Brown. Check the
MAINTAINERS file for the right people to CC on each patch.

> Does that mean I should send those patches again?

Afraid so.

While you're at it, you could remove casts like this one:

- pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
+ pathname = (char *)kzalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if (!pathname)
return -ENOMEM;
- memset(pathname, 0, ACPI_PATHNAME_MAX);

That "(char *)" really isn't needed.

Oh, and just one more thing: don't top post.

--
Paulo Marques - http://www.grupopie.com

"The face of a child can say it all, especially the
mouth part of the face."