Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452964

Re: [PATCH 1/1] net: i10e: use matching format indentifiers

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] net: i10e: use matching format indentifiers
Date 2016-08-01 05:50 +0200
Message-ID <s1coO-Tv-15@gated-at.bofh.it> (permalink)
References <s0VxE-6NX-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 31 Jul 2016 11:39:28 +0200

> i is defined as int but output as %u several times.
> Change the definition to unsigned.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

I hate changes like this.

The canonical way to loop over a value is to use a signed integer,
named 'i', and go:

	for (i = 0; i < X; i ++)

'i' can never be negative, therefore we know that this usage
is safe.

I'd rather you convert the "%u" to "%d".

I'm very disappointed in your patches, and it is clear you
are just finding the easiest and simplest way to shut up
compiler warnings you are seeing rather than analyzing the
code you are making changes to in order to determine what
the best and most appropriate fix might be.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] net: i10e: use matching format indentifiers Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-07-31 11:50 +0200
  Re: [PATCH 1/1] net: i10e: use matching format indentifiers David Miller <davem@davemloft.net> - 2016-08-01 05:50 +0200
    [PATCH 1/1 v2] net: i10e: use matching format indentifiers Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-08-02 20:40 +0200
      Re: [PATCH 1/1 v2] net: i10e: use matching format indentifiers Jeff Kirsher <jeffrey.t.kirsher@intel.com> - 2016-08-10 20:20 +0200

csiph-web