mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Martin Kepplinger <martink@posteo.de>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	forest@alittletooquiet.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: vt6655: preserve address space by not casting
Date: Mon, 16 Jun 2014 10:55:56 +0300	[thread overview]
Message-ID: <20140616075556.GZ5500@mwanda> (raw)
In-Reply-To: <1402654311-22053-1-git-send-email-martink@posteo.de>

On Fri, Jun 13, 2014 at 12:11:51PM +0200, Martin Kepplinger wrote:
> Fix the sparse error: cast removes address space of expression.
> ---
> Is that even correct?

It's correct but not complete.

vt6655 impliment their own versions of ethtool_ioctl() when they should
be using the standard versions.

The vt6655 version of ethtool_ioctl() should be annotated so it's marked
that the second parameter is marked as a __user pointer.  It doesn't
print a Sparse warning because at a certain point Sparse just says:
"warning: too many warnings" and gives up.

> I haven't signed-off on it yet.
> ethtool_ioctl() takes a (void *) as user data, dereferenced and assigend to u32.
> applies to next-20140611

It doesn't dereference the pointer.  You are getting mixed up with the
vt6656 version of ethtool_ioctl() I think?  You're not allowed to
dereference __user pointers.

regards,
dan carpenter


  reply	other threads:[~2014-06-16  7:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 10:11 Martin Kepplinger
2014-06-16  7:55 ` Dan Carpenter [this message]
2014-06-17 12:32   ` [PATCH v2] staging: vt6655: preserve address space in ethtool_ioctl() Martin Kepplinger
2014-06-17 12:40     ` [PATCH v3] " Martin Kepplinger
2014-06-19 23:37       ` Greg KH

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=20140616075556.GZ5500@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martink@posteo.de \
    /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

Powered by JetHome