Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752883AbbKLTCi (ORCPT ); Thu, 12 Nov 2015 14:02:38 -0500 Received: from mail-ig0-f182.google.com ([209.85.213.182]:36847 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbbKLTCg convert rfc822-to-8bit (ORCPT ); Thu, 12 Nov 2015 14:02:36 -0500 MIME-Version: 1.0 In-Reply-To: <5644E10A.9010703@bjorling.me> References: <1447353300-26027-1-git-send-email-m@bjorling.me> <5644E10A.9010703@bjorling.me> Date: Thu, 12 Nov 2015 11:02:36 -0800 X-Google-Sender-Auth: DpEUuFfiallZvjVMwcRYYTUuJpI Message-ID: Subject: Re: [PATCH] lightnvm: change max_phys_sect to ushort From: Linus Torvalds To: =?UTF-8?Q?Matias_Bj=C3=B8rling?= Cc: Geert Uytterhoeven , linux-block@vger.kernel.org, "linux-kernel@vger.kernel.org" , Jens Axboe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 980 Lines: 23 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. 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/