Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp319542rdb; Thu, 21 Dec 2023 10:01:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYUEPbZ6YVEm3WjFIfDXSE/ZVoFSyJPz8cy489R6R/IK2BsB4m9wa55KFSE4nCHFGyiyWL X-Received: by 2002:a17:902:7ec1:b0:1d4:f45:e357 with SMTP id p1-20020a1709027ec100b001d40f45e357mr8862plb.43.1703181661317; Thu, 21 Dec 2023 10:01:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703181661; cv=none; d=google.com; s=arc-20160816; b=mvwbaN5YxqCgzYP3LTm0eFRGiWlcHV5+ZOcQryxZ8hvvzUEgFdR0WBaa2JEj+O0qlF QFu1uQ93ogW+xfsLKr4qNGKsGDdEQ6rOjVRvZ8CbUNDGcEST0NY/zumIWP0xfXRSKS1D 6bmmQgTDHOtOT0H2oUrxiRo7jR3/ra6R4mosak0EZi9JQ93fUdsviY0jUxPnTC46v43H sPcPYQKeJHmX+soQtpe1kEXpheVnPO/2SCoUUGcmAIqo8B+MCyGONnuhNarB5MtL/kgb iSJ34D5M99IJk/MTpxiuax3H7uoF8rUU7+eRYEFOig7BRND5eWezN6u05Dm8sV9Fiw8w UpmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ztPTKR8sr9h6D18SGkQNBYXp/fqVZdKTe5VGqgvKvQk=; fh=rrYYxR7rPrfZ9oPDzrWqTdscfrSKKogWCwrUGRk3Wag=; b=ueLlOi61DMfWN3l3ftpazcgBnELyEPHS9+qjJiJsF86CAwrNg86rd0ZkNNIShOYpcs bc5WzAVGtS4gyS1O25fgENztr0mmf1oteI+gr86QbTYFWTCl25eTSDUQHWIePBqjODev m+cy7S6DHQvFwmYM2/7tYGCh8ke9nka3FePgaMDVZtRx2+gAATLuRFBhw0Xcoh2TEMl8 UvGRqPW07ox82hCcVaTtdr9eif4xcAegupg1+Dd/U/qkJQC2zWDdWqzCsP6apGVOpzMw sIPqJkwsTfPmHaMJc+iflBHvhT4lUuImgBiPXKymEi6nZxyoipZwgIfQLKKlNrIVzQph bJfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ea6gr3dH; spf=pass (google.com: domain of linux-kernel+bounces-8884-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8884-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e13-20020a170902d38d00b001d3970f52e2si1835100pld.353.2023.12.21.10.01.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 10:01:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8884-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ea6gr3dH; spf=pass (google.com: domain of linux-kernel+bounces-8884-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8884-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B89D22890A7 for ; Thu, 21 Dec 2023 18:01:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A397634F8; Thu, 21 Dec 2023 18:00:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ea6gr3dH" X-Original-To: linux-kernel@vger.kernel.org Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 822A55990A for ; Thu, 21 Dec 2023 18:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1703181649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ztPTKR8sr9h6D18SGkQNBYXp/fqVZdKTe5VGqgvKvQk=; b=ea6gr3dHoZVnBVxsz7Lv0gahIQ7R6TjWF+UWkxyDh6aRnEKLyT6WCUetH/UFbxrfUHM2nX ZiHFFaywum9XP//SPR5kuQLc5lxkrbC/ghAWwN1WS77TNJMUlFfKUnMlhUuaLnC/sPcJ4Y ZLmtpE2KnHgmrE0amIm/az1Ms2e+PQo= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Nathan Chancellor , Tetsuo Handa , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH mm] kasan: Mark unpoison_slab_object() as static Date: Thu, 21 Dec 2023 19:00:42 +0100 Message-Id: <20231221180042.104694-1-andrey.konovalov@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Nathan Chancellor With -Wmissing-prototypes enabled, there is a warning that unpoison_slab_object() has no prototype, breaking the build with CONFIG_WERROR=y: mm/kasan/common.c:271:6: error: no previous prototype for 'unpoison_slab_object' [-Werror=missing-prototypes] 271 | void unpoison_slab_object(struct kmem_cache *cache, void *object, gfp_t flags, | ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Mark the function as static, as it is not used outside of this translation unit, clearing up the warning. Fixes: 3f38c3c5bc40 ("kasan: save alloc stack traces for mempool") Signed-off-by: Nathan Chancellor Signed-off-by: Andrey Konovalov --- Changes v1->v2: - Mark as "static inline" instead of just "static". --- mm/kasan/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/kasan/common.c b/mm/kasan/common.c index ebb1b23d6480..f4255e807b74 100644 --- a/mm/kasan/common.c +++ b/mm/kasan/common.c @@ -277,8 +277,8 @@ void __kasan_kfree_large(void *ptr, unsigned long ip) /* The object will be poisoned by kasan_poison_pages(). */ } -void unpoison_slab_object(struct kmem_cache *cache, void *object, gfp_t flags, - bool init) +static inline void unpoison_slab_object(struct kmem_cache *cache, void *object, + gfp_t flags, bool init) { /* * Unpoison the whole object. For kmalloc() allocations, -- 2.25.1