Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10011961ybi; Wed, 24 Jul 2019 14:08:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1xO9tRKy7pWlizLDe9toW5E+9L0N69oJ3/T/adTQgi0c4rf3ssloV+vb1e8ejsaJEWMTW X-Received: by 2002:a63:2252:: with SMTP id t18mr83421817pgm.5.1564002538464; Wed, 24 Jul 2019 14:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564002538; cv=none; d=google.com; s=arc-20160816; b=BQ0LMHo2K7W7san4Gq3gxkHsuP1HqpxTyoe4YIC8owYVIWwYCDSTtl9EC8dBM0VSK0 rLI7UHhDVmUvNNgIQpSkWx+ybGLYYGKdjyTkjYoVfv6V7pGnaQWwGvIuZqfrshlQ66lP 8o+r4p29D3hPMmgd8Rb1A/AaIC+9/PLC5PtA+rd3Ljnt6YlEIwvyaFKf4ALI9oBNbx9r IM+o/LxmrmmWzGeLXnVTW6cZJIIrb/DeCobak24cpYJC71yIOtsT3CY83fWXa5QPX7cy ogVNJduCCsQCECrrh8IOjUUS7se58x7YFs82cgEOMXZNf5LoP96imHLVd6sRVRxa6k1x OhGA== 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=M51EIvI0hi7Gf7kfuVHw+FRpER38rXGyQPjs6cVe164=; b=d4N5G35tRJWYrRHDAgqIOwVlgrU4NXRkxssjXSvfg+SQnhWZlrBA6hcX41QPNpkoFF Z7nFN8dmI5IRTKBzgF/fpZm3NBtYc++i907cMBdGmYSu4ZfdZEWaFGE9GxKRSVP/i9CA qmjieSnFVlMXhJGckjfCS4m6N7Po1QF6sBu/2Q/ZpHD+rlpz6EgMRby4H+i3Zmuclxv6 xoU8Lc0lGIQ8hqmm+vA6GvX9rZh+egRPPYrztYOeFHBMSHV9u4ykMvtHf2xeiGkWhP19 RmwvZzeK01W1UbctJGUf3ZWtNzGFgbRwLpHeZKwYM68Sfox1GgMNOqR0ZXvepsdU9Upo UH8g== 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 o1si14157295pld.278.2019.07.24.14.08.43; Wed, 24 Jul 2019 14:08:58 -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 S2388396AbfGXVGN (ORCPT + 99 others); Wed, 24 Jul 2019 17:06:13 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:26268 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387962AbfGXVF3 (ORCPT ); Wed, 24 Jul 2019 17:05:29 -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; Wed, 24 Jul 2019 14:05:12 -0700 Received: from rlwimi.localdomain (unknown [10.166.65.164]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 98955407D5; Wed, 24 Jul 2019 14:05:27 -0700 (PDT) From: Matt Helsley To: LKML CC: Ingo Molnar , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , Matt Helsley Subject: [PATCH v3 05/13] recordmcount: Kernel style function signature formatting Date: Wed, 24 Jul 2019 14:04:59 -0700 Message-ID: <3fdb45e4904152fdbbda964a389a8a3e79e29ffc.1563992889.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 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 909a3e4775c2..7778ab799bc7 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