From: Helge Deller <deller@gmx.de>
To: Nicholas Mc Guire <der.herr@hofr.at>,
"James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: RFC arch/sh/kernel/traps_64.c - unclear if/else construct (hpux compat layer)
Date: Mon, 16 Feb 2015 22:24:31 +0100 [thread overview]
Message-ID: <54E2600F.9060502@gmx.de> (raw)
In-Reply-To: <20150203093758.GA27963@opentech.at>
Hello Nicholas,
On 03.02.2015 10:37, Nicholas Mc Guire wrote:
> scanning for if STATEMENT else STATEMENT triggered here - and it does look
> like it needs a fix-up or at least some comments.
>
> <snip?
> int hpux_sysfs(int opcode, unsigned long arg1, unsigned long arg2)
> {
> int fstype;
> ...
> /* String could be altered by userspace after strlen_user() */
> fsname[len - 1] = '\0';
>
> printk(KERN_DEBUG "that is '%s' as (char *)\n", fsname);
> if ( !strcmp(fsname, "hfs") ) {
> fstype = 0;
> } else {
> fstype = 0;
> }
>
> kfree(fsname);
>
> printk(KERN_DEBUG "returning fstype=%d\n", fstype);
> return fstype; /* something other than default */
> <snip>
>
> The if-else here has no effect and the printk will not convey any information
> as its always fstype==0, finally the return statement comment indicates that it
> should not be the default...
>
> Can't come up with a reasonable cleanup patch here - but this looks like it
> needs a review.
The hpux code is broken anyway.
I'm going to remove it from the tree.
Thanks!
Helge
next prev parent reply other threads:[~2015-02-16 21:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 9:37 RFC arch/sh/kernel/traps_64.c - unclear if/else construct Nicholas Mc Guire
2015-02-16 21:24 ` Helge Deller [this message]
2015-02-17 8:49 ` RFC arch/sh/kernel/traps_64.c - unclear if/else construct (hpux compat layer) Paul Bolle
2015-02-17 15:15 ` Helge Deller
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=54E2600F.9060502@gmx.de \
--to=deller@gmx.de \
--cc=dan.carpenter@oracle.com \
--cc=der.herr@hofr.at \
--cc=jejb@parisc-linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@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