Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5653214rwb; Tue, 17 Jan 2023 17:06:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXsR6YqXC5gvaDFktZ3WJyOFUY1obXnsNC3bu1m/RipDZVMM6MdDItqi+5K3ZO7qlWC5dkYe X-Received: by 2002:a05:6402:448d:b0:498:2f9f:3442 with SMTP id er13-20020a056402448d00b004982f9f3442mr5359823edb.2.1674003989143; Tue, 17 Jan 2023 17:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674003989; cv=none; d=google.com; s=arc-20160816; b=C2yqcTh8mN3ASUx+Jt2jD4Dy6lz5MNCMRjLi8RBBar7SswSnl+uC8kDRrjTEoCUguy UtExd5T7uxXFI/NVEcoaL/k48cU8kfKh3hFbZKhN1Cc2KBhVxGT1QoAFp58HxGlThjl5 S8eP22PC/FDrNnixkJTnNELosvy7h1w2ac3OHnYpzxqsa8VNODZRoXY2b3xNuaHfJHBz gE8qAsHU8wDcIPruzkYmoGaCYD2NGTS78VgebWQYXRD82uHKKQZyrqLGHmS6PYqjMPDO /550tfHf7iBsMrnza9rBJU5mFpC0sIt8eBFrJv8rlVxhUteUSKjQgVudhtaWFkDBnA7J XTWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cieqYlPdo1uMWFm7OPSzxr4vtAv43xHg4HwlwY6s/6o=; b=bQ5zdBeM48P52k11EbJFihTrpP49aOdXARFDSooWQ6LShgaDkl03i3RiZPfMRKCSIt 2jO8gAn7F+JaHS14NYvKxPGk9N6+G48JC9nIUwVpi22q5ry497QSEi+pR3eT/8oz3TDq Nr5tlmgoZmBcsAm4AS/vMFF1BCmw1nN/M4eWUhBLwUjOq59FQ0wlmiqz+PELNuXoeCtb nDRSu03F9vT1bRXOf3i4JRgo3+A79iC7XEArWjOztHWCN36XyuapwwL+sGWM60KTkTe+ k3QQFEhHpm999tuIKKvTfuybzc7yOLpcbL5JutKzmjwZ+eXugesO4p+FCU5TEIOlGSCH QP7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nqQE3I29; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wz4-20020a170906fe4400b0084d43e4541csi12023830ejb.720.2023.01.17.17.06.18; Tue, 17 Jan 2023 17:06:29 -0800 (PST) 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=@chromium.org header.s=google header.b=nqQE3I29; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbjARAwD (ORCPT + 46 others); Tue, 17 Jan 2023 19:52:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbjARAuW (ORCPT ); Tue, 17 Jan 2023 19:50:22 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845E43D930 for ; Tue, 17 Jan 2023 16:39:16 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id 7-20020a17090a098700b002298931e366so597504pjo.2 for ; Tue, 17 Jan 2023 16:39:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=cieqYlPdo1uMWFm7OPSzxr4vtAv43xHg4HwlwY6s/6o=; b=nqQE3I29WTuB1rTwY0pbYNlIricDb7eFHBNxiFmsUP4hf5TXOZ5GFeHK+Dc+y19rzX vXOAwjPfo5kUNQrn1Uhl9kDcYlzIEgBvtYDIhP5olHCrhliwZ/+7LCZTgfOwpxi9FEzQ Z19T+0nFI64YC4Q/e2MbQ92gOYUxsOAMW3/gU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cieqYlPdo1uMWFm7OPSzxr4vtAv43xHg4HwlwY6s/6o=; b=ckVQRudkHBL76fNNKLusxa6D1aQNHRwxG+sQEGa+ym1sHi5uMfxaGMzSYLjnO4rPPr Oinegak+3YgZpsqMOeNSxMMA7oYEPgMPMtVAjGfXCwvSTIz7rrAE12Dfo7/SE3gePHhD gTQQNsWyTEdmoEVwI8Nsusln+L2h2kJNWy5qOYI0HGrS+uN8N91TfsXTsorsNuOL/cat xr6FlyVB2QMu5zdYN2Oy6GxV0BvvL2kGphYwbJNmTEWTCNjjDRW63e5/g3LpIJ/oc21G DZpjoZ0Z49HuDx7PdwbRuVA7s8mLbprzGBbZRLet4reeCmuVtA+zonx6Ndhdeg/utvo6 F7Tg== X-Gm-Message-State: AFqh2koWjHqSdnQJTT4LLMb6mWKpx+0vrC35FVeoYbKYqC7wzK7jQjK4 Zp0QCGJBj3/HC0lg5Blkf7Hkow== X-Received: by 2002:a17:902:ec90:b0:188:6b9c:d17d with SMTP id x16-20020a170902ec9000b001886b9cd17dmr35963362plg.16.1674002356047; Tue, 17 Jan 2023 16:39:16 -0800 (PST) Received: from google.com (KD124209188001.ppp-bb.dion.ne.jp. [124.209.188.1]) by smtp.gmail.com with ESMTPSA id ja15-20020a170902efcf00b0019493c84880sm4589973plb.188.2023.01.17.16.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 16:39:15 -0800 (PST) Date: Wed, 18 Jan 2023 09:39:11 +0900 From: Sergey Senozhatsky To: Arnd Bergmann Cc: Minchan Kim , Sergey Senozhatsky , Andrew Morton , Nhat Pham , Arnd Bergmann , Sebastian Andrzej Siewior , Alexey Romanov , "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] zsmalloc: avoid unused-function warning Message-ID: References: <20230117170507.2651972-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230117170507.2651972-1-arnd@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 On (23/01/17 18:04), Arnd Bergmann wrote: > obj_allocated() can be called from two places that are each > inside of an #ifdef. When both are disabled, the compiler warns: > > mm/zsmalloc.c:900:13: error: 'obj_allocated' defined but not used [-Werror=unused-function] > > Rather than trying to figure out the correct #ifdef, mark the > trivial function as 'inline', which implies __maybe_unused and > shuts up the warning. > > Fixes: 796c71ac728e ("zsmalloc: fix a race with deferred_handles storing") > Signed-off-by: Arnd Bergmann Reviewed-by: Sergey Senozhatsky