Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751659AbbDBTsI (ORCPT ); Thu, 2 Apr 2015 15:48:08 -0400 Received: from mail-ob0-f178.google.com ([209.85.214.178]:35748 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbbDBTsF (ORCPT ); Thu, 2 Apr 2015 15:48:05 -0400 MIME-Version: 1.0 In-Reply-To: <551D9BF6.2070502@codeaurora.org> References: <42F2C5A0-5231-4D4B-95EE-7BC173A14768@codeaurora.org> <551D9BF6.2070502@codeaurora.org> From: Nicolas Dechesne Date: Thu, 2 Apr 2015 21:47:44 +0200 Message-ID: Subject: Re: [GIT PULL] qcom SoC changes for v4.1 To: Stephen Boyd Cc: Kumar Gala , arm@kernel.org, Olof Johansson , Arnd Bergmann , linux-arm-msm , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andy Gross , Lina Iyer , Tyler Baker Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2578 Lines: 64 On Thu, Apr 2, 2015 at 9:43 PM, Stephen Boyd wrote: > What about this patch squashed on top? Just guessing but I suspect we > don't care about cell-index if we're not doing the tcsr stuff. Also, I > imagine we could get rid of cell-index entirely if we matched against > the address of the gsbi instead. > > Signed-off-by: Stephen Boyd > > ----8<----- > > diff --git a/drivers/soc/qcom/qcom_gsbi.c b/drivers/soc/qcom/qcom_gsbi.c > index 09c669e70d63..ac7d71b6527d 100644 > --- a/drivers/soc/qcom/qcom_gsbi.c > +++ b/drivers/soc/qcom/qcom_gsbi.c > @@ -139,7 +139,7 @@ static int gsbi_probe(struct platform_device *pdev) > void __iomem *base; > struct gsbi_info *gsbi; > int i; > - u32 mask, gsbi_num; > + u32 mask, gsbi_num = 0; > const struct crci_config *config = NULL; > > gsbi = devm_kzalloc(&pdev->dev, sizeof(*gsbi), GFP_KERNEL); > @@ -166,16 +166,19 @@ static int gsbi_probe(struct platform_device *pdev) > > of_node_put(tcsr_node); > } > - } > > - if (of_property_read_u32(node, "cell-index", &gsbi_num)) { > - dev_err(&pdev->dev, "missing cell-index\n"); > - return -EINVAL; > - } > + if (config) { > + if (of_property_read_u32(node, "cell-index", &gsbi_num)) { > + dev_err(&pdev->dev, "missing cell-index\n"); > + return -EINVAL; > + } > + > + if (gsbi_num < 1 || gsbi_num > MAX_GSBI) { > + dev_err(&pdev->dev, "invalid cell-index\n"); > + return -EINVAL; > + } > + } > > - if (gsbi_num < 1 || gsbi_num > MAX_GSBI) { > - dev_err(&pdev->dev, "invalid cell-index\n"); > - return -EINVAL; > } > > if (of_property_read_u32(node, "qcom,mode", &gsbi->mode)) { I think it would work, i cannot test right now, i can do it tomorrow if you need it, but that's pretty much how i tested earlier today (i had commented out the 2 statements you are putting moving here in the new if statement. I did also test with the associated DT patches, and it worked as well. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/