Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6389774ybi; Wed, 31 Jul 2019 13:30:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3zgkm2BTvFThioj+GkofokluPgH8AT09ZSzHJUgQKbmnCOXUeEhnJszVlyF/wMkIsRqWT X-Received: by 2002:a17:902:b48f:: with SMTP id y15mr124647818plr.268.1564605032910; Wed, 31 Jul 2019 13:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564605032; cv=none; d=google.com; s=arc-20160816; b=RtHgDZhv+fKvmcZEwepl2f14S+WFLxjDcxzILXoswIGCddItGBcOQGWKX/5LbGsiNe 3REOBfICAtSteaTQOKXgNXsLktML1eCgF8QLNlowK1hWeuRtAHROs1FrQzrRTWK7Ahxh Th0t0YTU0jhg6hIP/NUUPTKuSQKtpmeS5+HczZK+4O5D4M8cbehiRDze3K4OCMABD7fv MDWcmJcP4x0u1YvSn/LRQYL74V9jQw/RlPMBy1Ia7A0kqOW+4FODQCNG1stQb/I8HKZf yPD1vcqYelFntYU8QkZKKPzee4zVlRTcDL2fdtWG/xTdjuEvKhTEXOuLtoRUCU6pcgzo gNKg== 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=KOsyqiOySMRa+Qkj2YZTq0GbYdpchlic1mZsFdt/qhw=; b=TTR7rCPMiXj+58ZvNeSUB0fqB3tNKe5sxZ6o5HQzcKGfb0TYksOiNlr/xvAg6XM1ZG e3rhFjs1zJEmko4dQu+yrQ4t1rc2CLcps3cbEj0I083a6KfaHewj9QszP9fShZdVRdUy 8qLGOCENsjoZZVWFNaHrSc13Keu860s2RM2Eetfnf4CqJnLANKCcVl63JNhqTYtf01Jp xTQ9YRE9e9QoI906te62SRlVrs4+4ij2qIUOH9C+qytyEgRnY8YO6o3MAGcipVw/K9Ka pJoNWyWzkHieMeKaeSy1/UZMeFdnJ8qIQCXjsMKfAFi6mvb4KLOgt3VobNGwsteHRouC eMmw== 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 f10si2142109pjw.89.2019.07.31.13.30.17; Wed, 31 Jul 2019 13:30:32 -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 S1729918AbfGaSYy (ORCPT + 99 others); Wed, 31 Jul 2019 14:24:54 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:7789 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729781AbfGaSYr (ORCPT ); Wed, 31 Jul 2019 14:24:47 -0400 Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Wed, 31 Jul 2019 11:24:35 -0700 Received: from rlwimi.localdomain (unknown [10.166.66.112]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id C2853B285A; Wed, 31 Jul 2019 14:24:38 -0400 (EDT) From: Matt Helsley To: LKML CC: Ingo Molnar , Steven Rostedt , Matt Helsley Subject: [PATCH v4 5/8] recordmcount: Kernel style function signature formatting Date: Wed, 31 Jul 2019 11:24:13 -0700 Message-ID: <4c67698f734be9867a2aba7035fe0ce59e1e4423.1564596289.git.mhelsley@vmware.com> 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 c6d395b8ff29..67f9c45b824f 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 || @@ -448,8 +443,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; @@ -597,8 +591,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 3796eb37fb12..ca9aaac89bfb 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -468,11 +468,10 @@ static int find_secsym_ndx(unsigned const txtndx, } /* 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)]; @@ -524,8 +523,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