Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7251751imm; Tue, 28 Aug 2018 08:47:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZJeI4J3a7adqf/QyBnfkJUP+pJIWhk6SoOAsWF9Vswz4HZlbJ7erRT9Acnps8nGZBnmU7p X-Received: by 2002:a17:902:7586:: with SMTP id j6-v6mr2078488pll.295.1535471239049; Tue, 28 Aug 2018 08:47:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535471239; cv=none; d=google.com; s=arc-20160816; b=Wle8Wcx5KGvmMbDdURIdOLPPBvHaSDDCr/dS7w35wPPkGvETDYcRhWQFuABKNWSY+1 ijajCtz3cXoxhwv+tBsd9fFqqTa/WlowVMAGA3T1EBCBpe6YEs1ys6MsNOL+RScSAQyT xy5EpdRfiS0Rc13sYrZDn8YNapR4Jp1OJeAGWYKC6Ui6XeEQlxuqNAOkQYjWW5PnekBe LUO/XUPmsuf1jbgK6wU5xxaJchDUOq/Smc/dEii9uXpQITw/oAWvM2hK+xvWsaMnZjCO XM+9CXCYUePPc3Z1AIrzNgzuN+wOK2o+ICwArjNC13SXC1nLtMUlyCr4RN/UB7iXp/dv SPjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=xiuxQdP6s+Tq5IPOSJJx7r94IM2H7aQMfWi0PAGfZSE=; b=hGWgXPsxo4U+ILRpufklixGSwNlxDX/W4vZe2MB3QhHbqbimPAIOkhcGLqaz73qx13 1hp7+TnHXKKO9i/3j18544NPIu6dYKNDuhO6L9WKAvBIFKT2oiUsB9UC+xJtSHHrZMnk fLaZ9BLbWHy2/Sh37D7013pmlc9ZsqDtn0usDRuF8X/q19yG4NadGNENAu7SI/uvWdiE eTXzUqt6SKSDPrJpjn2eB1a6QMFTtF8j5p4aFHChy84kjm0+Dv8gO4QH5KK2UFOXZLxj RVVp9x1zbdtqASS3WnSYU9l8ASQ7a/LV68PI+zx8jk4DEykScTqHcHmxaD3/fCBWaf6Z GzXA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 35-v6si1347447pgo.639.2018.08.28.08.47.03; Tue, 28 Aug 2018 08:47:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727368AbeH1Tgx (ORCPT + 99 others); Tue, 28 Aug 2018 15:36:53 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:47069 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbeH1Tgw (ORCPT ); Tue, 28 Aug 2018 15:36:52 -0400 Received: by mail-oi0-f44.google.com with SMTP id y207-v6so3617264oie.13 for ; Tue, 28 Aug 2018 08:44:37 -0700 (PDT) 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:in-reply-to; bh=xiuxQdP6s+Tq5IPOSJJx7r94IM2H7aQMfWi0PAGfZSE=; b=J/Mw5ITbN+0PMSbj67NAC0sb63wVpL+aFP5hEOM+ucpihTFxJhPS6dADEbIoi0AS1i 6Rt2bc+G12IYphKz+zQv8GGUF9/en1VUe5C0LAfB/+04rlimCBEr5oxVL9HSYuP+WrJO sq0IWry689VQVDBpwbhpJChH8C4ufne3acu+5EVV/flPBj+Wm1B9GJA5OiZLG5osMDbf K5IOzel7x/Y5lncGHXQTAvgSB+JAODizG3bfGuwfUFmyUFcAnzS0qsM3NQbAl54PtBOE W2MtB52Wt1WePZPkixc3SuG9yeBbVMUoYASzG/DIEtBfOzS3rWenv2GMxN04eAYlc3yh zs3A== X-Gm-Message-State: APzg51ACCXtJY6bZCI+fWH/BTYm6KGEyA10PRfh+gbWejdwrmVTAN0So awJRi8KkdhzzFCoGUAtdSPxNUAY= X-Received: by 2002:aca:acc8:: with SMTP id v191-v6mr1586463oie.354.1535471076622; Tue, 28 Aug 2018 08:44:36 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id f4-v6sm1808331oic.52.2018.08.28.08.44.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 08:44:36 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org Cc: Andy Shevchenko , Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Carlo Caione , Kevin Hilman , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2] ASoC: Convert to using %pOFn instead of device_node.name Date: Tue, 28 Aug 2018 10:44:28 -0500 Message-Id: <20180828154433.5693-2-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180828154433.5693-1-robh@kernel.org> References: <20180828154433.5693-1-robh@kernel.org> In-Reply-To: <20180828015252.28511-51-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Timur Tabi Cc: Nicolin Chen Cc: Xiubo Li Cc: Fabio Estevam Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Carlo Caione Cc: Kevin Hilman Cc: Olivier Moysan Cc: Arnaud Pouliquen Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Signed-off-by: Rob Herring --- v2: - stm32_sai_sub: Unwrap now shorter line sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_utils.c | 4 ++-- sound/soc/meson/axg-card.c | 2 +- sound/soc/stm/stm32_sai.c | 2 +- sound/soc/stm/stm32_sai_sub.c | 7 +++---- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index c1d1d06783e5..57b484768a58 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -807,7 +807,7 @@ static int fsl_esai_probe(struct platform_device *pdev) return -ENOMEM; esai_priv->pdev = pdev; - strncpy(esai_priv->name, np->name, sizeof(esai_priv->name) - 1); + snprintf(esai_priv->name, sizeof(esai_priv->name), "%pOFn", np); /* Get the addresses and IRQ */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); diff --git a/sound/soc/fsl/fsl_utils.c b/sound/soc/fsl/fsl_utils.c index 7f0fa4b52223..9981668ab590 100644 --- a/sound/soc/fsl/fsl_utils.c +++ b/sound/soc/fsl/fsl_utils.c @@ -57,8 +57,8 @@ int fsl_asoc_get_dma_channel(struct device_node *ssi_np, of_node_put(dma_channel_np); return ret; } - snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%s", - (unsigned long long) res.start, dma_channel_np->name); + snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%pOFn", + (unsigned long long) res.start, dma_channel_np); iprop = of_get_property(dma_channel_np, "cell-index", NULL); if (!iprop) { diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 2914ba0d965b..b76a5f4f1785 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -478,7 +478,7 @@ static int axg_card_set_be_link(struct snd_soc_card *card, ret = axg_card_set_link_name(card, link, "be"); if (ret) - dev_err(card->dev, "error setting %s link name\n", np->name); + dev_err(card->dev, "error setting %pOFn link name\n", np); return ret; } diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c index f22654253c43..d597eba61992 100644 --- a/sound/soc/stm/stm32_sai.c +++ b/sound/soc/stm/stm32_sai.c @@ -104,7 +104,7 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client, if (!pdev) { dev_err(&sai_client->pdev->dev, - "Device not found for node %s\n", np_provider->name); + "Device not found for node %pOFn\n", np_provider); return -ENODEV; } diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c index 06fba9650ac4..56a227e0bd71 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -1124,16 +1124,15 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev, sai->sync = SAI_SYNC_NONE; if (args.np) { if (args.np == np) { - dev_err(&pdev->dev, "%s sync own reference\n", - np->name); + dev_err(&pdev->dev, "%pOFn sync own reference\n", np); of_node_put(args.np); return -EINVAL; } sai->np_sync_provider = of_get_parent(args.np); if (!sai->np_sync_provider) { - dev_err(&pdev->dev, "%s parent node not found\n", - np->name); + dev_err(&pdev->dev, "%pOFn parent node not found\n", + np); of_node_put(args.np); return -ENODEV; } -- 2.17.1