From patchwork Mon Jun 6 06:12:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ammar Faizi X-Patchwork-Id: 12869983 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C046CCA473 for ; Mon, 6 Jun 2022 06:12:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbiFFGMj (ORCPT ); Mon, 6 Jun 2022 02:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbiFFGMh (ORCPT ); Mon, 6 Jun 2022 02:12:37 -0400 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23E1B218F for ; Sun, 5 Jun 2022 23:12:35 -0700 (PDT) Received: from integral2.. (unknown [36.73.79.120]) by gnuweeb.org (Postfix) with ESMTPSA id B087D7FA06; Mon, 6 Jun 2022 06:12:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1654495954; bh=aYSYkE3+A9+TQ9CjZcrIwWINA1KMjk4o3Pj624qbx9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tKgXS9W7DpL5Zbn2vq0fzWgB45CUAemHtGxOol3J7pn/fsxEWuKcY6QfpSCWzdzY5 Q4udYurkf70JGkhticxVoD3ZhDmit62+nXEys+Ji7zIsqzSJ3IJHbDeaGpGPkdmV0+ rSub8mvbOt2WE3Af1YSAbxB3xKDF6FXipGv8Y2ugjB4I0dhYiybub60A72cG//xTqv GxyNgpZceGHRWvtqgGTnQy1h+WWygG22eatysBIPt9zbVG6ktSnSj9YhoGlN2ukLxp +XCVqI14WhgHWcP6jDHVMCY//qj4Kh+U35iFGg3a/Pbc+SYZIYwJwCw908CWLnTjUY H6gbIS17J6PDA== From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Pavel Begunkov , "Fernanda Ma'rouf" , Hao Xu , Alviro Iskandar Setiawan , io-uring Mailing List , GNU/Weeb Mailing List Subject: [RFC PATCH v1 1/5] lib: Don't indent in `#ifdef -> #define -> #endif` block Date: Mon, 6 Jun 2022 13:12:05 +0700 Message-Id: <20220606061209.335709-2-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220606061209.335709-1-ammarfaizi2@gnuweeb.org> References: <20220606061209.335709-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org Follow the surrounding code style. Signed-off-by: Ammar Faizi --- src/lib.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib.h b/src/lib.h index 6672cc5..5dabd28 100644 --- a/src/lib.h +++ b/src/lib.h @@ -23,14 +23,14 @@ #ifndef offsetof - #define offsetof(TYPE, FIELD) ((size_t) &((TYPE *)0)->FIELD) +#define offsetof(TYPE, FIELD) ((size_t) &((TYPE *)0)->FIELD) #endif #ifndef container_of - #define container_of(PTR, TYPE, FIELD) ({ \ - __typeof__(((TYPE *)0)->FIELD) *__FIELD_PTR = (PTR); \ - (TYPE *)((char *) __FIELD_PTR - offsetof(TYPE, FIELD)); \ - }) +#define container_of(PTR, TYPE, FIELD) ({ \ + __typeof__(((TYPE *)0)->FIELD) *__FIELD_PTR = (PTR); \ + (TYPE *)((char *) __FIELD_PTR - offsetof(TYPE, FIELD)); \ +}) #endif void *__uring_malloc(size_t len);