mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: ks7010: honor 'const' qualifier
Date: Fri, 17 Jun 2016 10:26:38 +0200	[thread overview]
Message-ID: <20160617082638.GB1406@tetsubishi> (raw)
In-Reply-To: <20160615215330.37276-1-arnd@arndb.de>

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

On Wed, Jun 15, 2016 at 11:53:11PM +0200, Arnd Bergmann wrote:
> The recently-added ks7010 driver produces an annoying build warning:
> 
> drivers/staging/ks7010/ks7010_config.c: In function 'ks_wlan_read_config_file':
> drivers/staging/ks7010/ks7010_config.c:263:8: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
> 
> The problem here is that it assigns the firmware data to a non-const
> variable, and then goes on to modify it, which is clearly not the intended
> use case.
> 
> The only modification is to set the last byte to '\0', and as far as
> I can tell, this modification is unnecessary, as the parser always compares
> against the end pointer, rather than relying on zero-termination.
> 
> This patch therefore removes the modification of the const data and marks
> all the pointers 'const to avoid the warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks! I'll send in a second a patch, though, which removes the config
file handling completely.

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-06-17  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 21:53 Arnd Bergmann
2016-06-17  8:26 ` Wolfram Sang [this message]
2016-06-17  8:52   ` Arnd Bergmann

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=20160617082638.GB1406@tetsubishi \
    --to=wsa@the-dreams.de \
    --cc=arnd@arndb.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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

all inboxes | Powered by JetHome®