Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965151AbbFJOGL (ORCPT ); Wed, 10 Jun 2015 10:06:11 -0400 Received: from mail-la0-f49.google.com ([209.85.215.49]:35764 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965124AbbFJOFs (ORCPT ); Wed, 10 Jun 2015 10:05:48 -0400 MIME-Version: 1.0 In-Reply-To: <00a06d8575946a7ada702daa8fee84eb5a0c8034.1433882692.git.sergei@s15v.net> References: <00a06d8575946a7ada702daa8fee84eb5a0c8034.1433882692.git.sergei@s15v.net> Date: Wed, 10 Jun 2015 16:05:46 +0200 Message-ID: Subject: Re: [PATCH v2 05/10] selftests/kdbus: fix trivial style issues From: David Herrmann To: Sergei Zviagintsev Cc: Greg Kroah-Hartman , Daniel Mack , David Herrmann , Djalal Harouni , 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 Content-Length: 4412 Lines: 108 Hi On Tue, Jun 9, 2015 at 11:00 PM, Sergei Zviagintsev wrote: > Signed-off-by: Sergei Zviagintsev > --- > tools/testing/selftests/kdbus/kdbus-enum.h | 1 + > tools/testing/selftests/kdbus/kdbus-util.c | 2 +- > tools/testing/selftests/kdbus/kdbus-util.h | 21 +++++++++------------ > 3 files changed, 11 insertions(+), 13 deletions(-) Reviewed-by: David Herrmann Thanks David > diff --git a/tools/testing/selftests/kdbus/kdbus-enum.h b/tools/testing/selftests/kdbus/kdbus-enum.h > index a67cec3512a7..ed28cca26906 100644 > --- a/tools/testing/selftests/kdbus/kdbus-enum.h > +++ b/tools/testing/selftests/kdbus/kdbus-enum.h > @@ -6,6 +6,7 @@ > * Free Software Foundation; either version 2.1 of the License, or (at > * your option) any later version. > */ > + > #pragma once > > const char *enum_CMD(long long id); > diff --git a/tools/testing/selftests/kdbus/kdbus-util.c b/tools/testing/selftests/kdbus/kdbus-util.c > index 4b376ecfdbed..1e267d585a14 100644 > --- a/tools/testing/selftests/kdbus/kdbus-util.c > +++ b/tools/testing/selftests/kdbus/kdbus-util.c > @@ -1353,7 +1353,7 @@ static int all_ids_are_mapped(const char *path) > return 0; > } > > -int all_uids_gids_are_mapped() > +int all_uids_gids_are_mapped(void) > { > int ret; > > diff --git a/tools/testing/selftests/kdbus/kdbus-util.h b/tools/testing/selftests/kdbus/kdbus-util.h > index 50ff07140bdd..b53b03f0565c 100644 > --- a/tools/testing/selftests/kdbus/kdbus-util.h > +++ b/tools/testing/selftests/kdbus/kdbus-util.h > @@ -7,6 +7,7 @@ > * Free Software Foundation; either version 2.1 of the License, or (at > * your option) any later version. > */ > + > #pragma once > > #define BIT(X) (1 << (X)) > @@ -30,24 +31,22 @@ > #define KDBUS_ITEM_FOREACH(item, head, first) \ > for (item = (head)->first; \ > ((uint8_t *)(item) < (uint8_t *)(head) + (head)->size) && \ > - ((uint8_t *)(item) >= (uint8_t *)(head)); \ > + ((uint8_t *)(item) >= (uint8_t *)(head)); \ > item = KDBUS_ITEM_NEXT(item)) > #define KDBUS_FOREACH(iter, first, _size) \ > for (iter = (first); \ > ((uint8_t *)(iter) < (uint8_t *)(first) + (_size)) && \ > ((uint8_t *)(iter) >= (uint8_t *)(first)); \ > - iter = (void*)(((uint8_t *)iter) + KDBUS_ALIGN8((iter)->size))) > - > + iter = (void *)(((uint8_t *)iter) + KDBUS_ALIGN8((iter)->size))) > > -#define _KDBUS_ATTACH_BITS_SET_NR (__builtin_popcountll(_KDBUS_ATTACH_ALL)) > +#define _KDBUS_ATTACH_BITS_SET_NR (__builtin_popcountll(_KDBUS_ATTACH_ALL)) > > /* Sum of KDBUS_ITEM_* that reflects _KDBUS_ATTACH_ALL */ > -#define KDBUS_ATTACH_ITEMS_TYPE_SUM \ > - ((((_KDBUS_ATTACH_BITS_SET_NR - 1) * \ > - ((_KDBUS_ATTACH_BITS_SET_NR - 1) + 1)) / 2 ) + \ > +#define KDBUS_ATTACH_ITEMS_TYPE_SUM \ > + ((((_KDBUS_ATTACH_BITS_SET_NR - 1) * \ > + ((_KDBUS_ATTACH_BITS_SET_NR - 1) + 1)) / 2) + \ > (_KDBUS_ITEM_ATTACH_BASE * _KDBUS_ATTACH_BITS_SET_NR)) > > - > #define POOL_SIZE (16 * 1024LU * 1024LU) > > #define UNPRIV_UID 65534 > @@ -207,14 +206,12 @@ int kdbus_add_match_id(struct kdbus_conn *conn, uint64_t cookie, > uint64_t type, uint64_t id); > int kdbus_add_match_empty(struct kdbus_conn *conn); > > -int all_uids_gids_are_mapped(); > +int all_uids_gids_are_mapped(void); > int drop_privileges(uid_t uid, gid_t gid); > uint64_t now(clockid_t clock); > char *unique_name(const char *prefix); > > -int userns_map_uid_gid(pid_t pid, > - const char *map_uid, > - const char *map_gid); > +int userns_map_uid_gid(pid_t pid, const char *map_uid, const char *map_gid); > int test_is_capable(int cap, ...); > int config_user_ns_is_enabled(void); > int config_auditsyscall_is_enabled(void); > -- > 1.8.3.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/