From patchwork Mon Jun 18 14:34:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 138973 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4027829lji; Mon, 18 Jun 2018 07:34:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL7uWiFgrAZIgSlnB0tfiYVxg01R+T7KKSGbFO5mSCLmjG+8lFJbiZW4ue4vwBTRL5DSoFm X-Received: by 2002:a17:902:6bc7:: with SMTP id m7-v6mr14674673plt.162.1529332469909; Mon, 18 Jun 2018 07:34:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529332469; cv=none; d=google.com; s=arc-20160816; b=RVOks+YNGkn8U9rSXBJkwPmfdOJE4FHrkHRAOmlVNB/MkacbHDGq+XyDDYKr+6Pb26 8F2WieHAod9ZRVymd7oAkYhIha5g7FtuVzOzbIWRT8mggLOneZIninYAkLSgqehvoUeQ FwfY4qHE65g3MWF9/MxbPE13wU9CLBv0QDBrITa0TvAryJ2Yo3aYIry+D3qyqWt9M3hb 5pVQ+i2wtgkgURlDStEZ7NRFY4fHoWSVLePdU9fnFZ4AFOaCcZJRCyqq3EdW0TGm3POb SGR3uoPzXHbaBd54QAAxV5+9NHA9KPzQ0I33tTfpZ/EM0JIgaR/Q/6VWNrx0T3GRzdwz 4HFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=qe0hqLQmVxhJ1w9GhY9Elp2u5+Jd0TVJfeyAOtamVVM=; b=UU1M55XslH2GeBZZv7DYefKXfLbU+Nibklm/6jKvIkucda867yMyiEX3N6Fp4SbS79 qNw6yjPAd2crFHF5JBqV8q16bwnxeXkoW0lQpaFFU4ueR2tQ/w40bam+omZ8m1qi66sj 8N/OziQCff/iGeW5DF6M8jX5Asibj3FJ40RikOk6Tr6Ra+Pqf9bOWaauWWrgvniTPAg4 M2w5YF655MiBrsLlzPBK0rix/mnit6edgMzduz/MolvnB0jxLrKnSxmYondqpnorlCVI nZrPhmodjLeh/MoRObdHNpHiTLyvkzniKrZPYhDIHRG+bKvq+wLFF92sbTCatVl7d11l c5TA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si13953064pff.304.2018.06.18.07.34.29; Mon, 18 Jun 2018 07:34:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935072AbeFROe2 (ORCPT + 10 others); Mon, 18 Jun 2018 10:34:28 -0400 Received: from foss.arm.com ([217.140.101.70]:35338 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934678AbeFROe2 (ORCPT ); Mon, 18 Jun 2018 10:34:28 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 44D2C1529; Mon, 18 Jun 2018 07:34:28 -0700 (PDT) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 512A53F557; Mon, 18 Jun 2018 07:34:27 -0700 (PDT) From: Sudeep Holla To: linux-pm@vger.kernel.org Cc: Sudeep Holla , "Rafael J . Wysocki" , Daniel Lezcano Subject: [PATCH] ARM: cpuidle: silence error on driver registration failure Date: Mon, 18 Jun 2018 15:34:22 +0100 Message-Id: <1529332462-3956-1-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org It's perfectly fine to have multiple cpuidle driver compiled in the build configuration. However, it's not good to throw error on driver registration failure if some other driver is already initialised and assigned. In such cases, __cpuidle_register_driver returns -EBUSY and we can check for such error before throwing the error. Cc: Rafael J. Wysocki Cc: Daniel Lezcano Signed-off-by: Sudeep Holla --- drivers/cpuidle/cpuidle-arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Hi, I am seeing this error with multi_v7_defconfig but the platform doesn't use cpuidle-arm driver. Regards, Sudeep -- 2.7.4 Acked-by: Daniel Lezcano diff --git a/drivers/cpuidle/cpuidle-arm.c b/drivers/cpuidle/cpuidle-arm.c index e07bc7ace774..073557f433eb 100644 --- a/drivers/cpuidle/cpuidle-arm.c +++ b/drivers/cpuidle/cpuidle-arm.c @@ -105,7 +105,8 @@ static int __init arm_idle_init_cpu(int cpu) ret = cpuidle_register_driver(drv); if (ret) { - pr_err("Failed to register cpuidle driver\n"); + if (ret != -EBUSY) + pr_err("Failed to register cpuidle driver\n"); goto out_kfree_drv; }