public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nam Cao <namcaov@gmail.com>
Cc: forest@alittletooquiet.net, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH v2] staging: vt6655: use memset to make code clearer
Date: Fri, 9 Sep 2022 13:47:26 +0200	[thread overview]
Message-ID: <YxsnzortdWmj+niV@kroah.com> (raw)
In-Reply-To: <CA+sZ8B_XzDO8pgFJLMzObBMo6KYHeYsttfYNoSUi+CGf8293xA@mail.gmail.com>

On Fri, Sep 09, 2022 at 01:29:44PM +0200, Nam Cao wrote:
> On Fri, Sep 9, 2022 at 12:23 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> > Why do you have to cast this to (void *)?  That should almost never be
> > needed.
> 
> Because I want to suppress a compiler warning:
> drivers/staging/vt6655/device_main.c:869:9: warning: passing argument
> 1 of ‘memset’ discards ‘volatile’ qualifier from pointer target type
> [-Wdiscarded-qualifiers]
>   869 |  memset(&rd->rd0, 0, sizeof(rd->rd0));
>       |         ^~~~~~~~

Why would that have a type of "volatile"?  That should be fixed first
please.

thanks,

greg k-h

      reply	other threads:[~2022-09-09 11:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09  9:08 [PATCH v2] staging: vt6655: use memset to make code clearer Nam Cao
2022-09-09 10:23 ` Greg KH
2022-09-09 11:29   ` Nam Cao
2022-09-09 11:47     ` Greg KH [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=YxsnzortdWmj+niV@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=forest@alittletooquiet.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=namcaov@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