Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1045418AbdDWMms (ORCPT ); Sun, 23 Apr 2017 08:42:48 -0400 Received: from mail-qt0-f175.google.com ([209.85.216.175]:33920 "EHLO mail-qt0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1045269AbdDWMmh (ORCPT ); Sun, 23 Apr 2017 08:42:37 -0400 MIME-Version: 1.0 In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B543E8399@hasmsx108.ger.corp.intel.com> References: <20170421144645.45189-1-andriy.shevchenko@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B543E8399@hasmsx108.ger.corp.intel.com> From: Andy Shevchenko Date: Sun, 23 Apr 2017 15:42:35 +0300 Message-ID: Subject: Re: [PATCH v1 1/8] lib/uuid: Introduce uuid_{be|le}_cmp_p{p}() helpers To: "Winkler, Tomas" Cc: Andy Shevchenko , Andrew Morton , "linux-kernel@vger.kernel.org" , Arnd Bergmann , Mika Westerberg , "alsa-devel@alsa-project.org" , "linux-input@vger.kernel.org" , "kvm@vger.kernel.org" , "devel@linuxdriverproject.org" , "linux-efi@vger.kernel.org" , "linux-acpi@vger.kernel.org" , Liam Girdwood , Mark Brown , "Koul, Vinod" , Srinivas Pandruvada , Benjamin Tissoires , Kirti Wankhede , Alex Williamson , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Matt Fleming , Ard Biesheuvel , "Rafael J. Wysocki" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 583 Lines: 18 On Sun, Apr 23, 2017 at 1:29 PM, Winkler, Tomas 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. -- With Best Regards, Andy Shevchenko