Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1121890ybp; Wed, 9 Oct 2019 09:06:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwM2MgS5SpRYdI3r7ZcJN8f4uMqJRA9Y8B35koodB8RA6EEJDePMCnXNXMogQTai019iO1Z X-Received: by 2002:a17:907:2118:: with SMTP id qn24mr3535645ejb.141.1570637161046; Wed, 09 Oct 2019 09:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570637161; cv=none; d=google.com; s=arc-20160816; b=KX70YiY2qDQ88pbvrBt0FHJF1wXUyX5DiliT95wakIAKlchDUNQ39jgJocvMW+PTpV EnfJ6D8XlfkhOtj45YOZP1dNLWOw5tK+Nda6J4Uh8XoN5BTV3qz8hwuEmQOvni+G/M2J KpUnoGWpG4e4EWBA9hiQtcbE6IpIynbwJ1/Xr3GwLeUXhRShz+DyH8LuPS8w5lr2wzt/ 4BZ2rjQmyacoXprrF6hiHbrl/H9eLgsu2PI3m7clmj6AWAcw0YzX7E08OQ41/E3wc7+/ v+MxlkAQ0HlKa1tvo9qabIFU4R8ok0/FlXUjzub01S1ApbzpQ8za7mixxRmqM2vPRge8 +wPQ== 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=17Y7y039jET7/TQrdZoED93OrqqyMRwnQxJ9vtZBzO8=; b=ZZugrFOroXSu6jSns/B6O/oqVhjL1QZrSVIlQsqoMnRJdoQIsQFyGOas56vtvj/ATO ZUhETjnCFi3kSjZxdAnDPWN1h6JDXrG3bLN3WKwGk79dQz3aH6viTFCmIZ5X0/+V+jI/ OnCozvLfJE0m4194sEkIuduoUbYZ+vNRqE4r55jq4YLE/jcy1YhUFZWGVrmfIZrXMrqm 7s6YBBJEjxLJUk3QZKFiuhAkshj88FfXuujsA37sPpva0Pq1nFn5pwlJzJd4bH7x/POB JK3FyfeiH/1gtG5jU1IxfYzYHeLDSEgOW4qpdIEZr4bj6LdMsE+yviTO05rARt8p+1HL WuTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="c9Atcn/E"; 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 a38si1541008edf.260.2019.10.09.09.05.35; Wed, 09 Oct 2019 09:06:01 -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="c9Atcn/E"; 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 S1731715AbfJIQCE (ORCPT + 99 others); Wed, 9 Oct 2019 12:02:04 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42125 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731706AbfJIQCE (ORCPT ); Wed, 9 Oct 2019 12:02:04 -0400 Received: by mail-lj1-f196.google.com with SMTP id y23so3021331lje.9 for ; Wed, 09 Oct 2019 09:02:02 -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=17Y7y039jET7/TQrdZoED93OrqqyMRwnQxJ9vtZBzO8=; b=c9Atcn/EI08Kf2cBMOvlLq7SNQ707PZ6EdVeCazR/Dm8zc5uaCAs3UNj/GYvUqYqzJ aMXdTfRdgQTYmaPwcj4QiAuKEHKcxMD9ezuazTOGBACs29dqmx3rbJGAvaRpsxX26MTQ fdzuLGgOcX6EDmt6y6XBhXYz14ayEhIMnEfqU= 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=17Y7y039jET7/TQrdZoED93OrqqyMRwnQxJ9vtZBzO8=; b=O/ADUof4HfZeySOGs2cZyCQewYG7kmxlVGBreN4Vh3PvzTrViLfkHAZEPGuQngVY+e rm8ApNQP21VHYD2+I4lN0pFCNO7xKekXo4k/vy7DRG8/uX8c50mceXjHp9m/+YOoetke 6fwTd1kSHq+dQaTC9fSQs7yodOGDn3+eHs4twIMvUR6yxqiMajr4M2vZAZoay4ZN7rZc zXoS2rp/ZiJF2QkKMlgCWtRfkH3bY3ILMzWprD2gXWtVdJ2XlEr7HqEwjBVqBUV7Dzun f2qufQIr4umw7lpKXpGUmfX7J4ZGxU5zkpKNV/8hFOCfUmUc7lzh19GRGfW3pSJXph9F dsAg== X-Gm-Message-State: APjAAAWawGTxHD+LmPdn4Wmmarss8qTpg4EUQB2cId9GMQzAaAff7VgR rCWueRg1zcGqy7MzlF4YgcoN3rf8iSM= X-Received: by 2002:a2e:9bd2:: with SMTP id w18mr2861800ljj.140.1570636921923; Wed, 09 Oct 2019 09:02:01 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id t22sm588882lfg.91.2019.10.09.09.02.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Oct 2019 09:02:00 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id l21so3063615lje.4 for ; Wed, 09 Oct 2019 09:02:00 -0700 (PDT) X-Received: by 2002:a2e:a41a:: with SMTP id p26mr2740656ljn.15.1570636919621; Wed, 09 Oct 2019 09:01:59 -0700 (PDT) MIME-Version: 1.0 References: <20191008234505.222991-1-swboyd@chromium.org> <20191008235504.GN63675@minitux> <5d9d3ed4.1c69fb81.5a936.2b18@mx.google.com> In-Reply-To: <5d9d3ed4.1c69fb81.5a936.2b18@mx.google.com> From: Evan Green Date: Wed, 9 Oct 2019 09:01:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/2] Avoid regmap debugfs collisions in qcom llcc driver To: Stephen Boyd Cc: Bjorn Andersson , Andy Gross , 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 Tue, Oct 8, 2019 at 6:58 PM Stephen Boyd wrote: > > Quoting Bjorn Andersson (2019-10-08 16:55:04) > > On Tue 08 Oct 16:45 PDT 2019, Stephen Boyd wrote: > > > @@ drivers/soc/qcom/llcc-slice.c > > > > > > static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER; > > > > > > --static const struct regmap_config llcc_regmap_config = { > > > +-static struct regmap_config llcc_regmap_config = { > > > - .reg_bits = 32, > > > - .reg_stride = 4, > > > - .val_bits = 32, > > > @@ drivers/soc/qcom/llcc-slice.c: static struct regmap *qcom_llcc_init_mmio(struct > > > { > > > struct resource *res; > > > void __iomem *base; > > > -+ static struct regmap_config llcc_regmap_config = { > > > ++ struct regmap_config llcc_regmap_config = { > > > > Now that this isn't static I like the end result better. Not sure about > > the need for splitting it in two patches, but if Evan is happy I'll take > > it. > > > > Well I split it into bug fix and micro-optimization so backport choices > can be made. But yeah, I hope Evan is happy enough to provide a > reviewed-by tag! It's definitely better without the static local since it no longer has the cognitive trap, but I still don't really get why we're messing with the global v. local aspect of it. We're now inconsistent with every other caller of this function, and for what exactly? We've traded some data space for a call to memset() and some instructions. I would have thought anecdotally that memory was the cheaper thing (ie cpu speeds stopped increasing awhile ago, but memory is still getting cheaper). But either way it's correct, so really it's fine if you ignore me :) -Evan