All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Helge Deller <deller@gmx.de>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: linux-parisc@vger.kernel.org
Subject: Re: self-assignment in dino_card_setup
Date: Tue, 29 Dec 2015 12:51:54 -0800	[thread overview]
Message-ID: <1451422314.2346.6.camel@HansenPartnership.com> (raw)
In-Reply-To: <5682EB8B.30308@gmx.de>

On Tue, 2015-12-29 at 21:22 +0100, Helge Deller wrote:
> Hi Rasmus,
> 
> On 29.12.2015 21:03, Rasmus Villemoes wrote:
> > Line 474 of drivers/parisc/dino.c reads
> > 
> >         res->name = dino_dev->hba.lmmio_space.name;
> > 
> > but res is &dino_dev->hba.lmmio_space, so this seems to just assign
> > NULL
> > again to res->name. Presumably the allocation of <= 128 bytes never
> > fails, but I wonder what the purpose was, and if the confusing else
> > branch couldn't just be deleted (and then one should just do res
> > ->name =
> > kmemdup(name, size+1, GFP_KERNEL); and delete the if as well).
> 
> I'd suggest to just delete the else branch.
> Do you want to send a patch with signed-off ?

Actually, I'd guess the intention was to put back whatever the contents
of lmmio_space.name originally was ... it's usually some default static
string.

James



      reply	other threads:[~2015-12-29 20:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-29 20:03 self-assignment in dino_card_setup Rasmus Villemoes
2015-12-29 20:22 ` Helge Deller
2015-12-29 20:51   ` James Bottomley [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=1451422314.2346.6.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=deller@gmx.de \
    --cc=jejb@parisc-linux.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.