From patchwork Wed May 17 13:10:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 95254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1134878vqo; Wed, 17 May 2023 06:26:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4AE6lsc9EWZdj9xQOFwi0R1Z3bV+CBlkohVmsrW/TNQYoIU5v3RF2bKLZJQE1AS7Y8lxUd X-Received: by 2002:a17:90b:fd8:b0:24e:4231:ec6b with SMTP id gd24-20020a17090b0fd800b0024e4231ec6bmr39770619pjb.21.1684329974058; Wed, 17 May 2023 06:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684329974; cv=none; d=google.com; s=arc-20160816; b=hRGJhxuhrHnY56iZyNjKz/KnAXWDzXR/swCfEc7fqtkfElMvQdSt+aX1/oWTgSqQrB zFTrjZsCvPdVsSMEhPqo6U0bxqDMzWMOBNlQEc4Bp+MDTnyDMHaYkFD34FguxuIIgTZS TZm7dQ8Kb2eBmW1U36tVCklJTZEzSXye88YlPgE4pQRgpTJRe6FeLHaUbrxc7r6K0Bcn hu/l2s4IH193f7qX6XRbX88f1OFaYykj3iDwz79au8WFQgZduiIRbCJGyH2CbYhE+eSE cHYVju9djexVTUvphkz/rV1F4gpYaniSnu6plnuWDyRhvHWPCL4awgMkOMCEsAWoQhyC QKyg== 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=OKzeRdedpEc9gpshyDG/mck0jdPGYi7vz5VbYeuS6aU=; b=kt8N5rm18s+7BN85nDTe6FXCdmpg4BfxtKBvObbKYzlPuceBOksbAZYBKWWhGbSceU lQxtMx6GR098Dp5ubWhChKx7crl44EE9JSOiTwaAgfaCW0qKuLu8Pqm7HCuvIKs+pN0N djCH5+HBHPg6gYYN8f7OO+zirnhJ3AHreb+8UugLy4ctJ0wNdY/S+KcqBtp2v2W90QVm paH8+3VlvGH+Hu395+yeb0CvBBVcjnuP87JZRVX9ZcF8vjFWo9RAj7o99K965FoTPwUc XHyf9MxW+ketsQL/0ZtgcdT6w7zQxW0cwv+wtlvNMCaAw/v75cqOpyuVCqd5lJW1m9JC tbxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hhmQcB6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h24-20020a17090aa89800b00250a2e130ecsi1791317pjq.87.2023.05.17.06.25.58; Wed, 17 May 2023 06:26:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hhmQcB6W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230527AbjEQNM4 (ORCPT + 99 others); Wed, 17 May 2023 09:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231979AbjEQNMq (ORCPT ); Wed, 17 May 2023 09:12:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D26F57AB8; Wed, 17 May 2023 06:12:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4AAAC6470F; Wed, 17 May 2023 13:12:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FF66C4339C; Wed, 17 May 2023 13:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329144; bh=gekqQcdwspAqcYmV4wkiul0gbNa5okADC3lRsox7SxY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hhmQcB6Wb+ZcCRzLdjmx7/zFED4SNzs0NBaokc4G4Ef+SjGqplVRCUUlj8VOql7xc tVzUvC/YohY4HXanpHjF8gzBHtwkxcmoYXP+MIQ4qBiVNrFkbviwAVNhlQFEM5aG9z u0KG2wrGCIiO4fxkS7CsDg7SKssZvao8JQ1WexuQEtCpz47qaTuW3Z1bOQL/MmRcVt J43Gz9r687q17jYwvjwLN9fs0kn3xObEo5/anSq7dT5iAh0lVVtxnk6xLq54trRwvy bwp4gagapMiXtQeSik0KOYf0nVPAhKydrIyt2a5DIE7rfoyB8tfvUPUW3O+QL/VQu3 AKt6l4x3F+ppA== From: Arnd Bergmann To: Andrew Morton Cc: linux-mm@kvack.org, Arnd Bergmann , Russell King , Catalin Marinas , Will Deacon , Michal Simek , Thomas Bogendoerfer , Helge Deller , Michael Ellerman , Palmer Dabbelt , Heiko Carstens , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "Rafael J. Wysocki" , Paul Moore , Eric Paris , Dennis Zhou , Tejun Heo , Christoph Lameter , Pavel Machek , Peter Zijlstra , Waiman Long , Boqun Feng , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, audit@vger.kernel.org, linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Subject: [PATCH 06/14] locking: add lockevent_read() prototype Date: Wed, 17 May 2023 15:10:54 +0200 Message-Id: <20230517131102.934196-7-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517131102.934196-1-arnd@kernel.org> References: <20230517131102.934196-1-arnd@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766147986884525527?= X-GMAIL-MSGID: =?utf-8?q?1766147986884525527?= From: Arnd Bergmann lockevent_read() has a __weak definition and the only caller in kernel/locking/lock_events.c, plus a strong definition in qspinlock_stat.h that overrides it, but no other declaration. This causes a W=1 warning: kernel/locking/lock_events.c:61:16: error: no previous prototype for 'lockevent_read' [-Werror=missing-prototypes] Add shared prototype to avoid the warnings. Signed-off-by: Arnd Bergmann --- kernel/locking/lock_events.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/locking/lock_events.h b/kernel/locking/lock_events.h index 8c7e7d25f09c..a6016b91803d 100644 --- a/kernel/locking/lock_events.h +++ b/kernel/locking/lock_events.h @@ -57,4 +57,8 @@ static inline void __lockevent_add(enum lock_events event, int inc) #define lockevent_cond_inc(ev, c) #endif /* CONFIG_LOCK_EVENT_COUNTS */ + +ssize_t lockevent_read(struct file *file, char __user *user_buf, + size_t count, loff_t *ppos); + #endif /* __LOCKING_LOCK_EVENTS_H */