linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Michal Hocko' <mhocko@kernel.org>, Weikang Shi <swkhack@gmail.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"alexander.h.duyck@intel.com" <alexander.h.duyck@intel.com>,
	"vbabka@suse.cz" <vbabka@suse.cz>,
	"mgorman@suse.de" <mgorman@suse.de>,
	"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
	"vdavydov.dev@gmail.com" <vdavydov.dev@gmail.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"my_email@gmail.com" <my_email@gmail.com>
Subject: RE: [PATCH] fs: fix local var type
Date: Thu, 23 Aug 2018 11:23:35 +0000	[thread overview]
Message-ID: <b66e21d0f55b4f568c81bb9d5d22b7a7@AcuMS.aculab.com> (raw)
In-Reply-To: <20180823111355.GD29735@dhcp22.suse.cz>

From: Michal Hocko
> Sent: 23 August 2018 12:14
> 
> On Thu 23-08-18 01:59:14, Weikang Shi wrote:
> > In the seq_hex_dump function,the remaining variable is int, but it receive a type of size_t
> argument.
> > So I change the type of remaining
> 
> The changelog should explain _why_ we need this fix. Is any of the code
> path overflowing?
> 
> Besides that I do not think this fix is complete. What about linelen?
> 
> Why do we even need len to be size_t? Why it cannot be int as well. I
> strongly doubt we need more than 32b here.

Although you may well want 'unsigned int' to avoid the sign extension
instruction that gets added for x86_64 when a signed int is added
to a pointer.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2018-08-23 11:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23  8:59 [PATCH] fs: fix local var type Weikang Shi
2018-08-23 11:13 ` Michal Hocko
2018-08-23 11:23   ` David Laight [this message]
2018-08-23 11:58 ` kbuild test robot
2018-08-24  5:32 ` kbuild test robot

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=b66e21d0f55b4f568c81bb9d5d22b7a7@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@intel.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=my_email@gmail.com \
    --cc=swkhack@gmail.com \
    --cc=vbabka@suse.cz \
    --cc=vdavydov.dev@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;
as well as URLs for NNTP newsgroup(s).