Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2633089ybd; Thu, 27 Jun 2019 16:19:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo/+cDnj9R9mJirNazzbbF91wITMtPVk8UTzeLldlI2jdgzEQqQOUuAhWpkq43q/OHZIhb X-Received: by 2002:a65:6102:: with SMTP id z2mr6018348pgu.194.1561677592492; Thu, 27 Jun 2019 16:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561677592; cv=none; d=google.com; s=arc-20160816; b=Hl0hEQOoQqxwXdvsE0JtiwehXj3mdhf0cFgD6h2IpUbOe7QC6nbtWd6LjsmyJVK2io kM/8/ybcDLqseUvzJwHd6yZaI9frkky0vbJvPTDWfDBSzttSPCM9PzsTcczTv8X2sMhY NCwmZMZ0pdqJt4epoRg1q+nh+Mwz9faXPweQkv4zr1tgGdClPFpm9HNOg+EtVTUTqrmp prcjqTpJCIFbYmRXwqyexrDatQZtRN7raHMuzJgG+gMCkf2xWbjo0qIVGnwZnVQYpQYn E0n1QDOEuqrz6HTBRFtnz8JMCnjJU6z7Yv7y3uGBOzIY5xNwsd2/tYv5JodsjRNkewj9 +cgg== 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=Dcwak1hKcOO0mZc8QWnsef5QeqS9i+/5PrOgW4qPWe4=; b=qrLz3+3jJD6jGx4oSJxvvit/OQ2etDwNHd5w6mmOCUV8ReVsWuBTYG4gSIZ7s7c3vU fztyiK8Y1po8n7lsFx6DLVuKPXjMc+j0Z9QYBEC5VK8g+Q6YD75OIcreZ7kJTgArbWB0 XJ5fUR44ps3OluU4zfs/UuFi2fpxJrBH0fGswFV45zbXvyMFvL7ugSWaw0zLHebM1XFG xyIAJg1Vrn3dOUj7J64I/ISPHHuaG/UhT4+a7hjUcqGbSO32QEQBgqQ8rgNqetLbt/ve spjU8mJUYN+lZ89pTdg/nGeDRfjrDR/w1r+yo5+2+x1gyo2TLA5/wVbStY83l3JyqQZc 3Fbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=V0o8aHJf; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h124si422281pfb.242.2019.06.27.16.19.36; Thu, 27 Jun 2019 16:19:52 -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=@google.com header.s=20161025 header.b=V0o8aHJf; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726596AbfF0XT0 (ORCPT + 99 others); Thu, 27 Jun 2019 19:19:26 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41422 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbfF0XT0 (ORCPT ); Thu, 27 Jun 2019 19:19:26 -0400 Received: by mail-pg1-f195.google.com with SMTP id q4so215592pgj.8 for ; Thu, 27 Jun 2019 16:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Dcwak1hKcOO0mZc8QWnsef5QeqS9i+/5PrOgW4qPWe4=; b=V0o8aHJfjwOLLXWKXP3+WZKZnMDY82FMmJkgq0sDhZVWNm4fMt7ft/7CI8w2RhN1gE pet1zc7HZPwwC46ruxmBJxG31Uxo4rqRXMvyBNJ7BL6vupG/+RR/XqonKVcu8XmndUsZ mrOjv4xKgtwPp+30mLd6CKFQnk2gkxQhwgZF9267Vc89Ky2UtPQUv3vHQ693Fjx8uo1y G/4kMRCoseOn7VDRhFU+As3DtNFMgfhDEwZvhDLdstfNiopMAu0nC5KvYZdKmTZO/iwr mq3anUEZ2WRnCt6lijuvZVj7k1rpzFC6L9UpNySovsc6Vb20Bm67vtHpiaviGanbCTIM z0jg== 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=Dcwak1hKcOO0mZc8QWnsef5QeqS9i+/5PrOgW4qPWe4=; b=Kcv4k/0TY+eaDln6SAgc4TVCSiLY90BEZCJETraaN7GIdm4sl/H78boyLZbBMzOaGn rBy3o28F6aN6FTFKGibKGISV+AmrT9BeG/qTSnsi0KFo8cHb45Go4pxXnjK63Ov7J0Zj eDPBpJZQchHJlrDUHxwI15MZRFQlIrTfOPQPijU3uMqC8Imqc0cHuWZBhdKvkzcVr3aL TGJrJ7fMuoz+0EtVcCWpD484DLIWUNvz8ZGyr57b2hqqkJLPXtLsGNuVMdDqXe8quKcA BA1qfG5BCfTcVU4QmPIokG2qOEwwTTlh89Okgf3oJR2ESJ//sWZgeZRf8dALtZmVcDIA jnlg== X-Gm-Message-State: APjAAAUFZM7ZlymZyFR3y8WXs2VVPPmfBVHzyu+PfjNw5QO6e1kVz0di P8IpEoyqhvHQG3czqJD05fnW6ZbPIfg8GAbpo0rUdw== X-Received: by 2002:a63:78ca:: with SMTP id t193mr6150985pgc.10.1561677565201; Thu, 27 Jun 2019 16:19:25 -0700 (PDT) MIME-Version: 1.0 References: <20190627220642.78575-1-nhuck@google.com> In-Reply-To: <20190627220642.78575-1-nhuck@google.com> From: Nick Desaulniers Date: Thu, 27 Jun 2019 16:19:14 -0700 Message-ID: Subject: Re: [PATCH] clk: qoriq: Fix -Wunused-const-variable To: Nathan Huckleberry Cc: mturquette@baylibre.com, sboyd@kernel.org, yogeshnarayan.gaur@nxp.com, oss@buserror.net, linux-clk@vger.kernel.org, LKML , clang-built-linux 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 Thu, Jun 27, 2019 at 3:06 PM 'Nathan Huckleberry' via Clang Built Linux wrote: > > drivers/clk/clk-qoriq.c:138:38: warning: unused variable > 'p5020_cmux_grp1' [-Wunused-const-variable] static const struct > clockgen_muxinfo p5020_cmux_grp1 > > drivers/clk/clk-qoriq.c:146:38: warning: unused variable > 'p5020_cmux_grp2' [-Wunused-const-variable] static const struct > clockgen_muxinfo p5020_cmux_grp2 > > In the definition of the p5020 chip, the p2041 chip's info was used > instead. The p5020 and p2041 chips have different info. This is most > likely a typo. oops! Further, the definitions of p5020_cmux_grp1/p5020_cmux_grp2 are subtly different than p2041_cmux_grp1/p2041_cmux_grp2. Definitely looks copy+pasta related; I agree with your assessment. (Also, it's interesting to see this sparse array initializer syntax). Thanks for the patch. Reviewed-by: Nick Desaulniers > > Link: https://github.com/ClangBuiltLinux/linux/issues/525 > Cc: clang-built-linux@googlegroups.com > Signed-off-by: Nathan Huckleberry > --- > drivers/clk/clk-qoriq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c > index 4739a47ec8bd..0f8870527940 100644 > --- a/drivers/clk/clk-qoriq.c > +++ b/drivers/clk/clk-qoriq.c > @@ -678,7 +678,7 @@ static const struct clockgen_chipinfo chipinfo[] = { > .guts_compat = "fsl,qoriq-device-config-1.0", > .init_periph = p5020_init_periph, > .cmux_groups = { > - &p2041_cmux_grp1, &p2041_cmux_grp2 > + &p5020_cmux_grp1, &p5020_cmux_grp2 -- Thanks, ~Nick Desaulniers