Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752683AbcLLNtV (ORCPT ); Mon, 12 Dec 2016 08:49:21 -0500 Received: from sandeen.net ([63.231.237.45]:52370 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbcLLNtT (ORCPT ); Mon, 12 Dec 2016 08:49:19 -0500 Subject: Re: [PATCH 1/1] Fixed to codestyle To: Ozgur Karatas , david@fromorbit.com References: <987271481540010@web27o.yandex.ru> Cc: linux-xfs@vger.kernel.org, linux-kernel From: Eric Sandeen Message-ID: <66c68b88-e338-1d9a-b9dd-b8d858ebf349@sandeen.net> Date: Mon, 12 Dec 2016 07:49:18 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <987271481540010@web27o.yandex.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1183 Lines: 45 On 12/12/16 4:53 AM, Ozgur Karatas wrote: > > Hello, > > I have error to use uuid and I think the functions should be used when -i'm eye-catching- "(* uuid)". > I tested it. > > Regards, > > Signed-off-by: Ozgur Karatas NAK This doesn't fix code style at all; there is no need and no precedence for i.e. (*uuid) in function arguments in the xfs code, and you have broken indentation in the loop within the function. Thanks, -Eric > --- > diff --git a/fs/xfs/uuid.c b/fs/xfs/uuid.c > index b83f76b..cd8bc8e 100644 > --- a/fs/xfs/uuid.c > +++ b/fs/xfs/uuid.c > @@ -33,7 +33,7 @@ typedef struct { > * it just something that's needed for user-level file handles. > */ > void > -uuid_getnodeuniq(uuid_t *uuid, int fsid [2]) > +uuid_getnodeuniq(uuid_t (*uuid), int fsid [2]) > { > xfs_uu_t *uup = (xfs_uu_t *)uuid; > > @@ -51,8 +51,8 @@ uuid_is_nil(uuid_t *uuid) > if (uuid == NULL) > return 0; > /* implied check of version number here... */ > - for (i = 0; i < sizeof *uuid; i++) > - if (*cp++) return 0; /* not nil */ > + for (i = 0; i < sizeof (*uuid); i++) > + if (*cp++) return 0; /* not nil */ > return 1; /* is nil */ > } >