From nobody Mon Apr 13 13:15:05 2026 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 4D80EC43217 for ; Sun, 13 Nov 2022 15:43:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235251AbiKMPnP (ORCPT ); Sun, 13 Nov 2022 10:43:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233954AbiKMPnL (ORCPT ); Sun, 13 Nov 2022 10:43:11 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0AFCBCB8; Sun, 13 Nov 2022 07:43:10 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id g24so8032149plq.3; Sun, 13 Nov 2022 07:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BLA01oFV4J5GlvoqrcMHLaIMq8KumIWqDPPbGMC23js=; b=GDh/5ZwJ9IQY8JKJ5fNbuM3L5bRLpO2C6PElCD0BN/2SQCI9d4cQ0P4+taywYpMzlA NgLkZhPcHRZRnpB7ryVBeh/aimQZSIVYHdg3ild13Dd1tQ89RHg7IPqtMUnaeG8occpY iaf2EniO8gVkxLf70o5mM+ds7tBvRjU/1M+mhD8N/nou5ZuMosnANAaDqdddt2tOlaWn TW8px/1LmmogYA6GkHGcfB0MiMH2ISKWd8ST6p+drra0VqZc6T/ByKnnmaZv+AgU3178 piQCvUh98O62Gy2ozjAPVPBxyLwO/13vH7tyihE5Ku6U9GwPBDmtnrT5ZhndscR9EEgc FFUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BLA01oFV4J5GlvoqrcMHLaIMq8KumIWqDPPbGMC23js=; b=N19Hmj1SIC839J9xXwKGFK5VdJzNR2sqWgOEN0CAt1yrz1bz4LHGZy33CLpMXSOnfC EFURP1gUZ+QOyTKyYC+zlKTLoWL5rj/e4vgRhJl0EyVUTcs2OYbLna5Lh5N3mzhuq21M dnirwZH3yWd85xl2SSD03VfrIPQQocXR1l71zqExWa2uiyrG6qyKAJXHfefpK4EVAQs/ 2QZAInbUJE6YOXB+ZrVXLfXavjH7jne04GiYJhmGjtb/up1BwhxdkUyh02mfeqLPNeir C5HxFyw37EU1DTjHrTQE0royhrj0dXh9om3ikPH1MiQ4SDE4UAhIPa69xBvfe2F5o6SQ TIZA== X-Gm-Message-State: ANoB5pk7FxGyLbq4LcMmO2FDSl9RDfT4MNvzr8vQNfn6MWM/i1JifgRP DgXsnSz5680nJ8gooZEyTo8= X-Google-Smtp-Source: AA0mqf5fq3rBUa6kTPVHBqn3T7OYnEZ6JFAF46HkASAWgIwLqyjQ2YDWWL6C3HE26NKpiRiFYWEBLA== X-Received: by 2002:a17:90b:30f:b0:211:42a9:d132 with SMTP id ay15-20020a17090b030f00b0021142a9d132mr10562859pjb.8.1668354190222; Sun, 13 Nov 2022 07:43:10 -0800 (PST) Received: from localhost.localdomain ([14.5.161.132]) by smtp.gmail.com with ESMTPSA id w8-20020a1709026f0800b0018544ad1e8esm5304550plk.238.2022.11.13.07.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 07:43:09 -0800 (PST) From: Kang Minchul To: Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Kang Minchul Subject: [PATCH 1/3] libbpf: checkpatch: Fixed code alignments in btf.c Date: Mon, 14 Nov 2022 00:42:56 +0900 Message-Id: <20221113154258.36560-2-tegongkang@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221113154258.36560-1-tegongkang@gmail.com> References: <20221113154258.36560-1-tegongkang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Fixed some checkpatch issues in btf.c Signed-off-by: Kang Minchul --- tools/lib/bpf/btf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c index 3bd812bf88ff..71e165b09ed5 100644 --- a/tools/lib/bpf/btf.c +++ b/tools/lib/bpf/btf.c @@ -1724,7 +1724,8 @@ int btf__add_btf(struct btf *btf, const struct btf *s= rc_btf) memset(btf->strs_data + old_strs_len, 0, btf->hdr->str_len - old_strs_len= ); =20 /* and now restore original strings section size; types data size - * wasn't modified, so doesn't need restoring, see big comment above */ + * wasn't modified, so doesn't need restoring, see big comment above + */ btf->hdr->str_len =3D old_strs_len; =20 hashmap__free(p.str_off_map); @@ -2329,7 +2330,7 @@ int btf__add_restrict(struct btf *btf, int ref_type_i= d) */ int btf__add_type_tag(struct btf *btf, const char *value, int ref_type_id) { - if (!value|| !value[0]) + if (!value || !value[0]) return libbpf_err(-EINVAL); =20 return btf_add_ref_kind(btf, BTF_KIND_TYPE_TAG, value, ref_type_id); --=20 2.34.1 From nobody Mon Apr 13 13:15:05 2026 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 A431CC4332F for ; Sun, 13 Nov 2022 15:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235340AbiKMPn1 (ORCPT ); Sun, 13 Nov 2022 10:43:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235273AbiKMPnX (ORCPT ); Sun, 13 Nov 2022 10:43:23 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9604CDF64; Sun, 13 Nov 2022 07:43:15 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id b21so8008946plc.9; Sun, 13 Nov 2022 07:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nofCRpL3MvifHkw2V2hQLg22fSeqZVd0ZmEp5l62zAs=; b=SiNH2eNDSGfZDBznMfV99Y2Zu1VuNo18ICEdsjWN0IwVK6VymjI3/5q/g88Xtewmy1 MhgFJEWpSbEGNKdBYJ3Fx+rGBwst2b659QLi8UGjNJZ0GvGNC3OUMmTyxbH3P9n6U+4W jB6DG1eCniHzF8YddLAynuO1oDBwmFrkhfk0ihSTHmBdgXpO8WpBViE5EspCJ2Zt9j3D o2lc6ReTJN2F2hmF2ig9a8cfSxPGx/j2dL0t7cTOGnb4CaXvs1LIrMGLRRBUNmPu958H /Z531Mq3ByPGrQ7qy6SqZP7PulZf1CPiXf6isMvR7O+9wABKA1k9nxIfYzCG6fxQKa1e mc9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nofCRpL3MvifHkw2V2hQLg22fSeqZVd0ZmEp5l62zAs=; b=RrzvxRNTpmnR9Eaze81kzruh6zVWbWW66CectRbG1MJYOKl2p9Yz4efFXeY6hJIoPK nQ/bb1NyjbjG87WvYYFquQVnOkPv30fkXnHoHmnHq99O+GtybVOH62Mw60KS7h4i5a0w AfnfbwUl0udvN4Vj1ssPppq1hx/+zd9JppLUq9iL4d3U8W3c+1+sJaIo/493j4+JLDHw tkukyZoy2omhmaoCRerkbAGoYgDt9xSsxMy4Wu+XZ2zN3eSMjPEWBkYoeEsFdFtISCgG fNt4750jbUuSs0oCAvXfaKAv+sV0/cLDfQsyaWIxLed7iLDRqOqNaddGxiPnCYjaF/M8 i2DQ== X-Gm-Message-State: ANoB5pl+XqL1FKaDN08wot8IkZ38od33bSPri1Z/XtCuboVQLrIhCt0K pLBlOxoqQIWeOkfv7rTvT1Y= X-Google-Smtp-Source: AA0mqf5UWgCTwlRwRepw5tjOYfUeis9wdWHlysDUPGdQnDpNf0e6xoWEOqnDAKsg3aiWGeFo06OlIA== X-Received: by 2002:a17:902:9348:b0:186:b46d:da5e with SMTP id g8-20020a170902934800b00186b46dda5emr9631825plp.92.1668354195250; Sun, 13 Nov 2022 07:43:15 -0800 (PST) Received: from localhost.localdomain ([14.5.161.132]) by smtp.gmail.com with ESMTPSA id w8-20020a1709026f0800b0018544ad1e8esm5304550plk.238.2022.11.13.07.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 07:43:14 -0800 (PST) From: Kang Minchul To: Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Kang Minchul Subject: [PATCH 2/3] libbpf: Fixed various checkpatch issues in libbpf.c Date: Mon, 14 Nov 2022 00:42:57 +0900 Message-Id: <20221113154258.36560-3-tegongkang@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221113154258.36560-1-tegongkang@gmail.com> References: <20221113154258.36560-1-tegongkang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Fixed following checkpatch issues: WARNING: Block comments use a trailing */ on a separate line + * other BPF program's BTF object */ WARNING: Possible repeated word: 'be' + * name. This is important to be be able to find corresponding BTF ERROR: switch and case should be at the same indent + switch (ext->kcfg.sz) { + case 1: *(__u8 *)ext_val =3D value; break; + case 2: *(__u16 *)ext_val =3D value; break; + case 4: *(__u32 *)ext_val =3D value; break; + case 8: *(__u64 *)ext_val =3D value; break; + default: ERROR: trailing statements should be on next line + case 1: *(__u8 *)ext_val =3D value; break; ERROR: trailing statements should be on next line + case 2: *(__u16 *)ext_val =3D value; break; ERROR: trailing statements should be on next line + case 4: *(__u32 *)ext_val =3D value; break; ERROR: trailing statements should be on next line + case 8: *(__u64 *)ext_val =3D value; break; ERROR: code indent should use tabs where possible + }$ WARNING: please, no spaces at the start of a line + }$ WARNING: Block comments use a trailing */ on a separate line + * for faster search */ ERROR: code indent should use tabs where possible +^I^I^I^I^I^I &ext->kcfg.is_signed);$ WARNING: braces {} are not necessary for single statement blocks + if (err) { + return err; + } ERROR: code indent should use tabs where possible +^I^I^I^I sizeof(*obj->btf_modules), obj->btf_module_cnt + 1);$ Signed-off-by: Kang Minchul --- tools/lib/bpf/libbpf.c | 45 ++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 1d263885d635..b5df6aca06ea 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -347,7 +347,8 @@ enum sec_def_flags { SEC_ATTACHABLE =3D 2, SEC_ATTACHABLE_OPT =3D SEC_ATTACHABLE | SEC_EXP_ATTACH_OPT, /* attachment target is specified through BTF ID in either kernel or - * other BPF program's BTF object */ + * other BPF program's BTF object + */ SEC_ATTACH_BTF =3D 4, /* BPF program type allows sleeping/blocking in kernel */ SEC_SLEEPABLE =3D 8, @@ -488,7 +489,7 @@ struct bpf_map { char *name; /* real_name is defined for special internal maps (.rodata*, * .data*, .bss, .kconfig) and preserves their original ELF section - * name. This is important to be be able to find corresponding BTF + * name. This is important to be able to find corresponding BTF * DATASEC information. */ char *real_name; @@ -1863,12 +1864,20 @@ static int set_kcfg_value_num(struct extern_desc *e= xt, void *ext_val, return -ERANGE; } switch (ext->kcfg.sz) { - case 1: *(__u8 *)ext_val =3D value; break; - case 2: *(__u16 *)ext_val =3D value; break; - case 4: *(__u32 *)ext_val =3D value; break; - case 8: *(__u64 *)ext_val =3D value; break; - default: - return -EINVAL; + case 1: + *(__u8 *)ext_val =3D value; + break; + case 2: + *(__u16 *)ext_val =3D value; + break; + case 4: + *(__u32 *)ext_val =3D value; + break; + case 8: + *(__u64 *)ext_val =3D value; + break; + default: + return -EINVAL; } ext->is_set =3D true; return 0; @@ -2770,7 +2779,7 @@ static int bpf_object__sanitize_btf(struct bpf_object= *obj, struct btf *btf) m->type =3D enum64_placeholder_id; m->offset =3D 0; } - } + } } =20 return 0; @@ -3518,7 +3527,8 @@ static int bpf_object__elf_collect(struct bpf_object = *obj) } =20 /* sort BPF programs by section name and in-section instruction offset - * for faster search */ + * for faster search + */ if (obj->nr_programs) qsort(obj->programs, obj->nr_programs, sizeof(*obj->programs), cmp_progs= ); =20 @@ -3817,7 +3827,7 @@ static int bpf_object__collect_externs(struct bpf_obj= ect *obj) return -EINVAL; } ext->kcfg.type =3D find_kcfg_type(obj->btf, t->type, - &ext->kcfg.is_signed); + &ext->kcfg.is_signed); if (ext->kcfg.type =3D=3D KCFG_UNKNOWN) { pr_warn("extern (kcfg) '%s': type is unsupported\n", ext_name); return -ENOTSUP; @@ -4965,9 +4975,9 @@ bpf_object__reuse_map(struct bpf_map *map) =20 err =3D bpf_map__reuse_fd(map, pin_fd); close(pin_fd); - if (err) { + if (err) return err; - } + map->pinned =3D true; pr_debug("reused pinned map at '%s'\n", map->pin_path); =20 @@ -5485,7 +5495,7 @@ static int load_module_btfs(struct bpf_object *obj) } =20 err =3D libbpf_ensure_mem((void **)&obj->btf_modules, &obj->btf_module_c= ap, - sizeof(*obj->btf_modules), obj->btf_module_cnt + 1); + sizeof(*obj->btf_modules), obj->btf_module_cnt + 1); if (err) goto err_out; =20 @@ -6237,7 +6247,8 @@ bpf_object__reloc_code(struct bpf_object *obj, struct= bpf_program *main_prog, * prog; each main prog can have a different set of * subprograms appended (potentially in different order as * well), so position of any subprog can be different for - * different main programs */ + * different main programs + */ insn->imm =3D subprog->sub_insn_off - (prog->sub_insn_off + insn_idx) - = 1; =20 pr_debug("prog '%s': insn #%zu relocated, imm %d points to subprog '%s' = (now at %zu offset)\n", @@ -10995,7 +11006,7 @@ struct bpf_link *bpf_program__attach_usdt(const str= uct bpf_program *prog, =20 usdt_cookie =3D OPTS_GET(opts, usdt_cookie, 0); link =3D usdt_manager_attach_usdt(obj->usdt_man, prog, pid, binary_path, - usdt_provider, usdt_name, usdt_cookie); + usdt_provider, usdt_name, usdt_cookie); err =3D libbpf_get_error(link); if (err) return libbpf_err_ptr(err); @@ -12304,7 +12315,7 @@ int bpf_object__open_subskeleton(struct bpf_object_= subskeleton *s) btf =3D bpf_object__btf(s->obj); if (!btf) { pr_warn("subskeletons require BTF at runtime (object %s)\n", - bpf_object__name(s->obj)); + bpf_object__name(s->obj)); return libbpf_err(-errno); } =20 --=20 2.34.1 From nobody Mon Apr 13 13:15:05 2026 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 C3711C433FE for ; Sun, 13 Nov 2022 15:43:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235305AbiKMPnd (ORCPT ); Sun, 13 Nov 2022 10:43:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235318AbiKMPnY (ORCPT ); Sun, 13 Nov 2022 10:43:24 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C64EDFA4; Sun, 13 Nov 2022 07:43:20 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id c15-20020a17090a1d0f00b0021365864446so8517903pjd.4; Sun, 13 Nov 2022 07:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=glNV3HDqHMzCoh8Ah4WEKW8nahUdxNcLvcBYViX0gZ8=; b=nNZNx9+rD9hhlxFWnzjwqye866AAw4Zp9rfcLne1PPKJKIsmuvbbvYL62tp5H3nXqm 4pSLeCsdqgY/LAGUXMdTM/dCX7B4Meu7R2VOZo/j7b0x+z71eLuTCaMzHMFSmdys3ruc Wz7QBgNipSs93wmCgki5OLgre/O/235tsQB1GncwwXhHANIMoFtyH5PPkxL/Lep7PyVM 8sVPYlGRnZH8bNJTICvUZX5xPwQhekOW3OOnHtfY1juN+eEPMmi0fxwHLXsUXHTBRo7I mXOp17yj3D7vdIDTkJZLF6HsCvQUsHvMF+ChOlPjsZjtJoJSmimwDGdEXui6iXS7LAqq bdrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=glNV3HDqHMzCoh8Ah4WEKW8nahUdxNcLvcBYViX0gZ8=; b=11BsM0Adz3JhRCdaWNs+LHVGg47rpJhMWrN92RldCQu8HiQDowCALdTYdwVczEleMq TqNK8xhFWOtRXoju/pVYoJNQ01dJmduDmZeaCze6Jq0Z4Emk8W/bQUWnIixGJviAghxb 5pNAfXjjLW68zrNgYEtw4fQCvX/z9GwiNb2dhEZp7ltwfo3Oqo4lFoo3zjy8yknftr3E BypnbbdYsvdUcLL4xCeqdhOTp3IYe1Vg/KWR0BozeYuZitqYUHKqbSGsgklM7uM2Zxu8 BKu65YfvznAGBTb7n1cm2erC+93FImBwxONSlqm7WZ3H2yI6Oe0gMv18NOaoK/GVtY5j 9qsQ== X-Gm-Message-State: ANoB5pkOwLdbYrYjH0eMgvKH4NT32UmSsnk15ypan4YSa3igPYdpmlRK Ea8MmRUSXMH8oN/jlp5A97Y= X-Google-Smtp-Source: AA0mqf6VfitcdIjlZsT+T8nDdotvNZgjQQQ8Bls9q2b+jZE60c2iaxZTeNiQZi5U+I9I7oprhePu8g== X-Received: by 2002:a17:90a:fb92:b0:212:d9fe:a94 with SMTP id cp18-20020a17090afb9200b00212d9fe0a94mr10469741pjb.58.1668354199677; Sun, 13 Nov 2022 07:43:19 -0800 (PST) Received: from localhost.localdomain ([14.5.161.132]) by smtp.gmail.com with ESMTPSA id w8-20020a1709026f0800b0018544ad1e8esm5304550plk.238.2022.11.13.07.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 07:43:19 -0800 (PST) From: Kang Minchul To: Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Kang Minchul Subject: [PATCH 3/3] libbpf: checkpatch: Fixed code alignments in ringbuf.c Date: Mon, 14 Nov 2022 00:42:58 +0900 Message-Id: <20221113154258.36560-4-tegongkang@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221113154258.36560-1-tegongkang@gmail.com> References: <20221113154258.36560-1-tegongkang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Fixed some checkpatch issues in ringbuf.c Signed-off-by: Kang Minchul --- tools/lib/bpf/ringbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/bpf/ringbuf.c b/tools/lib/bpf/ringbuf.c index d285171d4b69..51808c5f0014 100644 --- a/tools/lib/bpf/ringbuf.c +++ b/tools/lib/bpf/ringbuf.c @@ -128,7 +128,7 @@ int ring_buffer__add(struct ring_buffer *rb, int map_fd, /* Map read-only producer page and data pages. We map twice as big * data size to allow simple reading of samples that wrap around the * end of a ring buffer. See kernel implementation for details. - * */ + */ tmp =3D mmap(NULL, rb->page_size + 2 * info.max_entries, PROT_READ, MAP_SHARED, map_fd, rb->page_size); if (tmp =3D=3D MAP_FAILED) { @@ -220,7 +220,7 @@ static inline int roundup_len(__u32 len) return (len + 7) / 8 * 8; } =20 -static int64_t ringbuf_process_ring(struct ring* r) +static int64_t ringbuf_process_ring(struct ring *r) { int *len_ptr, len, err; /* 64-bit to avoid overflow in case of extreme application behavior */ --=20 2.34.1