mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/7] staging: vt6655: Replace VNSvOutPortB with iowrite8
Date: Tue, 12 Apr 2022 09:56:43 +0300	[thread overview]
Message-ID: <20220412065643.GB3293@kadam> (raw)
In-Reply-To: <25a1bac5-7758-9602-7c9f-9d8b02d845e4@gmail.com>

On Tue, Apr 12, 2022 at 08:45:53AM +0200, Philipp Hortmann wrote:
> On 4/12/22 08:37, Dan Carpenter wrote:
> > On Mon, Apr 11, 2022 at 10:49:39PM +0200, Philipp Hortmann wrote:
> > > Replace macro VNSvOutPortB with iowrite8.
> > > The name of macro and the arguments use CamelCase which
> > > is not accepted by checkpatch.pl
> > > 
> > > For constants from 0 to below 0x80 the u8 cast was omitted.
> > > For variables which are defined as unsigned char the u8 is omitted.
> > I hate that GCC prints warnings for this.  Useless.  Horrible.  But I
> > understand that GCC does and we haven't figured out how to disable it
> > or who needs to approve that.
> > 
> > But even then I still don't understand the casting in this patch.
> > 
> > Shouldn't the rule be to do the minimum work arounds to silence GCC?
> > My understand is that the the casting is only needed when you're dealing
> > with a bitwise negated constant.  These are macros so the parameters
> > might be constant so basically any bitwise negate gets a cast.
> > 
> 
> Please send me the compiler flags you are using.
> I was using:
> make "KCFLAGS=-pipe -Wall" -C . M=drivers/staging/vt6655/
> But of course more flags are set.
> I did not see any compiler warnings.

I think I was not clear.

Why are you doing these casts?  I do not like any of them, and wish we
could remove them.

My understanding is that if you remove the casts kbuild will complain
and the build will fail on certain architectures.  But I have not tried
to compile this.  If we can remove all the casting let's do that, but
if we can only remove some then lets do that.

regards,
dan carpenter


  reply	other threads:[~2022-04-12  7:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 20:49 [PATCH v3 0/7] staging: vt6655: Fix CamelCase in upc.h and started in mac.h Philipp Hortmann
2022-04-11 20:49 ` [PATCH v3 1/7] staging: vt6655: Replace VNSvInPortB with ioread8 Philipp Hortmann
2022-04-12 13:44   ` Greg Kroah-Hartman
2022-04-11 20:49 ` [PATCH v3 2/7] staging: vt6655: Replace VNSvInPortW with ioread16 Philipp Hortmann
2022-04-11 20:49 ` [PATCH v3 3/7] staging: vt6655: Replace VNSvInPortD with ioread32 Philipp Hortmann
2022-04-11 20:49 ` [PATCH v3 4/7] staging: vt6655: Replace VNSvOutPortB with iowrite8 Philipp Hortmann
2022-04-12  6:37   ` Dan Carpenter
2022-04-12  6:45     ` Philipp Hortmann
2022-04-12  6:56       ` Dan Carpenter [this message]
2022-04-12 13:40       ` Greg Kroah-Hartman
2022-04-11 20:49 ` [PATCH v3 5/7] staging: vt6655: Replace VNSvOutPortW with iowrite16 Philipp Hortmann
2022-04-11 20:49 ` [PATCH v3 6/7] staging: vt6655: Replace VNSvOutPortD with iowrite32 Philipp Hortmann
2022-04-11 20:49 ` [PATCH v3 7/7] staging: vt6655: Remove macro PCAvDelayByIO Philipp Hortmann

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=20220412065643.GB3293@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=philipp.g.hortmann@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

all inboxes | Powered by JetHome®