Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp253007ybi; Thu, 11 Jul 2019 18:46:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxR1hI+2MRija61G0R9UzO0vC6cxAeY0XVDJszajGeZYvDQum9395mauItGZxOI89Epv/Vl X-Received: by 2002:a17:90a:1a0d:: with SMTP id 13mr7929544pjk.99.1562895975390; Thu, 11 Jul 2019 18:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562895975; cv=none; d=google.com; s=arc-20160816; b=bIYqxkwijyjFeb32BiuEAsxZZmpsIBdN896qxbstg1p5lkIZ5KVtInuQO5OWDm1iSx 7McRvs165HEyekersIhRCxDGmqS0BPCejrpnh+wE0NBx++TN3JTnYKRlpC7vtuMCimEz OR91tMPKLNBLVUouskXU1Ii1Ibvh6XZJldEybjKHv2T3MPJ5vz4ZIGH3D/TKXcKdMcIH 3H9Vfz7a122CjNJqZEUT+c74YEXBsANJRR8qaLKNHefvudhf3dkgsNQjmrrati4NstLV 8ajArm/aJv0FRWoOygyb0cym7CGhljIt9Os5bXkXxMEZONbcLPh/SDkZzu74zr/h0oG/ IKZA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=lRWVv8sMYMKYocmhKIjrnQXwGIfPiESQt2vqD2pw6zk=; b=ElnVgsEvW2kkwW0LS5squlEsDkYV0ksObQea+ic+M4KEbRZPPCvl65ozqIs97YVeKE JkhCQq4BBXlQ3Scu9/W/rFdgZH2q9kr29s+L97vuYV8P0sFCSPRMKUtSmbtTv9mOv5DV Etpmk7p11nRlma+YDTuT3wfWdMVgZYlu4zxAH1KX0CxazAXpJmznCpzAbu5c6vY8v43Q E9ljBQhJrlvXE4WZRsCeSKYKYgRn4sR87YrQlwa9O+KsHMG/pjWYoVrtrH7sF3XH+kp8 cbe2Ul/4iEZYw2eG5TV1IHh/b1thY3Zo7EzlL8kSFp1vvP8Tp2fwLqSbbsyHV3nqxIoC f15w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kHN+AfMw; 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 x14si6952104pfn.61.2019.07.11.18.45.59; Thu, 11 Jul 2019 18:46:15 -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=kHN+AfMw; 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 S1728946AbfGLBoW (ORCPT + 99 others); Thu, 11 Jul 2019 21:44:22 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35606 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728497AbfGLBoW (ORCPT ); Thu, 11 Jul 2019 21:44:22 -0400 Received: by mail-wr1-f67.google.com with SMTP id y4so8222841wrm.2 for ; Thu, 11 Jul 2019 18:44:20 -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:mime-version :content-transfer-encoding; bh=lRWVv8sMYMKYocmhKIjrnQXwGIfPiESQt2vqD2pw6zk=; b=kHN+AfMwIfWvbCzX/eK7qSCf1BewVjfqp1d9z24xOKwzQlFs6zfqnjUfdMEXe5atJ6 mFVYkfz2DQeu2rbqGE80IVOPARF4eVPFnukanQJQUpsfEVqu0MvuyhbFIGKOYded9Krd dnWH3LHg6SvxKHDupiaPV+ihCRUGSq7cG1LAwlJtXuwN9pTixn3dTA3eZncHJBfzPFAF rAdZa4juu3LFLppzcNdCX42Bjf538euDCiVZtkOX1lyEX2u+ZPS1QddMq5EeiK6DBzzY zQQ6VnFqwAVqW1VKpUR4MSq4w6RccOGecw9yFjhY+DEWfbH8Ook1N61qpiAEGKTPnLTq sfYw== 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:mime-version :content-transfer-encoding; bh=lRWVv8sMYMKYocmhKIjrnQXwGIfPiESQt2vqD2pw6zk=; b=dTuvbgJrnxjvQdDW9Z2GgrdPn8qaf+Xv5EffBKu2R9Qs4cnJpobFhxrW5JzHBavkf6 GtVocGSRhAqJfIi9O6LMu9PAeiIxguSOV6tW6ZcJqWCKeAptHPh/kxomtktsCKsKPDe0 O7mWORtMg/gHe352F8oTLdr0rTBeHrzVngQD0uZS1AvjgUJsKwGT7FdetVQeP8m5OsLP oOr4+/HNwiEZN2gT4IbrqRNAIDXZpmGnp6w7oWTAbUoqSOckxZnbKQ7kl6JGu93jUzQy vTx/KM55DttU8JB3nvyxwrr9tZvaA0pkqQ1+LLxVhr7w5qyVIHiGjuOoeWs1/dWwchkc am8w== X-Gm-Message-State: APjAAAUQSBadRGM8v4d8CLhYUt71BgR7TdwESgxUC88JFnrhR5ZkltQs VecSrnRbW5LpA3dg7ybwgfQ= X-Received: by 2002:adf:ce88:: with SMTP id r8mr8254019wrn.42.1562895859848; Thu, 11 Jul 2019 18:44:19 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:222:2f1b::2]) by smtp.gmail.com with ESMTPSA id y12sm4409747wrm.79.2019.07.11.18.44.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 18:44:19 -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] ASoC: audio-graph-card: Constify reg in graph_get_dai_id Date: Thu, 11 Jul 2019 18:43:57 -0700 Message-Id: <20190712014357.84245-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.22.0 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/599 Signed-off-by: Nathan Chancellor --- 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