Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1046019AbdDWUUt (ORCPT ); Sun, 23 Apr 2017 16:20:49 -0400 Received: from mga06.intel.com ([134.134.136.31]:25897 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1045951AbdDWUUi (ORCPT ); Sun, 23 Apr 2017 16:20:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,241,1488873600"; d="scan'208";a="77912947" From: "Winkler, Tomas" To: "andy.shevchenko@gmail.com" CC: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "alex.williamson@redhat.com" , "Koul, Vinod" , "devel@linuxdriverproject.org" , "kwankhede@nvidia.com" , "kys@microsoft.com" , "ard.biesheuvel@linaro.org" , "matt@codeblueprint.co.uk" , "broonie@kernel.org" , "akpm@linux-foundation.org" , "rjw@rjwysocki.net" , "sthemmin@microsoft.com" , "srinivas.pandruvada@linux.intel.com" , "mika.westerberg@linux.intel.com" , "linux-efi@vger.kernel.org" , "lgirdwood@gmail.com" , "linux-input@vger.kernel.org" , "benjamin.tissoires@redhat.com" , "arnd@arndb.de" , "andriy.shevchenko@linux.intel.com" , "alsa-devel@alsa-project.org" , "haiyangz@microsoft.com" , "linux-acpi@vger.kernel.org" Subject: Re: [PATCH v1 1/8] lib/uuid: Introduce uuid_{be|le}_cmp_p{p}() helpers Thread-Topic: [PATCH v1 1/8] lib/uuid: Introduce uuid_{be|le}_cmp_p{p}() helpers Thread-Index: AQHSuq4ryU4x8feEVEm7l2P5RMMZXKHSws4A///ztYCAAG6zAA== Date: Sun, 23 Apr 2017 20:20:33 +0000 Message-ID: <1492975128.3570.2.camel@intel.com> References: <20170421144645.45189-1-andriy.shevchenko@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B543E8399@hasmsx108.ger.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.91.146] Content-Type: text/plain; charset="utf-8" Content-ID: <5D6A48AB91F1A947BA5214B76B765CAE@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v3NKKujq030914 Content-Length: 773 Lines: 23 On Sun, 2017-04-23 at 15:42 +0300, Andy Shevchenko wrote: > On Sun, Apr 23, 2017 at 1:29 PM, Winkler, Tomas com> wrote: > > > New helpers take pointers to uuid_{be|le} as parameters. > > > > > > When using them on a raw data we don't need to do an ugly > > > dereference and, > > > in some cases, a type casting. > > I think this going overboard, the _pp types  are just enough. > > I looked at existing users and there are cases like > #define XXX_UUID UUID_...(a, b, c, ...) > > uuid_.*_cmp(value, XXX_UUID) > > For _pp variant if would be _cmp_pp(value, &XXX_UUID) which is > slightly worse than for _p variant. Maybe it's worth to actually replace the defines with variables than to create an interface with all the permutations. Tomas