Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4806990ybp; Mon, 7 Oct 2019 14:22:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8LKmI4P1BN+VUtpw9VZa2DkxvddUS7PaegMiUdd101UyqqpjOysjJJxeAoQ79ItV5zZeT X-Received: by 2002:a17:906:e109:: with SMTP id gj9mr25178380ejb.160.1570483332777; Mon, 07 Oct 2019 14:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570483332; cv=none; d=google.com; s=arc-20160816; b=OPs6q2kAxSM3NZlo3tOpdc6DaCUBsAWRzXmivv9u+Z55eJMXmhp1fx6zn5mCkj9TcC 87pb7nivKCykvESq8Noy6OtlxP8Ml7hBCKbPqRDWKoCd0MS6v5GDp8+aT7pL+MB42ZFM iWk6OqMS7+A0/uhyx2QjOpz7lSoc4iCjNkv09290AteZiWW6Nmp8UAFvuBKhNpIii1Dm HOPX7CWk4ytQLd5ApGsDibf0m0U2YjB+RrbDrlQMtC9Hwa8CEmPbV87HmdjVIddApKcP xH/VQV7QGPM4jvxI7NBC2e/RxXMletG5WvyYDdn7vIM/z2QjO4EXovha14s09nBZS9xE rRMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=5VLA+DypLeafYgMw73YxMrbPmQsxALingE4Zwjp+3ro=; b=lQ1y09IjmSjBmXxD5HxoF3hVmxB4gzFqnaSllcO4FDPgFOUnDLdU1DMQKOd+LDbVHC XmsI2M288zUYFjF9TPu7/9aM8GRoOsntPB4TnFNvDJpGxrHPGqch5pRZ/slZDSHvL1vY v6u51D5E+vHsGW/l1A5ktL3JWqr4wsOD3o0NYnf99wkxkydj7cr6yRfadlCNLjXJH8+D SLUrxwOmwbM7vYV7uKHbCpjEQPTBC58BuLzaB+fA5Z49jNfyGdJxq7Ej9R/ViyLyaF/x 8MwWBSuIdoREoFO77rd14Jwc9MGVN++Q05/6HsnqtPwyp53fTHrsEIqc5Yt5HQh2QMyw p0Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AWhFRV0U; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o22si7678220ejb.285.2019.10.07.14.21.49; Mon, 07 Oct 2019 14:22:12 -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=@chromium.org header.s=google header.b=AWhFRV0U; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729473AbfJGVV2 (ORCPT + 99 others); Mon, 7 Oct 2019 17:21:28 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46054 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729412AbfJGVV2 (ORCPT ); Mon, 7 Oct 2019 17:21:28 -0400 Received: by mail-lj1-f193.google.com with SMTP id q64so15248145ljb.12 for ; Mon, 07 Oct 2019 14:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5VLA+DypLeafYgMw73YxMrbPmQsxALingE4Zwjp+3ro=; b=AWhFRV0UXf0UR44y+lps7DWiRDgcwTAKSPuFnQuRcaRad76GF2KfIOGkxzP0TbPSFN Slzj7O4yTkaekbF+DQG8a7x9UcPNvTsVlvXCvxLxKORld/I0xD2pNfPkT9lUG8BfX3+z ra21vWXRFvFnLWfftuIS9k4vqQbXMx5UVJm4c= 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:cc; bh=5VLA+DypLeafYgMw73YxMrbPmQsxALingE4Zwjp+3ro=; b=gqtjdL5SB8XmssKVrYLx57BaaI6aX5PX7IYtbzLmB/DOcCw4GaMmaoUveZjF32QZJb qVwbkMigm2MOsYcXV6p8Tnu978yx5NafnVv9OjgBNftuDTjFmUEg2wzHsV+ITiQh7P1C bjeHjftDCs3y0VAiIHjvJEPjROOz3DJG6Ljcj0aYV/h62NFnFCkoyQjRjdAX3tsL0wBe i8PuxpHqIfXlAs/0gkpP6YNpelUmfAhVMK83L3N8HI3zhJ7gaVhbRNhYhJU4dm3fhU3h jBW5aVTpE30W5UFljMCGoWgC2JsolC58173r4NZbEDPZim9pgDauNtKRf5IyI4FPo9fk uTxw== X-Gm-Message-State: APjAAAWUUMJnRZjCzONPj4DCKSyMNZ38c4HCG94C1ILEYp5SdYjye0hX L6/7OaSgciVe70gtKuFREAzlvZx0RxI= X-Received: by 2002:a2e:904c:: with SMTP id n12mr19105133ljg.139.1570483284959; Mon, 07 Oct 2019 14:21:24 -0700 (PDT) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com. [209.85.208.169]) by smtp.gmail.com with ESMTPSA id q5sm3073974lfm.93.2019.10.07.14.21.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Oct 2019 14:21:24 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id b20so15268440ljj.5 for ; Mon, 07 Oct 2019 14:21:23 -0700 (PDT) X-Received: by 2002:a2e:878b:: with SMTP id n11mr18063490lji.13.1570483283303; Mon, 07 Oct 2019 14:21:23 -0700 (PDT) MIME-Version: 1.0 References: <20191004233132.194336-1-swboyd@chromium.org> In-Reply-To: <20191004233132.194336-1-swboyd@chromium.org> From: Evan Green Date: Mon, 7 Oct 2019 14:20:47 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] soc: qcom: llcc: Name regmaps to avoid collisions To: Stephen Boyd Cc: Andy Gross , Bjorn Andersson , LKML , linux-arm-msm , Venkata Narendra Kumar Gutta 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 On Fri, Oct 4, 2019 at 4:31 PM Stephen Boyd wrote: > > We'll end up with debugfs collisions if we don't give names to the > regmaps created inside this driver. Copy the template config over into > this function and give the regmap the same name as the resource name. > > Fixes: 7f9c136216c7 ("soc: qcom: Add broadcast base for Last Level Cache Controller (LLCC)") > Cc: Venkata Narendra Kumar Gutta > Cc: Evan Green > Signed-off-by: Stephen Boyd > --- > drivers/soc/qcom/llcc-slice.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/soc/qcom/llcc-slice.c b/drivers/soc/qcom/llcc-slice.c > index 9090ea12eaf3..aa342938c403 100644 > --- a/drivers/soc/qcom/llcc-slice.c > +++ b/drivers/soc/qcom/llcc-slice.c > @@ -48,13 +48,6 @@ > > static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER; > > -static const struct regmap_config llcc_regmap_config = { > - .reg_bits = 32, > - .reg_stride = 4, > - .val_bits = 32, > - .fast_io = true, > -}; > - > /** > * llcc_slice_getd - get llcc slice descriptor > * @uid: usecase_id for the client > @@ -314,6 +307,12 @@ static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev, > { > struct resource *res; > void __iomem *base; > + static struct regmap_config llcc_regmap_config = { > + .reg_bits = 32, > + .reg_stride = 4, > + .val_bits = 32, > + .fast_io = true, > + }; Why did you move this to be a static local? I think it works, but it makes it look like this is a local variable that's possibly used out of scope. Maybe leave it as a global?