From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031497AbbJ3Wgy (ORCPT ); Fri, 30 Oct 2015 18:36:54 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51532 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030712AbbJ3Wgr (ORCPT ); Fri, 30 Oct 2015 18:36:47 -0400 Subject: Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver To: Arnd Bergmann , Sinan Kaya References: <1446174501-8870-1-git-send-email-okaya@codeaurora.org> <5741892.rRLhcI7KQG@wuerfel> <5633E442.3010003@codeaurora.org> <4552697.VhjWnxQoIo@wuerfel> Cc: dmaengine@vger.kernel.org, cov@codeaurora.org, jcm@redhat.com, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Vinod Koul , Dan Williams , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org From: Timur Tabi Message-ID: <5633F0FD.7060506@codeaurora.org> Date: Fri, 30 Oct 2015 17:36:45 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <4552697.VhjWnxQoIo@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30/2015 05:28 PM, Arnd Bergmann wrote: >>> > >Why ENODEV? Could you make this handle restarted system calls? >> > >> >This is the self test code. It gets called from probe. If there is a >> >problem with the device or system configuration, I don't want to enable >> >this device. I can certainly return a different error code though. >> >What's a good code? > I see. probe() is not restartable, so it cannot be -ERESTARTSYS. > > Maybe better use wait_event_timeout and not handle the signals then. > It will eventually time out if something goes wrong. What about -EPROBE_DEFER? Isn't that "restartable"? Granted, it's only supposed to be used if the driver is dependent on another driver to probe, so I'm not sure it applies here. If the self-test fails, then it is possible that it could succeed later? -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.