linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'gregkh@linuxfoundation.org'" <gregkh@linuxfoundation.org>,
	"Andrey Abramov" <st5pub@yandex.ru>
Cc: George Spelvin <lkml@sdf.org>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"bp@alien8.de" <bp@alien8.de>,
	"darrick.wong@oracle.com" <darrick.wong@oracle.com>,
	"dchinner@redhat.com" <dchinner@redhat.com>,
	"dedekind1@gmail.com" <dedekind1@gmail.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"jlbec@evilplan.org" <jlbec@evilplan.org>,
	"jpoimboe@redhat.com" <jpoimboe@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-snps-arc@lists.infradead.org" 
	<linux-snps-arc@lists.infradead.org>,
	"mark@fasheh.com" <mark@fasheh.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"naveen.n.rao@linux.vnet.ibm.com"
	<naveen.n.rao@linux.vnet.ibm.com>,
	"paulus@samba.org" <paulus@samba.org>,
	"richard@nod.at" <richard@nod.at>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"vgupta@synopsys.com" <vgupta@synopsys.com>,
	"x86@kernel.org" <x86@kernel.org>
Subject: RE: [PATCH 5/5] Lib: sort.h: replace int size with size_t size in the swap function
Date: Mon, 1 Apr 2019 14:47:55 +0000	[thread overview]
Message-ID: <cd57af9a2c1e494cbc8631a0347831dc@AcuMS.aculab.com> (raw)
In-Reply-To: <20190331105412.GA9393@kroah.com>

From: gregkh@linuxfoundation.org
> Sent: 31 March 2019 11:54
...
> Yes, "int" is a very nice variable for "size", you need to explain why
> it is better to use size_t here please.

Actually, on x86_64 you probably want 'unsigned int' to avoid the
compiler having to generate a sign-extending register move if the
value is ever used in a 64bit expression (eg an address calculation).

	David

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


  reply	other threads:[~2019-04-01 14:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 16:37 [PATCH 0/5] simple sort swap function usage improvements Andrey Abramov
2019-03-30 16:40 ` [PATCH 1/5] arch/arc: unwind.c: replace swap function with built-in one Andrey Abramov
2019-03-30 16:41 ` [PATCH 2/5] powerpc: module_[32|64].c: " Andrey Abramov
     [not found]   ` <87zhpaox14.fsf@concordia.ellerman.id.au>
2019-04-02 19:11     ` Andrey Abramov
2019-03-30 16:42 ` [PATCH 3/5] ocfs2: dir,refcounttree,xattr: replace swap functions " Andrey Abramov
2019-03-30 16:43 ` [PATCH 4/5] ubifs: find.c: replace swap function " Andrey Abramov
2019-03-30 16:43 ` [PATCH 5/5] Lib: sort.h: replace int size with size_t size in the swap function Andrey Abramov
     [not found]   ` <20190330183826.GB21828@kroah.com>
2019-03-30 20:15     ` George Spelvin
2019-03-30 20:24       ` Greg KH
2019-03-30 21:49         ` George Spelvin
2019-03-31  7:00       ` Andrey Abramov
2019-03-31 10:54         ` gregkh
2019-04-01 14:47           ` David Laight [this message]
2019-04-01 18:01             ` Vineet Gupta
2019-04-01 18:14               ` Andrey Abramov
2019-04-01 18:22                 ` Vineet Gupta
2019-03-30 17:16 ` [PATCH 0/5] simple sort swap function usage improvements George Spelvin
2019-04-01 21:08   ` Rasmus Villemoes

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=cd57af9a2c1e494cbc8631a0347831dc@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=adrian.hunter@intel.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=bp@alien8.de \
    --cc=darrick.wong@oracle.com \
    --cc=dchinner@redhat.com \
    --cc=dedekind1@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jlbec@evilplan.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=lkml@sdf.org \
    --cc=mark@fasheh.com \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=richard@nod.at \
    --cc=st5pub@yandex.ru \
    --cc=tglx@linutronix.de \
    --cc=vgupta@synopsys.com \
    --cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).