From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932909AbeBUKUR (ORCPT ); Wed, 21 Feb 2018 05:20:17 -0500 Received: from mail-pf0-f182.google.com ([209.85.192.182]:42457 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932807AbeBUKTX (ORCPT ); Wed, 21 Feb 2018 05:19:23 -0500 X-Google-Smtp-Source: AH8x226EV8xgjycntukVBKG6eET/QT+BJiDqYifnB4mpQSQaCMaf/Ld/joofBVnDjtuenzsD3Avh3A== Date: Wed, 21 Feb 2018 15:49:20 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Michael Ellerman , Shilpasri G Bhat , "Rafael J. Wysocki" , Linux PM , Linux Kernel Mailing List , linuxppc-dev Subject: Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl() Message-ID: <20180221101920.GQ28462@vireshk-i7> References: <1518430876-24464-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <20180212102900.GU28462@vireshk-i7> <874lmasxxx.fsf@concordia.ellerman.id.au> <20180221055450.GO28462@vireshk-i7> <20180221100209.GP28462@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-02-18, 11:17, Rafael J. Wysocki wrote: > The driver is expected to call cpufreq_table_validate_and_show() at > ->init() time and fail ->init() if that fails. > > That's kind of fragile, because it depends on the driver to do the right thing. That's exactly what I am trying to explore here, i.e. Call validate/show from core instead of drivers. -- viresh