Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1188350lqh; Sun, 5 May 2024 22:21:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV89y2235jt2Wh3RAzmmvLkEjnK1jMh/wO4hFPN11JzWlz0swY4cGCg0fsVTDvyU47uyytED6Bpixn/pOw7JueqKgeafHOxzQSeeU6heQ== X-Google-Smtp-Source: AGHT+IFQ9jJf0xUTzp4cySuFFCgi2IlaLTVkRwqvDX1jaEOkiHdsuGmIw5EJ1P8z+uPInri1alJS X-Received: by 2002:a17:906:a159:b0:a58:e71d:d74 with SMTP id bu25-20020a170906a15900b00a58e71d0d74mr5571729ejb.13.1714972911854; Sun, 05 May 2024 22:21:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714972911; cv=pass; d=google.com; s=arc-20160816; b=yvagYZd2aiwg+wLLvDOL/CWcw6+CxdcwIQbSpDRgYeGjHoLFgYrT9368FHhcEJ11dX k26oUcr2Ht0jtCOWi6N9Du1xJQsEnrTNo4mgCOd87756ZWIL9IUY/Gv77EVtWNNp6oSb E6+DTcCZJTtIOQnO+b7fzXEZrsW6zgZB2T2DZ/61orWERnhgFLhLpWdNK1ciEaj0c+MR Ht1+P9iXZGjLOMm0gRw/aHNTfkqRNzviMwZ9nyxGys5SPQqfo0/UQn5+iYhNyVkh7Ldc zWNEMAraaYg70NwLWP1BpZINpD89/H0VltoiLqjRIINdnr20oQI/T7jrigZHF1FPMTJ9 BdXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=vWjxZFAQtUzSG8ZjNj2MYhuEH9iCsMprzk8/RIqmecw=; fh=/Nx/xqwiaowZ3/v+lHzqFkzYhhOIVvK/5rig48D6smw=; b=LpUniOkPnFuigQsew1UkwHOJ8m+MD9I74X5PkGHDDoW+kcuyjzm6BAZf3Hwwy1cuBa nH0U9O2b2OR8ec0eMeqN1p3PS/YHztGCNNBmY+k00RTQVXD2F/NG5SlkB8aj3sJWd3HI HscRbaZNxSLmyRRMm8icxMl9Wmkb2ArYuqgE6hDf0Ufrv0ZS0iTVT1HjjY5Pq8QdG8B/ fHyTevGRnL8q3/xGoQNFeJptN9tkB3n1J3pNrwjAQFLh+PpU1c2YzysbPRq5JVNte03a +uGA7kyA12V/5sl0O7BwhyYzBvwkaNQWzuf7JA3kmQqY0M2PqWh5Rjxt9HqW0mZuI82Q ACiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tqHS/vGn"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169315-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169315-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w1-20020a170906b18100b00a5888648f39si4518687ejy.162.2024.05.05.22.21.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 22:21:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169315-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tqHS/vGn"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169315-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169315-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 93DA51F21945 for ; Mon, 6 May 2024 05:21:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2621A4EB33; Mon, 6 May 2024 05:21:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tqHS/vGn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 18A90482C3; Mon, 6 May 2024 05:21:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714972876; cv=none; b=LHYY/yHn1EMpmKUUIsS7loS/vm8njq5ITML7Ui6hFnSNn+UjcRwyEIZEpzqv55ER+/dYHAn2uG0M61994bE2CBIYdXT4M/bfNvgk920T6guMnabKMsKLuV9Dvj9UWJSce/hluubqEVY7J8T3p2lVPhznsYnIfIdl1LC12GxxWbo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714972876; c=relaxed/simple; bh=IKlIvjuBn/H754DI9jvJWcFPcdV3jR8qdRnrj4+WI+E=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=gTNkp4lLt5ir7vVD9cX50esZmzprHcolyE25WBUBhthMgi4Yur3iBO0i4DXRuGC5r0xGmvjcjPFUkAWTrisd5914DK8fQp+95pZ0hZEZ9Foe9s10TIZaltM27fs7pxQVSTDxrIgIM+gW36mQ8iJAeQh4GXgN18mjrs2mW6C3aug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tqHS/vGn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5A56C116B1; Mon, 6 May 2024 05:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714972875; bh=IKlIvjuBn/H754DI9jvJWcFPcdV3jR8qdRnrj4+WI+E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tqHS/vGnvtQgm5ottAK403iYyDc6/kLmsTqJatmTnLywHGL2J4Yx3BQFHn8kIh5py nAooPFJ/9D/gp80HpsyAE7VLHtgoEXN2oFlLX5jPGy9UcaNhHy63gOMOzCBNTTjYzY zTp1VSdM3dp9bb6a1cRiUxYBB01w14LtjpGUitKZvmBd////F+XFWc+2WhNuCayL1f 5DKi+xN1JCPwBItgzdC22IH1kLTrDRX9bueAA25gRiT5J7ruCdhav0YQqrZ4kFm33e GoiquvMi/ejmmVn8rmJXrvcabBTLqBrTOjH9PoG8HDm8g2HgzSTiZfZk5HaOctZgEA vnVuNTv7yqmXw== Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-51f72a29f13so1793397e87.3; Sun, 05 May 2024 22:21:15 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUN5bEpBmEgr3VFQifDqAad5vcxr7JTmsV4nAOzCMOqLiX1hFq62oU34QTfvd32oBL7oElXIcSyMpIwBMX8bQ5cwujIJfjSalv+8gB1cWhJBS3K0zcNCt1MFYZVzDLfe6spJcM3VP8Brrt8P/nHONeTGKHIPrtN+wuF1WDPPeTm57lQfepwgjI= X-Gm-Message-State: AOJu0YzaY9FmWx1A2wyhiu7Pe6CI8Rekok3SQkU3tXm1E9qvibdT+EcT yNbbo6DHwUd+C2TMjx45w0KemVURI6FfKMU8vfOdtUJmj6wU4hEsh6fGO4O0aMOZgpQkeoQ24dX G8VpSsnur6at4brRsKVIhwXnV2wg= X-Received: by 2002:ac2:4189:0:b0:51d:aaf7:a92e with SMTP id z9-20020ac24189000000b0051daaf7a92emr6626911lfh.47.1714972874359; Sun, 05 May 2024 22:21:14 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240503091823.3616962-9-senozhatsky@chromium.org> <202405041440.UTBQZAaf-lkp@intel.com> <20240504071416.GH14947@google.com> <20240504161004.f5a0aab5e5aa1033d4696c20@linux-foundation.org> <20240505043957.GA8623@google.com> <20240505051305.GB8623@google.com> <20240505064832.GC8623@google.com> <20240506032207.GD8623@google.com> In-Reply-To: <20240506032207.GD8623@google.com> From: Masahiro Yamada Date: Mon, 6 May 2024 14:20:37 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 08/14] zram: check that backends array has at least one backend To: Sergey Senozhatsky Cc: Andrew Morton , linux-kbuild@vger.kernel.org, kernel test robot , Minchan Kim , llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, May 6, 2024 at 12:22=E2=80=AFPM Sergey Senozhatsky wrote: > > On (24/05/05 15:48), Sergey Senozhatsky wrote: > > On (24/05/05 14:13), Sergey Senozhatsky wrote: > > > On (24/05/05 13:39), Sergey Senozhatsky wrote: > > > [..] > > > > > I guess just pick one if none were selected. > > > > > > How do I pick one if none were selected? Does Kconfig support > > > something like that? > > > > This triggers Kconfig error: > > > > config ZRAM_EMPTY_BACKENDS_FIXUP > > bool > > depends on ZRAM && !ZRAM_BACKEND_LZO && !ZRAM_BACKEND_LZ4 && \ > > !ZRAM_BACKEND_LZ4HC && !ZRAM_BACKEND_ZSTD && \ > > !ZRAM_BACKEND_DEFLATE > > select ZRAM_BACKEND_LZO > > > > > > drivers/block/zram/Kconfig:17:error: recursive dependency detected! > > drivers/block/zram/Kconfig:17: symbol ZRAM_BACKEND_LZO is selected by = ZRAM_EMPTY_BACKENDS_FIXUP > > drivers/block/zram/Kconfig:52: symbol ZRAM_EMPTY_BACKENDS_FIXUP depend= s on ZRAM_BACKEND_LZO > > > > > > I'm a little surprised by this - EMPTY_BACKENDS_FIXUP does not depend > > on ZRAM_BACKEND_LZO, it depends on NOT ZRAM_BACKEND_LZO. > > > > Let me Cc linux-kbuild. Kbuild folks, how do I workaround this? > > Is this how one does it? > > config ZRAM_BACKEND_LZO > bool "lzo and lzo-rle compression support" > depends on ZRAM > default y if !ZRAM_BACKEND_LZ4 && !ZRAM_BACKEND_LZ4HC && \ > !ZRAM_BACKEND_ZSTD && !ZRAM_BACKEND_DEFLATE > default n > select LZO_COMPRESS > select LZO_DECOMPRESS > > > User still can select N and then we'll have empty backends, but > at least default is Y if none of the algorithms were selected. > Is it good enough? I interpret this sentence into: "randconfig will eventually disable all ZRAM_BACKEND_*, causing the build error again. Is it good enough, Arnd?" Some possible solutions: config ZRAM_BACKEND_FORCE_LZO def_bool !ZRAM_BACKEND_LZ4 && !ZRAM_BACKEND_LZ4HC && \ !ZRAM_BACKEND_ZSTD && !ZRAM_BACKEND_DEFLATE depends on ZRAM select ZRAM_BACKEND_LZO config ZRAM_BACKEND_LZO bool "lzo and lzo-rle compression support" depends on ZRAM select LZO_COMPRESS select LZO_DECOMPRESS OR config ZRAM_BACKEND_FORCE_LZO def_bool !ZRAM_BACKEND_LZ4 && !ZRAM_BACKEND_LZ4HC && \ !ZRAM_BACKEND_ZSTD && !ZRAM_BACKEND_DEFLATE config ZRAM_BACKEND_LZO bool "lzo and lzo-rle compression support" if !ZRAM_BACKEND_FORCE_L= ZO depends on ZRAM default ZRAM_BACKEND_FORCE_LZO select LZO_COMPRESS select LZO_DECOMPRESS BTW, "default n" you are adding are redundant. --=20 Best Regards Masahiro Yamada