Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4925394imm; Mon, 11 Jun 2018 22:53:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL1Mo4sjQDEdr7Y07ND0mRT5TDkVxD/htNrMTBPQK9XewCGuTIERrtAka8jTHrIsf9NP/IU X-Received: by 2002:a62:d712:: with SMTP id b18-v6mr2363019pfh.70.1528782813164; Mon, 11 Jun 2018 22:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528782813; cv=none; d=google.com; s=arc-20160816; b=1F7zL+4e0T/qmMlkix+UgcQhCH67MS9qhfR2YdpMYSq1FtWKusfQS8MiM5gKGEWHMs XFGWjmXD1wl9QS/ne8erb+r4zX3UowkttcvG0R0SDvgjR7MFPkDUv5aEJyn8FfkhBtKX DCAqxnddntFocuS6wg+ViSWRR4uFyfrhYkkk9SIzeECnVLKdorfLDLZnDVQKVAwlK1re PiVxkC7BDvzf+Bi4be1q2fy+gPjIcAtHOppRra6u6pPZrvkzB5YZ57Q7njcDIP5jiwrg w7VSNfYG8YNpflvPARNtnkZFnlqWTTHOvWi1ch8/Q/mFQxYarm8k89S38bIr25RaMIFz pGzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=97ry/NnHHo+wcXZxPqB+v4fQYqK/X//JU+h70cmakb0=; b=sdwZKpHHX1E8WSgDUnNMQ6e9pDhp5/aPuELvPbnbT1RchdLqar/FZX3Ejw5qz5dLyf VC/70BDysraeYoC+2MDGx+f2WHwaUPVw8bYlt3ndbIgBlOWtVuCMHKGy1p+dF6aIbMmr keEq0qao7RhHDuFx389Xm6EjVTl5o0cwsKC0P1C83xNPWfauztGJsJgbQLW8zbs32iGZ PQT9h2fWzsOg82Kv3IF11W30m6+tvJk2GQREPChylbSveovsMFqw+3X22aTf2SkIFeuD jYlgKfnQnvxSmNQ5DaOtBsHdT2hlKgwm0kZrVtfr+rZF1Z+P5j02SLEKI/4jFzVGCtIb HbOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wlmoIMn1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si68289pgp.157.2018.06.11.22.53.18; Mon, 11 Jun 2018 22:53:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wlmoIMn1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754292AbeFLFvM (ORCPT + 99 others); Tue, 12 Jun 2018 01:51:12 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:11943 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753380AbeFLFvK (ORCPT ); Tue, 12 Jun 2018 01:51:10 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w5C5p6fq007447; Tue, 12 Jun 2018 00:51:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1528782666; bh=97ry/NnHHo+wcXZxPqB+v4fQYqK/X//JU+h70cmakb0=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=wlmoIMn1qJqB1DSMQ4hm40XvB3N76tNz/sYa9Ug8v34cysG9iWkkH7AsPLiK+xuYp 3NEJRPe3Jw0y5IexOi/x4/27s5r0f8wzzLoaw/SRmD9UVBG7taoLZfRwLpthtN57/T 40jMIWRLOE0saQrjWAPwQydr6Fp1uxbf+PA9NXQA= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w5C5p5T3031286; Tue, 12 Jun 2018 00:51:06 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 12 Jun 2018 00:51:05 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 12 Jun 2018 00:51:05 -0500 Received: from [172.24.191.45] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w5C5p2nO026889; Tue, 12 Jun 2018 00:51:03 -0500 Subject: Re: [PATCH v2 1/2] gpio: davinci: Shuffle IRQ resource fetching from DT to beginning of probe To: Alexander Stein CC: , , , , References: <1528781273-18098-1-git-send-email-j-keerthy@ti.com> <2368406.Am5sO8QqEf@ws-stein> From: Keerthy Message-ID: Date: Tue, 12 Jun 2018 11:21:02 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <2368406.Am5sO8QqEf@ws-stein> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 12 June 2018 11:15 AM, Alexander Stein wrote: > On Tuesday, June 12, 2018, 7:27:52 AM CEST Keerthy wrote: >> This is needed in case of PROBE_DEFER if IRQ resource is not yet ready. >> >> Signed-off-by: Keerthy >> --- >> [...] >> --- a/drivers/gpio/gpio-davinci.c >> +++ b/drivers/gpio/gpio-davinci.c >> [...] >> @@ -168,7 +168,7 @@ static int davinci_gpio_probe(struct platform_device *pdev) >> { >> static int ctrl_num, bank_base; >> int gpio, bank, ret = 0; >> - unsigned ngpio, nbank; >> + unsigned ngpio, nbank, bank_irq; > > bank_irq should be an int, not unsigned, no? Yes > >> struct davinci_gpio_controller *chips; >> struct davinci_gpio_platform_data *pdata; >> struct device *dev = &pdev->dev; >> @@ -209,6 +209,12 @@ static int davinci_gpio_probe(struct platform_device *pdev) >> if (IS_ERR(gpio_base)) >> return PTR_ERR(gpio_base); >> >> + bank_irq = platform_get_irq(pdev, 0); >> + if (bank_irq < 0) { > > This won't work using an unsigned. Thanks for catching this. I will correct this in v3. > > Best regards, > Alexander > > >