From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-x243.google.com (mail-oi0-x243.google.com [IPv6:2607:f8b0:4003:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8143121A0BA9C for ; Thu, 11 May 2017 01:31:41 -0700 (PDT) Received: by mail-oi0-x243.google.com with SMTP id w10so3032164oif.1 for ; Thu, 11 May 2017 01:31:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20170511075926.GC19837@lst.de> References: <20170510180214.16852-1-hch@lst.de> <20170510180214.16852-4-hch@lst.de> <20170511075926.GC19837@lst.de> From: Amir Goldstein Date: Thu, 11 May 2017 11:31:40 +0300 Message-ID: Subject: Re: [PATCH 03/16] uuid: rename uuid types List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Christoph Hellwig Cc: linux-xfs , linux-raid@vger.kernel.org, linux-nvdimm@lists.01.org, Mimi Zohar , linux-kernel , David Howells , linux-fsdevel , Andy Shevchenko , Shaohua Li , Steven Whitehouse List-ID: On Thu, May 11, 2017 at 10:59 AM, Christoph Hellwig wrote: > On Wed, May 10, 2017 at 10:15:51PM +0300, Amir Goldstein wrote: >> > +static inline int uuid_cmp(const uuid_t u1, const uuid_t u2) >> > { >> > - return memcmp(&u1, &u2, sizeof(uuid_be)); >> > + return memcmp(&u1, &u2, sizeof(uuid_t)); >> > } >> > >> >> >> I think we should use this opportunity to change these to (uuid_t *, uuid_t *) >> which is more in line with the rest of the helpers including the new helpers >> hoisted from xfs. > > Or just kill them off - uuid/guid_equals is the better interface for all > existing users as far as I can tell. My updated series already kills > off the be/uuid one, the le/guid one will need a bit more work, though. That works too. and for another argument, why need a helper uuid/guid_cmp when one can use C comparison (i.e. u1 != u2) ? assuming that we have no reason to abstract that fact that uuid_t/guid_t are a struct type. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amir Goldstein Subject: Re: [PATCH 03/16] uuid: rename uuid types Date: Thu, 11 May 2017 11:31:40 +0300 Message-ID: References: <20170510180214.16852-1-hch@lst.de> <20170510180214.16852-4-hch@lst.de> <20170511075926.GC19837@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170511075926.GC19837-jcswGhMUV9g@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Christoph Hellwig Cc: linux-xfs , linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, Mimi Zohar , linux-kernel , David Howells , linux-fsdevel , Andy Shevchenko , Shaohua Li , Steven Whitehouse List-Id: linux-raid.ids On Thu, May 11, 2017 at 10:59 AM, Christoph Hellwig wrote: > On Wed, May 10, 2017 at 10:15:51PM +0300, Amir Goldstein wrote: >> > +static inline int uuid_cmp(const uuid_t u1, const uuid_t u2) >> > { >> > - return memcmp(&u1, &u2, sizeof(uuid_be)); >> > + return memcmp(&u1, &u2, sizeof(uuid_t)); >> > } >> > >> >> >> I think we should use this opportunity to change these to (uuid_t *, uuid_t *) >> which is more in line with the rest of the helpers including the new helpers >> hoisted from xfs. > > Or just kill them off - uuid/guid_equals is the better interface for all > existing users as far as I can tell. My updated series already kills > off the be/uuid one, the le/guid one will need a bit more work, though. That works too. and for another argument, why need a helper uuid/guid_cmp when one can use C comparison (i.e. u1 != u2) ? assuming that we have no reason to abstract that fact that uuid_t/guid_t are a struct type. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755390AbdEKIbo (ORCPT ); Thu, 11 May 2017 04:31:44 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:36852 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754972AbdEKIbl (ORCPT ); Thu, 11 May 2017 04:31:41 -0400 MIME-Version: 1.0 In-Reply-To: <20170511075926.GC19837@lst.de> References: <20170510180214.16852-1-hch@lst.de> <20170510180214.16852-4-hch@lst.de> <20170511075926.GC19837@lst.de> From: Amir Goldstein Date: Thu, 11 May 2017 11:31:40 +0300 Message-ID: Subject: Re: [PATCH 03/16] uuid: rename uuid types To: Christoph Hellwig Cc: Andy Shevchenko , linux-fsdevel , Shaohua Li , Dan Williams , David Howells , Steven Whitehouse , Mimi Zohar , linux-xfs , linux-raid@vger.kernel.org, linux-nvdimm@ml01.01.org, linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 11, 2017 at 10:59 AM, Christoph Hellwig wrote: > On Wed, May 10, 2017 at 10:15:51PM +0300, Amir Goldstein wrote: >> > +static inline int uuid_cmp(const uuid_t u1, const uuid_t u2) >> > { >> > - return memcmp(&u1, &u2, sizeof(uuid_be)); >> > + return memcmp(&u1, &u2, sizeof(uuid_t)); >> > } >> > >> >> >> I think we should use this opportunity to change these to (uuid_t *, uuid_t *) >> which is more in line with the rest of the helpers including the new helpers >> hoisted from xfs. > > Or just kill them off - uuid/guid_equals is the better interface for all > existing users as far as I can tell. My updated series already kills > off the be/uuid one, the le/guid one will need a bit more work, though. That works too. and for another argument, why need a helper uuid/guid_cmp when one can use C comparison (i.e. u1 != u2) ? assuming that we have no reason to abstract that fact that uuid_t/guid_t are a struct type. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20170511075926.GC19837@lst.de> References: <20170510180214.16852-1-hch@lst.de> <20170510180214.16852-4-hch@lst.de> <20170511075926.GC19837@lst.de> From: Amir Goldstein Date: Thu, 11 May 2017 11:31:40 +0300 Message-ID: Subject: Re: [PATCH 03/16] uuid: rename uuid types To: Christoph Hellwig Cc: Andy Shevchenko , linux-fsdevel , Shaohua Li , Dan Williams , David Howells , Steven Whitehouse , Mimi Zohar , linux-xfs , linux-raid@vger.kernel.org, linux-nvdimm@lists.01.org, linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: On Thu, May 11, 2017 at 10:59 AM, Christoph Hellwig wrote: > On Wed, May 10, 2017 at 10:15:51PM +0300, Amir Goldstein wrote: >> > +static inline int uuid_cmp(const uuid_t u1, const uuid_t u2) >> > { >> > - return memcmp(&u1, &u2, sizeof(uuid_be)); >> > + return memcmp(&u1, &u2, sizeof(uuid_t)); >> > } >> > >> >> >> I think we should use this opportunity to change these to (uuid_t *, uuid_t *) >> which is more in line with the rest of the helpers including the new helpers >> hoisted from xfs. > > Or just kill them off - uuid/guid_equals is the better interface for all > existing users as far as I can tell. My updated series already kills > off the be/uuid one, the le/guid one will need a bit more work, though. That works too. and for another argument, why need a helper uuid/guid_cmp when one can use C comparison (i.e. u1 != u2) ? assuming that we have no reason to abstract that fact that uuid_t/guid_t are a struct type.