mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Get rid of most of the remaining k*alloc() casts.
Date: Tue, 19 Dec 2006 10:43:30 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0612191039190.7558@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.61.0612191639540.10396@yvahk01.tjqt.qr>

On Tue, 19 Dec 2006, Jan Engelhardt wrote:

> >  Get rid of the remaining obvious pointer casts of all k[cmz]alloc
> >calls, and do a little whitespace cleanup on the result, based on the
> >CodingStyle file.
>
> >-		struct intmem_allocation* alloc =
> >-		  (struct intmem_allocation*)kmalloc(sizeof *alloc, GFP_KERNEL);
> >+		struct intmem_allocation* alloc =
> >+			kmalloc(sizeof(*alloc), GFP_KERNEL);
>
> At the same time, you could make * alloc -> *alloc when it falls on
> the same line as the kmczalloc cleanup. :)

i'd actually thought of that but, as with previous patches of mine,
it's a trade-off -- the more i try to do at once, the more chance
there is of having the patch rejected for some sort of
incompatibility.

as you may have noticed, i try to write scripts to automate a lot of
this.  this last patch definitely needed more manual work than
previous patches so i was loathe to try to push the envelope -- i
wanted to concentrate on the superfluous casts this time, and leave
other issues for future, well-defined patches.

"bit by bit," that's my motto.  well, that and "life is too short to
drink bad wine."

rday

  reply	other threads:[~2006-12-19 15:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-19 11:31 Robert P. J. Day
2006-12-19 15:41 ` Jan Engelhardt
2006-12-19 15:43   ` Robert P. J. Day [this message]
2006-12-19 19:25 ` David Rientjes
2006-12-19 19:44   ` Robert P. J. Day
2006-12-19 20:07     ` David Rientjes
2006-12-19 20:11       ` Robert P. J. Day

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0612191039190.7558@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®