Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2730536rdg; Mon, 16 Oct 2023 13:03:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgr2T5NGLfatPLTNWxhQi3F7I5Ez5mA9FkjZZaXP7yfIsxenMzdY+eCLulBkaxE/iw3x9i X-Received: by 2002:a05:6a00:1891:b0:68f:c078:b0c9 with SMTP id x17-20020a056a00189100b0068fc078b0c9mr695003pfh.11.1697486620542; Mon, 16 Oct 2023 13:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697486620; cv=none; d=google.com; s=arc-20160816; b=QIDWt76MVONHwxI+LPavDy52aN8eFAjHpNmaFw+++3lIMyQx4y2tNO8z2xwB5PS0c8 Rb2b2dWOxSrktzLRvfWBgbaQ8hy8nPKl3eESkB99BmZNtPnc/2u4pC73AMvfIwwEbiH/ /bFyZDMAgahaYJmb8HereAC2wRGKjjxc/5XtG41gDsuBG3ie0b3BcJjnBch5sYvg00vQ P6VoAhMExNACI/bWpU9FQH1lvwVCAJkv9VGkVsLHZPon71iQcaeTyTgnV2Mv4k2yamzi M52dZDjr4Q+Rwn9QuiyxV7K4NHOG00gmMglhvxXfRLlaORr6KOnzCNtDDSB6LzJwyGeS sqDg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=twSoRI7fD3fsgqu8zSd58hsGsfvF+cfA5+PlahC+PsY=; fh=9iWeC36hAYBTc/F80uX/q4cVT16W9Xpp5mANJSeklqM=; b=PZOe1cPqsBMVOJYQ0Z/XTytiAFHISakI4FO6SlACN9HxUwDDfogDD/4+Sw/Y1n6XDw fCxmXUy3nsglP7269usWdkvQzoW49bJ3c0RcBG0hGats1/TN8V4G6QNKNFKaAXcTemOJ em69OBZ5qxSOKJkqwBRO/2uT7PzwQgK8Mdlf+Dx5qytBkdWCCsitaLRV2HJWy8jj30h6 pxJ4EF1X/yeI0d6N0TIfjDkK5LYpRYmw2FGLDmfAm3Cg3/aev8Y8h+93mJmI1HywFGm1 t5t4mzb52IEhik1ZIRf5WRYZwalNY55asaXDYiFvVx9ihEaezt7AxponTOnSFy9qBEIt mMpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cwO1bGAO; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q5-20020aa79825000000b006902507d409si475772pfl.174.2023.10.16.13.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:03:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cwO1bGAO; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 14F1A8029AC7; Mon, 16 Oct 2023 13:03:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232046AbjJPUDh (ORCPT + 99 others); Mon, 16 Oct 2023 16:03:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232792AbjJPUDe (ORCPT ); Mon, 16 Oct 2023 16:03:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E06AEA; Mon, 16 Oct 2023 13:03:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E978C433C7; Mon, 16 Oct 2023 20:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697486612; bh=vuVQ78sxmBFgv5vVcwICGwoG+DfomOY79aR9/3vI29A=; h=From:To:Cc:Subject:Date:From; b=cwO1bGAOBBaJWckr/g3z6ld9vHdkYM/GFpFtTYy1BXz9nDUc3j7gCMXtTBd4QGUbc Nbs0+gL08VAudYHFrLgSY8Ljlz4VyW/Atrx3KFVVfi0aV6vHaiVsFO2E9dpyhjwS3A xtD1LoMvpr1/jW1ovt2JsbTHSM6V9dkFs3jQDkfRRO0/03T3BbBzeUAEPyn1+wEeJo 7Rmhqt6nY/1ZcMoE4nnQecdQGtOinG6F46Zvi3OpXL1iLpcEtqovsiqicdlifLb+RG oY12HqEkcylvqhSO/2tdvHqJ3Udk5q5YgMAhoiWkPufBFbknBuRUykMIbVWS/CFcrz hphfzPzr6WXqg== From: Arnd Bergmann To: Herbert Xu , "David S. Miller" , Om Prakash Singh , Neil Armstrong , Bjorn Andersson Cc: Arnd Bergmann , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: qcom: add HW_RANDOM dependency Date: Mon, 16 Oct 2023 22:02:57 +0200 Message-Id: <20231016200324.757455-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 16 Oct 2023 13:03:39 -0700 (PDT) From: Arnd Bergmann The driver now calls into the hwrng subsystem and causes a link failure if that is not reachable: x86_64-linux-ld: vmlinux.o: in function `qcom_rng_probe': qcom-rng.c:(.text+0xfefc7e): undefined reference to `devm_hwrng_register' Add a Kconfig dependency as we have for the pure hw_random drivers. I see that there are some other crypto drivers that instead use 'select HW_RANDOM', but those seem to be mistakes as that may lead to circular dependencies, and a simple driver should not force-enable an entire subsytem. Fixes: f29cd5bb64c25 ("crypto: qcom-rng - Add hw_random interface support") Signed-off-by: Arnd Bergmann --- drivers/crypto/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index c761952f0dc6d..79c3bb9c99c3b 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -601,6 +601,7 @@ config CRYPTO_DEV_QCE_SW_MAX_LEN config CRYPTO_DEV_QCOM_RNG tristate "Qualcomm Random Number Generator Driver" depends on ARCH_QCOM || COMPILE_TEST + depends on HW_RANDOM select CRYPTO_RNG help This driver provides support for the Random Number -- 2.39.2