Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1167281AbdDXIzq (ORCPT ); Mon, 24 Apr 2017 04:55:46 -0400 Received: from mga09.intel.com ([134.134.136.24]:2398 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1167161AbdDXIzf (ORCPT ); Mon, 24 Apr 2017 04:55:35 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,243,1488873600"; d="scan'208";a="960371315" Message-ID: <1493024010.24567.151.camel@linux.intel.com> Subject: Re: [PATCH v1 1/8] lib/uuid: Introduce uuid_{be|le}_cmp_p{p}() helpers From: Andy Shevchenko To: "Winkler, Tomas" , "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" , "alsa-devel@alsa-project.org" , "haiyangz@microsoft.com" , "linux-acpi@vger.kernel.org" Date: Mon, 24 Apr 2017 11:53:30 +0300 In-Reply-To: <1492975128.3570.2.camel@intel.com> References: <20170421144645.45189-1-andriy.shevchenko@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B543E8399@hasmsx108.ger.corp.intel.com> <1492975128.3570.2.camel@intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1025 Lines: 31 On Sun, 2017-04-23 at 20:20 +0000, Winkler, Tomas wrote: > 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. Maybe. I didn't estimate the number of users that would be in a scope. -- Andy Shevchenko Intel Finland Oy