From patchwork Tue Aug 28 15:44:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 10578745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C52F4175A for ; Tue, 28 Aug 2018 15:47:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B01B529019 for ; Tue, 28 Aug 2018 15:47:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A130E2939F; Tue, 28 Aug 2018 15:47:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CCB1A29019 for ; Tue, 28 Aug 2018 15:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: References:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ZVK+IfHFAlekRVq7rQRjLy/+8ALDCcWqEeG20rAP0M8=; b=lQgELprJDg0ks79SFimzCFUMRO iiX129aXbthuubBwUDY89EatI8rRkN+VZT8oHZkU+jYVJRmCP+Os+k2o6K0D3pJNQfHgLwWUrnGlz hf/Czx5Nsrg9yDugFc2Xr+C742gxhjH4m8z59YCK7YIfear/GcOIdn/xgxKkz0uBv8JyRkEJD1R67 ISDQm6rnsIMWirLqfriGnHpozWMbMgY5lyoiUZ6UgaCBNPJopikFsdcJDudPg5xW9ZiC8eHxZTyHu K1BIbbcAwiJqJvdH4mUhxUDhWtPv5/f/eRCRJDTolHyV6Gun37gXV3UoGjlDuBC7zticVNBZf1Y5B KUXkYMAg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fugDe-0003Ej-8r; Tue, 28 Aug 2018 15:47:50 +0000 Received: from mail-oi0-f44.google.com ([209.85.218.44]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fugAh-0000eF-KL; Tue, 28 Aug 2018 15:44:49 +0000 Received: by mail-oi0-f44.google.com with SMTP id x197-v6so3678532oix.5; 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=oc/5GJfQCkpESIkl7vnVrS5Fi7u1ZPZyA0LNIi5ksUkVHiru24MH+NDRn+X2ZuCylX 6ZTwZAGfAhR2XVFFIwl6+5ew+fuymLTgI4y5c4CiOFXdwjn70DTexcNv6/9HUa9r/2rd 4R0FRg3rKdUFe9V2QYXSX+lMIAn9u5A0wAOKxYXjySE55vQamAXhORvX+m2sil2v9bL8 gIVDsvxuhc7Vo+bOFZlsQ2OLakz/I/u3ztD4Yo0TcqcS956NI0hBqEv5v5k8BZGh0bjr twGhCxATATqzmVso22mojHDrEt0tagtjwU6tVWEZmuOBwBogtN0iagWw6PTTruPul2x9 /ofA== X-Gm-Message-State: APzg51DZUVYJLKsUkyOraMm1Vym3fTb5cROAS2k8HhjpEGL7NHnzQHB4 g+HW/JC/SdbiY45YyORgMA== X-Google-Smtp-Source: ANB0VdZyUOa4pDM2jANstMCfYUj2TZdPPHbZdL/Yp0ZIzobXZQW0tLxBRpXPtAYXF6IN+ejhh5SUBw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180828_084447_701895_C6163E7E X-CRM114-Status: GOOD ( 12.92 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Olivier Moysan , Alexandre Torgue , Timur Tabi , Xiubo Li , Kevin Hilman , Takashi Iwai , Arnaud Pouliquen , Liam Girdwood , Jaroslav Kysela , Nicolin Chen , Carlo Caione , Andy Shevchenko , Mark Brown , Maxime Coquelin , Fabio Estevam , linux-amlogic@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) -- 2.17.1 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; }