Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13024303ybl; Sun, 29 Dec 2019 03:01:18 -0800 (PST) X-Google-Smtp-Source: APXvYqxAur2WDagAVd/54EuJM+tHmYobUsMt+Yjs1KInS5PjslZBMtpBmL9IMY9aCiQO/pjsil7O X-Received: by 2002:a05:6830:184:: with SMTP id q4mr50775869ota.232.1577617278005; Sun, 29 Dec 2019 03:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577617277; cv=none; d=google.com; s=arc-20160816; b=w51UeaL7XnKM3EiFFZIn4rWjW+j+YR8TYkeAg2YZM0QP6rX1CUOXfIcBT8kLTQIRFq mJmYmfF4lWbrHCvsCbzPDhr8GBZT5bhc7McfLiBHX2Hm5OaL13PIRowBPF09p/QXvb7w tkdNCbDgoNlsA7uwBGbAiVGZIgI5ocIXeoP6mR5wL36ZwmLFRzHpB9AQ/ZYXdGnLtM8x CzaL7ukO/qCVRrDT1npPIw+yf7mJ9SBVs2uxHclmhwEJacSlQSvnQLZV4JqeS3HlH+ws nboQnvrwfDFQGE3HNFiTIg19bAvQ3Xd5d5usw+3NzbzXHOrkZp6JQ8tF2/BIpcvwt846 kAlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Gb+ONSF3piDYqauQDyCRW7orC1MjUr6i6hl9Z1quPME=; b=uTqPanwZFX0sSROU+9ZfmP8qY1aoVBs2vGxZ2mzOOEG1avXaPPpojqRgdg2Q37lJVD MB3PDWc038BWnm8T+0VDN4HteAxplE/v93rblxzSeqRNYMDOaysmtaEH5a0g936uBtCa b2qasHU/jaxgF4w4Mex4RMJMoFQTJ4HcCt+mAJsB9dwClBc4FKtItNfDHoVTkNZVsk/j ijMTFMARvYTj1s50/IBBbFYaFou8aIUcjX2u+Mn/oEnfxvOY04iQZ0/2arnD/5fql1dy MHROCEIm+3TSFpp3+OLljVBBu1s8R1/xA+v+ScAC5pSsosf0p3l82Pk2kEXtgOFXv4AD t75A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PNFNjOW0; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x207si19606239oif.30.2019.12.29.03.00.52; Sun, 29 Dec 2019 03:01:17 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=PNFNjOW0; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726395AbfL2KpG (ORCPT + 99 others); Sun, 29 Dec 2019 05:45:06 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:41370 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbfL2KpG (ORCPT ); Sun, 29 Dec 2019 05:45:06 -0500 Received: by mail-io1-f65.google.com with SMTP id c16so25674255ioo.8; Sun, 29 Dec 2019 02:45:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Gb+ONSF3piDYqauQDyCRW7orC1MjUr6i6hl9Z1quPME=; b=PNFNjOW0KqxeL09lLhXsrTTDSzd6SsVOoyS77t3cXLn1ztSzUtmLCMslU+TpoZsEGt UhlrF4VLGJmKv4PfluHNrqfxfzMa+EoeNmuVKRFdfyJrFvs38pBwRPeiFc8R6JfPw09c C2FKOjsdvXG7/fSeth3jH3Fddsdklf/u6AddHhcaA2kTOogA1xV+st97GSfSW+o8wZa0 GgECIUuDiLBcIEqavM3P+VqeJojsNIgP+Cc5U1Elbqg0ItREImJtrYJZONvY2vk32Ncz fJIQbgiOkF8tMu0MUDXWUfXAr6/jSKjoGGWhBY7o63jYb/50wYWFVdJwQajAWjI8PltS 3Xog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Gb+ONSF3piDYqauQDyCRW7orC1MjUr6i6hl9Z1quPME=; b=Yb/Bb7vTDRhb1v/XB2KHAxfkeWYF1oRzFghEgH71fyScM1j4o8bJ68qTDbO7xoGhzT O/0KzrqzlmNISlEj/nqy1enDr8208PWW4SxumtLpz9SyaRwSGtBCQHdkbWL+0hmy9Hif EZ5Yeqz//E7qqXYWYBHHbP176Sm+ZdGASWd8kik3ODTmcsLLayhYgCEpqgQ6QC06S7Z8 El+eEjZyH/+4GkSCFlPtXPbumDMWSumpYAcabcvNDcJEMvUFT3/pqm9KDomxOAcnXytC Z2nvvHUIZfTCvvsgRcjq9Drw8VPlx8WqD0YMABFzWNBsa7JskFRit5JGI9HYOB4JLsDc 3I3w== X-Gm-Message-State: APjAAAV/sIwfG8ysonxqVNGXySrOjZqmkGiRH2FchdRO46ku0eYi/MSP 9Uz+rMVNrWYHbYtr/sSCz/INv+eAxlPj6LbfWqA= X-Received: by 2002:a6b:b941:: with SMTP id j62mr43177730iof.168.1577616305444; Sun, 29 Dec 2019 02:45:05 -0800 (PST) MIME-Version: 1.0 References: <20191229104325.10132-1-tiny.windzz@gmail.com> <20191229104325.10132-2-tiny.windzz@gmail.com> In-Reply-To: <20191229104325.10132-2-tiny.windzz@gmail.com> From: Frank Lee Date: Sun, 29 Dec 2019 18:44:54 +0800 Message-ID: Subject: Re: [PATCH] platform: goldfish: pipe: switch to platform_get_irq To: Jonathan Corbet , Greg Kroah-Hartman , bgolaszewski@baylibre.com, Arnd Bergmann , Stephen Boyd , Mauro Carvalho Chehab , matti.vaittinen@fi.rohmeurope.com, phil.edworthy@renesas.com, suzuki.poulose@arm.com, saravanak@google.com, heikki.krogerus@linux.intel.com, dan.j.williams@intel.com, Joe Perches , jeffrey.t.kirsher@intel.com, mans@mansr.com, tglx@linutronix.de, hdegoede@redhat.com, Andrew Morton , Ulf Hansson , ztuowen@gmail.com, sergei.shtylyov@cogentembedded.com, linux-doc@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ignore this, I posted it just now... On Sun, Dec 29, 2019 at 6:43 PM Yangtao Li wrote: > > platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for > requesting IRQ's resources, as they can be not ready yet. Using > platform_get_irq() instead is preferred for getting IRQ even if it > was not retrieved earlier. > > Signed-off-by: Yangtao Li > --- > drivers/platform/goldfish/goldfish_pipe.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c > index cef0133aa47a..a1ebaec6eea9 100644 > --- a/drivers/platform/goldfish/goldfish_pipe.c > +++ b/drivers/platform/goldfish/goldfish_pipe.c > @@ -913,11 +913,9 @@ static int goldfish_pipe_probe(struct platform_device *pdev) > return -EINVAL; > } > > - r = platform_get_resource(pdev, IORESOURCE_IRQ, 0); > - if (!r) > - return -EINVAL; > - > - dev->irq = r->start; > + dev->irq = platform_get_irq(pdev, 0); > + if (dev->irq < 0) > + return dev->irq; > > /* > * Exchange the versions with the host device > -- > 2.17.1 >