From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161863AbaKNUFa (ORCPT ); Fri, 14 Nov 2014 15:05:30 -0500 Received: from mail-ie0-f180.google.com ([209.85.223.180]:36874 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161796AbaKNUF2 (ORCPT ); Fri, 14 Nov 2014 15:05:28 -0500 MIME-Version: 1.0 X-Originating-IP: [46.116.100.67] In-Reply-To: <5466373B.2070808@ti.com> References: <1410553499-55951-1-git-send-email-s-anna@ti.com> <1410553499-55951-5-git-send-email-s-anna@ti.com> <5463B5B6.8040709@ti.com> <5464EC7A.7050603@ti.com> <54651C48.90809@ti.com> <5466373B.2070808@ti.com> From: Ohad Ben-Cohen Date: Fri, 14 Nov 2014 22:05:07 +0200 Message-ID: Subject: Re: [PATCHv6 4/5] hwspinlock/core: add common OF helpers To: Suman Anna Cc: Mark Rutland , Kumar Gala , Tony Lindgren , Josh Cartwright , Bjorn Andersson , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , linux-arm Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 14, 2014 at 7:09 PM, Suman Anna wrote: >> It seems to me that hwspin_lock_request_specific failures should be >> used by clients to defer their probing. Why wouldn't such a simple >> solution work? > Because the API always returns NULL on failures and there is no way for > the clients to figure out if the lock id passed is invalid or the bank > containing the lock is not registered. It seems to me this may always be the case - lock ids may be wrong and there's no way to fully validate them. Let's start with the simpler approach where hwspin_lock_request_specific failures are used by clients to defer their probing. If a real use case will require changes we can always do that later, though it seems to me the only gain by changing this API is to catch a small subset of fatal DT mistakes which will anyway be caught very early in the development. Thanks, Ohad.