Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Robert P. J. Day
On Sat, 6 Jan 2007, Ahmed S. Darwish wrote: > > On Fri, Jan 05, 2007 at 09:10:01AM +0100, rday wrote: > > > Ahmed S. Darwish wrote: > > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> > > > > rday > > > > p.s. just FYI, i have a p

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Ahmed S. Darwish
> On Fri, Jan 05, 2007 at 09:10:01AM +0100, rday wrote: > > Ahmed S. Darwish wrote: > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> > > rday > > p.s. just FYI, i have a patch that does most of this, but i was going > to hold off s

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Rolf Eike Beer
Am Freitag, 5. Januar 2007 11:32 schrieb Ahmed S. Darwish: > On Fri, Jan 05, 2007 at 11:26:07AM +0100, Rolf Eike Beer wrote: > > One big patch for the whole kernel will not work anyway. You have to > > split it up to allow subsystems to integrate them in their own trees. > > With one big patch you

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Ahmed S. Darwish
On Fri, Jan 05, 2007 at 10:51:13AM +, Alan wrote: > Ahmed - if you can send me a patch for the tty_io/tty_ioctl code which > switches to kzalloc where it makes sense and removes un-needed casts I'll > review it and push the bits that look sane upstream. > > Alan OK I'll try this now. Are yo

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Robert P. J. Day
On Fri, 5 Jan 2007, Alan wrote: > > represents a kmalloc->kzalloc cleanup (there's lots of those), and > > also see if you can replace one of these: > > > > sizeof(struct blah) > > > > with one of these: > > > > sizeof(*blahptr) > > Patches that do this will get rejected by the tty maintainer

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Alan
> represents a kmalloc->kzalloc cleanup (there's lots of those), and > also see if you can replace one of these: > > sizeof(struct blah) > > with one of these: > > sizeof(*blahptr) Patches that do this will get rejected by the tty maintainer in favour of the clarity of the sizeof(struct xyz

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Pekka Enberg
On 1/5/07, Robert P. J. Day <[EMAIL PROTECTED]> wrote: in this case, as mr. beer suggests, you should also check if this represents a kmalloc->kzalloc cleanup (there's lots of those), and also see if you can replace one of these: sizeof(struct blah) with one of these: sizeof(*blahptr) acc

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Ahmed S. Darwish
On Fri, Jan 05, 2007 at 11:26:07AM +0100, Rolf Eike Beer wrote: > One big patch for the whole kernel will not work anyway. You have to split it > up to allow subsystems to integrate them in their own trees. With one big > patch you would get collisions all over the tree causing the complete patc

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Rolf Eike Beer
Am Freitag, 5. Januar 2007 11:06 schrieb Ahmed S. Darwish: > On Fri, Jan 05, 2007 at 09:10:01AM +0100, Rolf Eike Beer wrote: > > Ahmed S. Darwish wrote: > > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > > > > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> > > > > if (!*ltp

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Robert P. J. Day
On Fri, 5 Jan 2007, Ahmed S. Darwish wrote: > On Fri, Jan 05, 2007 at 09:10:01AM +0100, Rolf Eike Beer wrote: > > Ahmed S. Darwish wrote: > > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > > > > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> > > > > if (!*ltp_loc) { > > -

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Ahmed S. Darwish
On Fri, Jan 05, 2007 at 09:10:01AM +0100, Rolf Eike Beer wrote: > Ahmed S. Darwish wrote: > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> > > if (!*ltp_loc) { > -ltp = (struct ktermios *) kmalloc(sizeof(struc

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-05 Thread Rolf Eike Beer
Ahmed S. Darwish wrote: > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > Signed-off-by: Ahmed Darwish <[EMAIL PROTECTED]> > if (!*ltp_loc) { > - ltp = (struct ktermios *) kmalloc(sizeof(struct ktermios), > - GFP_KERNEL);

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-04 Thread Ahmed S. Darwish
On Fri, Jan 05, 2007 at 01:56:09AM -0500, Robert P. J. Day wrote: > On Fri, 5 Jan 2007, Ahmed S. Darwish wrote: > > > Remove unnecessary kmalloc casts in drivers/char/tty_io.c > > rather than remove these casts a file or two at a time, why not just > do them all at once and submit a single patch?

Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

2007-01-04 Thread Robert P. J. Day
On Fri, 5 Jan 2007, Ahmed S. Darwish wrote: > Remove unnecessary kmalloc casts in drivers/char/tty_io.c rather than remove these casts a file or two at a time, why not just do them all at once and submit a single patch? there aren't that many of them: grep -Er "\([^\)\*]+\*\) ?k[cmz]alloc ?\(