Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp139926pxy; Tue, 20 Apr 2021 14:52:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBLLhZmTjBdtmvM/K44k6IBct0pJvoPvr2FlN/OUVeZ+C6WQWvj4+irgF+O5+w6EBCApE0 X-Received: by 2002:a05:6402:485:: with SMTP id k5mr34685151edv.211.1618955543561; Tue, 20 Apr 2021 14:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618955543; cv=none; d=google.com; s=arc-20160816; b=qM4L5Kw85Cd50D0CHBGeX5T1M3qMGtoBb8M/63ny3BW306cl7rCfJzaSOXqa1zIR26 4gZ302kxuWIyz3SmoSfZJ8ostFI+6miBTmKYOmAoLjhfvywVe3waOuwp6ErBIkMG3XCa EgFZ8WmE83srcfQcM5mA4f5XIc5K3qC0MqRKixcNnMgPYqcYZDrgF3bHeX8DrYwcMKLP ib0Htf7t1Tj9P/I7ryHHKlfImW6zwOJReslW28TUH1bY9LmOfGbJ/8PZmiHSkwtqFhpp 9eoF0fqYPETaImbaeGgDxwNdx8bL+zeeTH2Fomg9PcM7CVnxRAGmBdf/eKdjKJFL1iil 89fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SFxY7ZINiVkfJBwgddI5IfRF8IJdmESMPQk7SWg6uGA=; b=di1QHo8KtoENoyZDbHgZCgTIZNJqOwGIwdaB2L9EIn6jJrqufZViVyzuSoTHaEnBcQ oMEPC2ijI03oQLiBDySC/it0D7FcoFj+CznLthV5FVlBwk5FvJGCWLeztMrk94odzYej 7/JAXnM9uJwkw5c4PGOvC2BZxqOy0MDwFnzSy2e17A+v3DoFZOhWv19M+95KRiVYpldB L/kvM4DHoh8foU+Pdl03rWAhMfnXXxLx7DYT/RfPQf3DKQCeq4s1kCdx0VOupi37y5B9 fV2L5xQV2u24WDBqQzxox75EcyhZGGBeAwkPcvwQxPjvd1N2TUFkYTgHnFaaHzXrFJ5K mgww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=M9pIfIFl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si262650ede.570.2021.04.20.14.52.00; Tue, 20 Apr 2021 14:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=M9pIfIFl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234268AbhDTVvB (ORCPT + 99 others); Tue, 20 Apr 2021 17:51:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234192AbhDTVuq (ORCPT ); Tue, 20 Apr 2021 17:50:46 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20101C06138A for ; Tue, 20 Apr 2021 14:50:14 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id u7so18620158plr.6 for ; Tue, 20 Apr 2021 14:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SFxY7ZINiVkfJBwgddI5IfRF8IJdmESMPQk7SWg6uGA=; b=M9pIfIFluB5GPh2oNFPYn+52ZMZjIoFjjRK+nRByHKY5GxBWxzU5uI2OthKleL/DDd +Kc5xfRQg+h8rVFE2W61MM+D9MfTBIMvgOysWXuSMm+2aklFE5yIUyubQjG16emalSvM 8f3bsA6HJLJyiN8znbIlQ9DvFuG1Yh2HXSAgc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SFxY7ZINiVkfJBwgddI5IfRF8IJdmESMPQk7SWg6uGA=; b=L8d+RWa0TE3rOixyqXy/FpFKIquuI3S8/9oo3cjsl3pFYZeyDfwVODfUvnrHt0vrzu TdfKaDECH7DQTuWU2bRga16WKVi2caTx2uL1+usJmzkEmfWavy1ITYZYIEznSfXm7i5S kcTlxSwLUyHsuB39rQC8EirnuWcBDMh9RUn6kAhkQ/sK77LFRrUyshrL0La2bmEq9XXX 2s4bVhSD5GoLp9kPVJqItTQPkSu77ywxiIvujRSRCAajiBN6tXcBB/bG7/iyVO6ViJhj l1vnOdFLO7czuSe/s0kYJnpJa378/NdHHJD4MCWXa7pq6JgKf2ufDcE/mZ7cYUQoFYvY 4OIQ== X-Gm-Message-State: AOAM533jPc7/dPLeRP+G89Cg7CbYw/crR6YnJ6JImJtMhYfz0y/dbILb r+mXat2efcQz9fUy8oxmWKjrEKmo+hMBew== X-Received: by 2002:a17:902:7043:b029:ec:939f:c9e5 with SMTP id h3-20020a1709027043b02900ec939fc9e5mr17924699plt.64.1618955413739; Tue, 20 Apr 2021 14:50:13 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:bf8b:4b8b:2315:3719]) by smtp.gmail.com with ESMTPSA id c21sm31481pfo.91.2021.04.20.14.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 14:50:13 -0700 (PDT) From: Stephen Boyd To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Alexei Starovoitov , Jessica Yu , Evan Green , Hsin-Yi Wang Subject: [PATCH v5 11/13] buildid: Mark some arguments const Date: Tue, 20 Apr 2021 14:50:01 -0700 Message-Id: <20210420215003.3510247-12-swboyd@chromium.org> X-Mailer: git-send-email 2.31.1.368.gbe11c130af-goog In-Reply-To: <20210420215003.3510247-1-swboyd@chromium.org> References: <20210420215003.3510247-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These arguments are never modified so they can be marked const to indicate as such. Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Signed-off-by: Stephen Boyd --- lib/buildid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/buildid.c b/lib/buildid.c index 530dbd1f6bbe..a7edab4914e6 100644 --- a/lib/buildid.c +++ b/lib/buildid.c @@ -48,10 +48,10 @@ static int parse_build_id_buf(unsigned char *build_id, return -EINVAL; } -static inline int parse_build_id(void *page_addr, +static inline int parse_build_id(const void *page_addr, unsigned char *build_id, __u32 *size, - void *note_start, + const void *note_start, Elf32_Word note_size) { /* check for overflow */ @@ -66,7 +66,7 @@ static inline int parse_build_id(void *page_addr, } /* Parse build ID from 32-bit ELF */ -static int get_build_id_32(void *page_addr, unsigned char *build_id, +static int get_build_id_32(const void *page_addr, unsigned char *build_id, __u32 *size) { Elf32_Ehdr *ehdr = (Elf32_Ehdr *)page_addr; @@ -91,7 +91,7 @@ static int get_build_id_32(void *page_addr, unsigned char *build_id, } /* Parse build ID from 64-bit ELF */ -static int get_build_id_64(void *page_addr, unsigned char *build_id, +static int get_build_id_64(const void *page_addr, unsigned char *build_id, __u32 *size) { Elf64_Ehdr *ehdr = (Elf64_Ehdr *)page_addr; -- https://chromeos.dev