Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5214599ybi; Tue, 11 Jun 2019 21:57:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeyQRMDIH38dmjMREKN+LhouqS0RFWjeJ2jOYbG6oiwGjy6ilWm9x6IIyybVpLGR+urnly X-Received: by 2002:a17:902:8a8f:: with SMTP id p15mr77938249plo.157.1560315434421; Tue, 11 Jun 2019 21:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560315434; cv=none; d=google.com; s=arc-20160816; b=I75ImH5wyOWoYXwFX4ibR1YXiAZPMpwonLPWTyGWUm58i6pdNZbGFyJXCLqh1zsIwA MBGlQJojcFYJcXmxSvPl6Q8nWkYHpJH6YwcexhttlZjvl2vur7GcOJ/JlTuP2KI1ja5u CsqkGNI+pi/2SFdIROhKxNaWX3XvdefFtcoJrcdESk9SVQxB9Vk5U0EooI4dUYUnWK50 NskVvJ+nDV2o00TFavcLBIFhr/+mYnOICQXlf8R0lFZVsf0zpmHCiDb/PJxis/NrVI76 kWx3GIy2FNQm5Q01Tj91YrOU5OEqQhb5Gos5M9+F3UpUqCzyGoE44ZhS6C0YuOqt6ZV/ /K7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mNIAFGKAT4x0J+YvaFo85wvPJ+RKo8a48owzXNJiBXA=; b=QVMiPr7x5clvp3yJVznk4AKYxUMT9Hcsw+871h/rLGVTEjsX/XqCN+pDI++B9JzYxw wEHT8eVN93R0AkkKUgj2ns9nc0ZvprdJBU4HJ6gu1AwxRPPcwduJ/jnHz5wH+q6znQBZ E4bogbZkgMfPmbOhvcfkBGoCOb6SrtqaRufchwR9BFDe6j91BNk9fL6xIWW7FruHhc55 CO3euVZoU8FuRLkFDEscEfd+YM33fj0D26GAoDdT2vgxN/euN15gU0gGfbhlSFAkLJoj OA8yoO3NCi49E+OVjstLTa5gzma34I3gJpgp2QDtmiYNTxcUsy2wsOqCKMKPCpLu+3gI GGLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7si7275928plq.246.2019.06.11.21.56.59; Tue, 11 Jun 2019 21:57:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436845AbfFKWWT (ORCPT + 99 others); Tue, 11 Jun 2019 18:22:19 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:29003 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436796AbfFKWWQ (ORCPT ); Tue, 11 Jun 2019 18:22:16 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Tue, 11 Jun 2019 15:22:11 -0700 Received: from rlwimi.localdomain (unknown [10.129.220.121]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id C52D641BAB; Tue, 11 Jun 2019 15:22:14 -0700 (PDT) From: Matt Helsley To: LKML CC: Ingo Molnar , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , Matt Helsley Subject: [PATCH v2 05/13] recordmcount: Kernel style function signature formatting Date: Tue, 11 Jun 2019 15:21:47 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII Received-SPF: None (EX13-EDG-OU-002.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The uwrite() and ulseek() functions are formatted inconsistently with the rest of the file and the kernel overall. While we're making other changes here let's fix this. Signed-off-by: Matt Helsley --- scripts/recordmcount.c | 21 +++++++-------------- scripts/recordmcount.h | 13 ++++++------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 584dcbf3f320..1c3599f07f9b 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -52,8 +52,7 @@ static void *file_append; /* added to the end of the file */ static size_t file_append_size; /* how much is added to end of file */ /* Per-file resource cleanup when multiple files. */ -static void -cleanup(void) +static void cleanup(void) { if (!mmap_failed) munmap(file_map, sb.st_size); @@ -68,8 +67,7 @@ cleanup(void) /* ulseek, uwrite, ...: Check return value for errors. */ -static off_t -ulseek(off_t const offset, int const whence) +static off_t ulseek(off_t const offset, int const whence) { switch (whence) { case SEEK_SET: @@ -89,8 +87,7 @@ ulseek(off_t const offset, int const whence) return file_ptr - file_map; } -static ssize_t -uwrite(void const *const buf, size_t const count) +static ssize_t uwrite(void const *const buf, size_t const count) { size_t cnt = count; off_t idx = 0; @@ -127,8 +124,7 @@ uwrite(void const *const buf, size_t const count) return count; } -static void * -umalloc(size_t size) +static void * umalloc(size_t size) { void *const addr = malloc(size); if (addr == 0) { @@ -394,8 +390,7 @@ static uint32_t (*w)(uint32_t); static uint32_t (*w2)(uint16_t); /* Names of the sections that could contain calls to mcount. */ -static int -is_mcounted_section_name(char const *const txtname) +static int is_mcounted_section_name(char const *const txtname) { return strncmp(".text", txtname, 5) == 0 || strcmp(".init.text", txtname) == 0 || @@ -446,8 +441,7 @@ static void MIPS64_r_info(Elf64_Rel *const rp, unsigned sym, unsigned type) }).r_info; } -static int -do_file(char const *const fname) +static int do_file(char const *const fname) { Elf32_Ehdr *const ehdr = mmap_file(fname); unsigned int reltype = 0; @@ -595,8 +589,7 @@ do_file(char const *const fname) return rc; } -int -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { const char ftrace[] = "/ftrace.o"; int ftrace_size = sizeof(ftrace) - 1; diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index f863d6fce066..3198459f7431 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -475,11 +475,10 @@ static unsigned find_secsym_ndx(unsigned const txtndx, char const *already_has_rel_mcount = "success"; /* our work here is done! */ /* Evade ISO C restriction: no declaration after statement in has_rel_mcount. */ -static char const * -__has_rel_mcount(Elf_Shdr const *const relhdr, /* is SHT_REL or SHT_RELA */ - Elf_Shdr const *const shdr0, - char const *const shstrtab, - char const *const fname) +static char const * __has_rel_mcount(Elf_Shdr const *const relhdr, /* reltype */ + Elf_Shdr const *const shdr0, + char const *const shstrtab, + char const *const fname) { /* .sh_info depends on .sh_type == SHT_REL[,A] */ Elf_Shdr const *const txthdr = &shdr0[w(relhdr->sh_info)]; @@ -531,8 +530,8 @@ static unsigned tot_relsize(Elf_Shdr const *const shdr0, /* Overall supervision for Elf32 ET_REL file. */ -static int -do_func(Elf_Ehdr *const ehdr, char const *const fname, unsigned const reltype) +static int do_func(Elf_Ehdr *const ehdr, char const *const fname, + unsigned const reltype) { Elf_Shdr *const shdr0 = (Elf_Shdr *)(_w(ehdr->e_shoff) + (void *)ehdr); -- 2.20.1