mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>, Jiri Kosina <jkosina@suse.cz>,
	Petr Mladek <pmladek@suse.cz>,
	Piotr Maziarz <piotrx.maziarz@linux.intel.com>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] seq_buf: avoid type mismatch for seq_buf_init
Date: Mon, 26 Oct 2020 20:07:39 +0100	[thread overview]
Message-ID: <CAK8P3a1ASxy3w62A16Ne9AkM2kfF5ZokYOfos53FSTQdkXha4Q@mail.gmail.com> (raw)
In-Reply-To: <20201026132300.6b175028@gandalf.local.home>

On Mon, Oct 26, 2020 at 6:23 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Mon, 26 Oct 2020 17:10:58 +0100
> Arnd Bergmann <arnd@kernel.org> wrote:
>
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > Building with W=2 prints a number of warnings for one function that
> > has a pointer type mismatch:
> >
> > linux/seq_buf.h: In function 'seq_buf_init':
> > linux/seq_buf.h:35:12: warning: pointer targets in assignment from 'unsigned char *' to 'char *' differ in signedness [-Wpointer-sign]
>
> I've always hated the warning about char * and unsigned char *, as they are
> mostly meaningless. Yes, bugs happen with int to unsigned int conversions,
> but this is dealing with strings, where unsigned char * and char * are
> basically equivalent, except when it comes to one thing, which is why I
> prefer unsigned char * over char *, and that is printing out the numerical
> values of a buffer, if they go above 177, the char * prints the negative
> value, but unsigned char * keeps printing what you would expect.

I agree it's a super annoying warning, which is exactly why I sent the
fixes to shut it up in common headers. At least that way, building a specific
driver with W=2 will only show the warnings in that driver, rather than
those in header files as well.

> As this is just an annoyance (extra warnings), and not really a "fix", I'll
> queue it up for the next merge window.

Yes, that was the idea, thanks!

        Arnd

      reply	other threads:[~2020-10-26 19:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 16:10 Arnd Bergmann
2020-10-26 16:37 ` Rojewski, Cezary
2020-10-26 17:23 ` Steven Rostedt
2020-10-26 19:07   ` Arnd Bergmann [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=CAK8P3a1ASxy3w62A16Ne9AkM2kfF5ZokYOfos53FSTQdkXha4Q@mail.gmail.com \
    --to=arnd@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=piotrx.maziarz@linux.intel.com \
    --cc=pmladek@suse.cz \
    --cc=rostedt@goodmis.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

all inboxes | Powered by JetHome®