Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1079944ybm; Wed, 22 May 2019 17:06:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhhltm2tBgSIFXGh5pDtZVRlOLLEbvoigwWEEg0l5LStOI0vQcAVoX27E/qNTwZuNDZRll X-Received: by 2002:a17:902:d896:: with SMTP id b22mr80787346plz.40.1558569994337; Wed, 22 May 2019 17:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558569994; cv=none; d=google.com; s=arc-20160816; b=IuD6mtqiQn9aZpB/kkIuzM5DDIoFxZdRKQku3VOcJJB1ewPGWZOgwdGUp0Afta2hSy IW1obTlkJc1bcasULxxb1wTx1e5NHSwV+M3R6TWpQSxPpnzmzA5mTW/8EDkxBRF+p2Iz uYNQ2vUa4AED0d3NSWBdQKoBj1oo4rRljQFGRo7jfW4vk28aeLJXWXsc0rdcf4UMeQNJ k9PCqLoFoqT1PpjseJO00+HwoleMNKN/LEcdZpsP6iqK4uMQsKNbLYAP57LRDDsBbrL3 /WcqYTek7Ll3dcf1fZWYaUOZysADDHMnN81AHUkftrS6IypzJJK21skMcftkfGkyM+iS VNvw== 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=MEhRGd6uBnF1MLQdV3+BuZT0v3ME8hu0aLkHlY1lJ/M=; b=sCbFADDDhROiUL9bp+k/pSixrRoKd/7hEw9zGkeESZASKZhZ2xWcemyalnUgmicEWE ukE7DZPfRn6iin0t49o23vb7JsnK16JFMMyQbwhAN2QRa27hWUZT3J9Z6tyW5WPuOb5T +HTzDuesNX9mnu75zosptBFN38tSB1sZ6CHaASvaMF6IhaoYbUHUtl9U1K9uMo1jMwXw ALfQz1q0uxb/qfSNpljIxasOel4b2xn4S4eWq607vAN8pwhBYEspv8qW4aSklDoJM9l9 yDg1OQj7rTVIFYGbLn9u91UCJr5zaLbI0pFPVZc/iuQAt4+HmkkkGSTX5QA+g4vGf9M7 m7Wg== 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 z1si26615718plb.48.2019.05.22.17.06.18; Wed, 22 May 2019 17:06:34 -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 S1729912AbfEWAEU (ORCPT + 99 others); Wed, 22 May 2019 20:04:20 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:13607 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729685AbfEWAEC (ORCPT ); Wed, 22 May 2019 20:04:02 -0400 Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Wed, 22 May 2019 17:03:41 -0700 Received: from rlwimi.localdomain (unknown [10.129.221.32]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 4310AB205A; Wed, 22 May 2019 20:03:55 -0400 (EDT) From: Matt Helsley To: LKML CC: Ingo Molnar , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , Matt Helsley Subject: [RFC][PATCH 05/13] recordmcount: Kernel style function signature formatting Date: Wed, 22 May 2019 17:03:28 -0700 Message-ID: <940d4ce66df8d8943142fd178dc066699de249c0.1558569448.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-001.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 21dda8a19c4f..f32a81251d5d 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 8423c51aa8e8..0ce8e0aaa5ec 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -476,11 +476,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)]; @@ -532,8 +531,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