mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vadim Lobanov <vlobanov@speakeasy.net>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Unify sys_tkill() and sys_tgkill()
Date: Sat, 24 Sep 2005 10:47:28 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0509241046170.20181@shell3.speakeasy.net> (raw)
In-Reply-To: <9a8748490509240752436ef7b2@mail.gmail.com>

On Sat, 24 Sep 2005, Jesper Juhl wrote:

> On 9/24/05, Vadim Lobanov <vlobanov@speakeasy.net> wrote:
> > Hi,
> >
> > The majority of the sys_tkill() and sys_tgkill() function code is
> > duplicated between the two of them. This patch pulls the duplication out
> > into a separate function -- do_tkill() -- and lets sys_tkill() and
> > sys_tgkill() be simple wrappers around it. This should make it easier to
> > maintain in light of future changes.
> >
>
> A few nitpicks ... :
>
> [snip]
> > +static int do_tkill(int tgid, int pid, int sig)
>
> I would probably have made this
>
>   static inline int do_tkill(int tgid, int pid, int sig)

Probably not necessary to inline this, as per the previous comments.

> [snip]
> > +       if (p && ((tgid <= 0) || (p->tgid == tgid))) {
>
> Why all the extra parenthesis?
>
>    if (p && (tgid <= 0 || p->tgid == tgid)) {
>
>
> [snip]
> > +       return (do_tkill(tgid, pid, sig));
>
> return is not a function
>
>    return do_tkill(tgid, pid, sig);
>
> [snip]
> > +       return (do_tkill(0, pid, sig));
>
> again, get rid of the pointless extra parens
>
>    return do_tkill(0, pid, sig);

These are all no biggie. I'll remove the parens and resend.

> --
> Jesper Juhl <jesper.juhl@gmail.com>
> Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
> Plain text mails only, please      http://www.expita.com/nomime.html
>

Thanks for the comments.
-Vadim Lobanov

      parent reply	other threads:[~2005-09-24 17:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-24  2:18 Vadim Lobanov
2005-09-24 14:52 ` Jesper Juhl
2005-09-24 16:03   ` Serious time drift - clock running fast Howard Chu
2005-09-24 16:38   ` [PATCH] Unify sys_tkill() and sys_tgkill() Jörn Engel
2005-09-24 19:15     ` Jesper Juhl
2005-09-24 17:47   ` Vadim Lobanov [this message]

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.58.0509241046170.20181@shell3.speakeasy.net \
    --to=vlobanov@speakeasy.net \
    --cc=akpm@osdl.org \
    --cc=jesper.juhl@gmail.com \
    --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®