public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	Michael Straube <straube.linux@gmail.com>,
	Martin Kaiser <martin@kaiser.cx>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: fix -Wrestrict warnings
Date: Mon, 20 Sep 2021 12:09:10 +0200	[thread overview]
Message-ID: <YUhdxrSWhObY9gg0@kroah.com> (raw)
In-Reply-To: <20210920095525.1150678-1-arnd@kernel.org>

On Mon, Sep 20, 2021 at 11:55:09AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Adding back the nonstandard ioctl commands caused -Wrestrict warnings
> when building with 'make W=1':
> 
> drivers/staging/r8188eu/os_dep/ioctl_linux.c: In function 'rtw_mp_read_rf':
> drivers/staging/r8188eu/os_dep/ioctl_linux.c:5515:27: error: 'sprintf' argument 3 overlaps destination object 'extra' [-Werror=restrict]
>  5515 |                           sprintf(extra, "%s %d", extra, strtou);
>       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/staging/r8188eu/os_dep/ioctl_linux.c:5470:54: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
>  5470 |                         struct iw_point *wrqu, char *extra)
>       |                                                ~~~~~~^~~~~
> 
> Change these to the same construct used elsewhere in that driver,
> with an offset to the string to make the warning go away.
> 
> The ioctl commands were previously removed, and it's unlikely that
> anything is actually using them, so ideally I would prefer to have
> them removed again.

I'll apply this to get rid of the warning, but will also work on
removing the ioctls entirely.

thanks,

greg k-h

      reply	other threads:[~2021-09-20 10:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  9:55 [PATCH] staging: r8188eu: fix -Wrestrict warnings Arnd Bergmann
2021-09-20 10:09 ` Greg Kroah-Hartman [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=YUhdxrSWhObY9gg0@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /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