From patchwork Tue Sep 9 19:25:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 37149 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1DA1F20491 for ; Tue, 9 Sep 2014 19:25:35 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id ij19sf2278824vcb.3 for ; Tue, 09 Sep 2014 12:25:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding; bh=BGV0Gto0b7BauLGXcBFdTOvVP+L0zo2h298lEZmeyMo=; b=BrFgQHQjPA5WLOn2qmSKGo/vRZjExEAmHHVji4QZ2fttz3Mf5/gCctCBp65k1l4YDN W2GOmxd5MlmM8vjWhvVIwBBYnL4TBTPVGip4TCah0YgMq7LJY5FCL6a9TR6jKY2E465h y9FDQmiSM/J36P/qvWWc6BIqZjJ9a4DseBQsLlbAAhg2onyUufp1DVtpIrnr/Flsb3zL wcz92HnJvRuyjZp0GJewDfTyyq+k6itN8NtrPtMymdXJong/PdEZMsjqK5jBO9T1YmJp UB1R38r5CpSBCaOzw6evmDgqgesdouCWeLKRbvoOx6T7LYVAwZ+LhJrUPVEe0Yd4M3cI fSDQ== X-Gm-Message-State: ALoCoQkqxJFths28Tx+Q8vW5j6ulre68kQHUP36+y4y5yYk83D5eh0WKtedMDG/40iHVHskaCFkb X-Received: by 10.236.117.141 with SMTP id j13mr22730361yhh.3.1410290734920; Tue, 09 Sep 2014 12:25:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.242 with SMTP id 105ls2348959qgx.17.gmail; Tue, 09 Sep 2014 12:25:34 -0700 (PDT) X-Received: by 10.52.145.204 with SMTP id sw12mr1992402vdb.79.1410290734827; Tue, 09 Sep 2014 12:25:34 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id um5si5537274vcb.53.2014.09.09.12.25.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Sep 2014 12:25:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id lf12so17654739vcb.34 for ; Tue, 09 Sep 2014 12:25:34 -0700 (PDT) X-Received: by 10.220.12.81 with SMTP id w17mr1451439vcw.39.1410290734713; Tue, 09 Sep 2014 12:25:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp332156vcb; Tue, 9 Sep 2014 12:25:34 -0700 (PDT) X-Received: by 10.66.164.9 with SMTP id ym9mr17969811pab.139.1410290733545; Tue, 09 Sep 2014 12:25:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uj6si24860341pab.63.2014.09.09.12.25.32 for ; Tue, 09 Sep 2014 12:25:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752395AbaIITZX (ORCPT + 27 others); Tue, 9 Sep 2014 15:25:23 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:41139 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbaIITZT convert rfc822-to-8bit (ORCPT ); Tue, 9 Sep 2014 15:25:19 -0400 Received: by mail-pa0-f42.google.com with SMTP id lj1so4823223pab.15 for ; Tue, 09 Sep 2014 12:25:18 -0700 (PDT) X-Received: by 10.68.69.8 with SMTP id a8mr8286696pbu.79.1410290718305; Tue, 09 Sep 2014 12:25:18 -0700 (PDT) Received: from localhost (pool-108-47-66-231.lsanca.fios.verizon.net. [108.47.66.231]) by mx.google.com with ESMTPSA id gf5sm12312349pbc.89.2014.09.09.12.25.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 09 Sep 2014 12:25:17 -0700 (PDT) MIME-Version: 1.0 To: Tomeu Vizoso From: Mike Turquette In-Reply-To: <20140909191205.19023.61366@quantum> Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, shawn.guo@freescale.com References: <1410271329-26637-1-git-send-email-tomeu.vizoso@collabora.com> <1410271497-27148-1-git-send-email-tomeu.vizoso@collabora.com> <20140909191205.19023.61366@quantum> Message-ID: <20140909192503.19023.33476@quantum> User-Agent: alot/0.3.5 Subject: Re: [PATCH v10 2/9] clk: Move all drivers to use internal API Date: Tue, 09 Sep 2014 12:25:03 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mturquette@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Quoting Mike Turquette (2014-09-09 12:12:05) > Quoting Tomeu Vizoso (2014-09-09 07:04:57) > > In preparation to change the public API to return a per-user clk structure, > > remove any usage of this public API from the clock implementations. > > > > The reason for having this in a separate commit from the one that introduces > > the implementation of the new functions is to separate the changes generated > > with Coccinelle from the rest, and keep the patches' size reasonable. > > > > Signed-off-by: Tomeu Vizoso > > Tested-by: Boris Brezillon > > Tested-by: Heiko Stuebner > > Acked-by: Boris Brezillon > > > > --- > > > > v10: * Add a few more files to be converted > > * Re-generate the patch on top of the latest changes > > Hi Tomeu, > > Generating this on top of linux-next is a no-go. I can't apply it to my > tree. The best thing is to generate it on top of -rc4, and that is what > I will merge. > > Running the script against linux-next is still very useful and lets us > patch up the stuff that is not going through the clk tree. E.g. the LPSS > driver is already in mainline, so just running the semantic patch > against -rc4 is sufficient for it. However a patch like Shawn's "ARM: > imx: add an exclusive gate clock type" came in through the i.MX tree and > we'll need to patch it after the fact. > > The best way to do that is for me to host a branch with just your > changes in it that everyone can pull in as a dependency with the same > commit ids. > > > > > diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c > > index bcbdbd2..f4c6ccf 100644 > > --- a/drivers/acpi/acpi_lpss.c > > +++ b/drivers/acpi/acpi_lpss.c > > @@ -11,7 +11,6 @@ > > */ > > > > #include > > -#include > > #include > > #include > > #include > > @@ -78,7 +77,7 @@ struct lpss_private_data { > > void __iomem *mmio_base; > > resource_size_t mmio_size; > > unsigned int fixed_clk_rate; > > - struct clk *clk; > > + struct clk_core *clk; > > const struct lpss_device_desc *dev_desc; > > u32 prv_reg_ctx[LPSS_PRV_REG_COUNT]; > > }; > > @@ -229,7 +228,7 @@ static int register_device_clock(struct acpi_device *adev, > > { > > const struct lpss_device_desc *dev_desc = pdata->dev_desc; > > const char *devname = dev_name(&adev->dev); > > - struct clk *clk = ERR_PTR(-ENODEV); > > + struct clk_core *clk = ERR_PTR(-ENODEV); > > struct lpss_clk_data *clk_data; > > const char *parent, *clk_name; > > void __iomem *prv_base; > > I think the following hunk is missing from your change: > > --- a/drivers/acpi/acpi_lpss.c > +++ b/drivers/acpi/acpi_lpss.c > @@ -57,7 +57,7 @@ ACPI_MODULE_NAME("acpi_lpss"); > struct lpss_shared_clock { > const char *name; > unsigned long rate; > - struct clk *clk; > + struct clk_core *clk; > }; Looks like this hunk is missing as well: Without that change the following code will explode: static int register_device_clock(struct acpi_device *adev, struct lpss_private_data *pdata) { const struct lpss_device_desc *dev_desc = pdata->dev_desc; struct lpss_shared_clock *shared_clock = dev_desc->shared_clock; const char *devname = dev_name(&adev->dev); struct clk_core *clk = ERR_PTR(-ENODEV); struct lpss_clk_data *clk_data; const char *parent, *clk_name; void __iomem *prv_base; if (!lpss_clk_dev) lpt_register_clock_device(); clk_data = platform_get_drvdata(lpss_clk_dev); if (!clk_data) return -ENODEV; if (dev_desc->clkdev_name) { clk_register_clkdev(clk_data->clk, dev_desc->clkdev_name, devname); return 0; } I'm starting to get nervous about this Coccinelle script... Seems like a lot of things are slipping through. Regards, Mike > > > Otherwise register_device_clock will blow up because we are assigning a > struct clk * to a struct clk_core *. > > Do you mind testing with ARCH=x86_64 and allmodconfig? That will help > catch issues like this. > > Regards, > Mike --- 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/ diff --git a/include/linux/platform_data/clk-lpss.h b/include/linux/platform_data/clk-lpss.h index 2390199..3c3237c 100644 --- a/include/linux/platform_data/clk-lpss.h +++ b/include/linux/platform_data/clk-lpss.h @@ -15,7 +15,7 @@ struct lpss_clk_data { const char *name; - struct clk *clk; + struct clk_core *clk; };