Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753149AbbKLTF3 (ORCPT ); Thu, 12 Nov 2015 14:05:29 -0500 Received: from mail-lf0-f43.google.com ([209.85.215.43]:34944 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752834AbbKLTF2 (ORCPT ); Thu, 12 Nov 2015 14:05:28 -0500 Message-ID: <5644E2F5.707@bjorling.me> Date: Thu, 12 Nov 2015 20:05:25 +0100 From: =?UTF-8?B?TWF0aWFzIEJqw7hybGluZw==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Linus Torvalds CC: Geert Uytterhoeven , linux-block@vger.kernel.org, "linux-kernel@vger.kernel.org" , Jens Axboe Subject: Re: [PATCH] lightnvm: change max_phys_sect to ushort References: <1447353300-26027-1-git-send-email-m@bjorling.me> <5644E10A.9010703@bjorling.me> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1068 Lines: 29 On 11/12/2015 08:02 PM, Linus Torvalds wrote: > On Thu, Nov 12, 2015 at 10:57 AM, Matias Bjørling wrote: >> >> Grah, I need to be more careful. I sent the wrong patch after I had fixed it >> to unsigned short. > > Actually, I think "unsigned int" was better. > > You're not saving any space with "unsigned short" (the size of the > structure will be rounded up to the alignment of it anyway), and we > should generally strive to avoid 16-bit accesses unless there is some > real reason for them, because they are often slower than either "char" > or "int". Several architectures have weak support for 16-bit accesses > (eg alpha), and even on x86 you end up having operand size overrides > etc. > Thanks > So unless there is a clear *reason* to use "short" - just don't. > > Linus > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/