Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp254474ybi; Thu, 11 Jul 2019 18:48:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBLcW8FKPqhnpFw2LR+nHrzjIZQqD84s0Av1h/TJrtZtA4G/KqgosJBxld38Cn5oOLoMGL X-Received: by 2002:a65:64d3:: with SMTP id t19mr8100314pgv.112.1562896080518; Thu, 11 Jul 2019 18:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562896080; cv=none; d=google.com; s=arc-20160816; b=eHvciqYw8POgwMjH83QfWYM8cWAYSzzVFWdjp048vm5TI2AyGUveekMqqC0q4LUm9z s7DepPDgf1clJcZMcOb1UZKgnbic7BXFmNgCF9Io4M0z9YHtnF+ptzb6JRYuedS8cOqI v0P/dvQ5OquCaDdb5f5nBDhQSj7ovcaePpIU7M0fonwkEKSQQKPuvicvAH7KCsyHIxnc +5sh1JM6vJkZszdZy7s9gTsKxBVvPBrnuCy9R5PjvQmoDtZ2sfKftkfwKVFCeYxqgygi zacu/rRkbAZSVzTCaX19uLVe1lHW0vTrs29wl30rtCeepn1w+Fk5nDO0/AKm2eKqyD9Q GXqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TSFGt+Q1og6AA+SdNnXRjxSfv/MJFeGddK8TCtYrMOg=; b=NH0S2ou2vvc9svbrS2BrT+KjqW38wHqUIm/FRt83KLmOEDeg9Xxm8zltbQvuCedo4A RbJ0Dm0w3S5f2TmczmLCu/eLUajGiqmqMhkQkrJRTyTS2ku1DF+nB3yMPOCgxZVAQ42R ayWNSLHbaCP68Xocm/9eVAfmhkSnS0YX0KUaQBbTT5fB1LrhBV2Is9+T+xT5pCT56r7b yTkkGGyRUpYpPgDvA3JisSflrwKFxeYztXleTwpX2ATWTM1j/6jNMSAH1b419VIaz7qh Tk0HGarTTYxhXUG3UcWb1jxXGFZme0I1ysEKjmuC8VJBDtJmYiLJjLFPcDwO6JwZb3xC tfXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uk1BXR95; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1si6381356pgs.355.2019.07.11.18.47.44; Thu, 11 Jul 2019 18:48:00 -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=@gmail.com header.s=20161025 header.b=uk1BXR95; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728943AbfGLBrK (ORCPT + 99 others); Thu, 11 Jul 2019 21:47:10 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33367 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726587AbfGLBrK (ORCPT ); Thu, 11 Jul 2019 21:47:10 -0400 Received: by mail-wr1-f65.google.com with SMTP id n9so8256942wru.0 for ; Thu, 11 Jul 2019 18:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TSFGt+Q1og6AA+SdNnXRjxSfv/MJFeGddK8TCtYrMOg=; b=uk1BXR95kMsdF9sHBlyG55rS2E1xeWRMYuIBC5lVMxQgjAcvzJIMynUBe3wm/zfSQD OC66fX/RzQlpJ44bj9120Ft2Tap9PgBHxgB/NX0Fjq0IvZe7WVXJzc4YskygtPm8UctJ QfmADfQxwVc1xW/vqRuRDxe0QO/w9RGgZBVyjvkTiBspm9mRMrBtPxuu5oTWyoVhIBnF TQauhcIgrgyVBirznKq2EzRvhq+2+0wZn+Bmu7JKfx2fhfT2m3CaVQwquawx60O3Iwk7 IFye7kfK9w42vtwfGEwwfOo+oPGAGMPLrlxD8Ur60/Kwisr53dIEpOJnQ8OZlKpr1yPK Dt7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TSFGt+Q1og6AA+SdNnXRjxSfv/MJFeGddK8TCtYrMOg=; b=jXlfGIOTvHnIsuf5Z/LlIYZeQNYoyMx36CpW8z3TR5366WQvormRRNtD+9jfgcgmwO YT2DW8YzOFN0pwqMb70Kz9sau5XNwXeoRQyWq+wpK1i52GHSWaI0sO1EjCcrjKEJ7T6P 0YG325ephB5SUkJvaRRXT4OPjb2oEhxCzdQwo7agM3Xt+qo43iAwKxPkY6+VeY5y32Kv JCLWRQqOe7U7Vt0K6pM/pGHjtb6aSGLBEJW/b1ZAclroriIBd/gKbjuOtpW28j+G5T06 PeBWd3tZ/kelq/o7JJ5GRLo4A5nwdoPkcdoYUSY1FgMfq5K88XTsJWpTBGNas7O6aEcQ ycUQ== X-Gm-Message-State: APjAAAXt6LhcqOsG9Jal0nMiNYQH0fn6MTi8Oa2oMd6cYPKm9+POZ/8f 10R0rbpJhNwSn+dXb3HAU3s= X-Received: by 2002:a5d:6284:: with SMTP id k4mr7958812wru.179.1562896028018; Thu, 11 Jul 2019 18:47:08 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:222:2f1b::2]) by smtp.gmail.com with ESMTPSA id v15sm5904425wru.61.2019.07.11.18.47.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 18:47:07 -0700 (PDT) From: Nathan Chancellor To: Liam Girdwood , Mark Brown Cc: Jaroslav Kysela , Takashi Iwai , Kuninori Morimoto , Wen Yang , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH v2] ASoC: audio-graph-card: Constify reg in graph_get_dai_id Date: Thu, 11 Jul 2019 18:45:55 -0700 Message-Id: <20190712014554.62465-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712014357.84245-1-natechancellor@gmail.com> References: <20190712014357.84245-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang errors: sound/soc/generic/audio-graph-card.c:87:7: error: assigning to 'u32 *' (aka 'unsigned int *') from 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] reg = of_get_property(node, "reg", NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Move the declaration up a bit to keep the reverse christmas tree look. Fixes: c152f8491a8d ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()") Link: https://github.com/ClangBuiltLinux/linux/issues/600 Signed-off-by: Nathan Chancellor --- v1 -> v2: * Update link in commit message (sorry, I create the commit message and send the patch first then create the issue and I forgot to check the closed ones for the correct number) sound/soc/generic/audio-graph-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index c8abb86afefa..c0d262a2ce2c 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -62,8 +62,8 @@ static int graph_get_dai_id(struct device_node *ep) struct device_node *node; struct device_node *endpoint; struct of_endpoint info; + const u32 *reg; int i, id; - u32 *reg; int ret; /* use driver specified DAI ID if exist */ -- 2.22.0