From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753539AbdFPSOG (ORCPT ); Fri, 16 Jun 2017 14:14:06 -0400 Received: from mga14.intel.com ([192.55.52.115]:62439 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753521AbdFPSOE (ORCPT ); Fri, 16 Jun 2017 14:14:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,348,1493708400"; d="scan'208";a="100374484" From: Andy Shevchenko To: Christoph Hellwig , linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1] uuid: Take const on input of uuid_is_null() and guid_is_null() Date: Fri, 16 Jun 2017 21:13:38 +0300 Message-Id: <20170616181338.1741-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The null check functions do not and must not modify contents of the UUID or GUID supplied. Mark argument explicitly to reflect that. Signed-off-by: Andy Shevchenko --- include/linux/uuid.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/uuid.h b/include/linux/uuid.h index 75f7182d5360..d1defe4ab167 100644 --- a/include/linux/uuid.h +++ b/include/linux/uuid.h @@ -48,7 +48,7 @@ static inline void guid_copy(guid_t *dst, const guid_t *src) memcpy(dst, src, sizeof(guid_t)); } -static inline bool guid_is_null(guid_t *guid) +static inline bool guid_is_null(const guid_t *guid) { return guid_equal(guid, &guid_null); } @@ -63,7 +63,7 @@ static inline void uuid_copy(uuid_t *dst, const uuid_t *src) memcpy(dst, src, sizeof(uuid_t)); } -static inline bool uuid_is_null(uuid_t *uuid) +static inline bool uuid_is_null(const uuid_t *uuid) { return uuid_equal(uuid, &uuid_null); } -- 2.11.0