From patchwork Tue Aug 28 01:52:52 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: 10577849 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 B87F3174A for ; Tue, 28 Aug 2018 02:05:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A83D129B8D for ; Tue, 28 Aug 2018 02:05:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C1E529B88; Tue, 28 Aug 2018 02:05:09 +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 1F34E29B7C for ; Tue, 28 Aug 2018 02:05:09 +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:References: In-Reply-To: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=1xnIrfO7dbKEzth5/qw8Sk9IGnR2nn8JOxmPjrPIkA8=; b=AWy3At5Y7z9rqMyfRUF1E2ABxR cF07e+rpokdIW3BvuBj8axSRWHumF1QdObHSzWDLJtg9VO7rXlECAZG+C/HAxKrkGwvppOXYk6Dqm cQo7Zq0tZ+b7+5eSa8EB76M/Mc09nvnxF1KUs7RXG8J+0oa8pWa7bQMEhEYUjiYAzgW+5mATMDz6l ANGFTPKyz8VRfxgUIHdrVm4uVTT8jI1Z3wSftP5/OdisMGiAyamKRDQ+dppj8u5p/CvanPPN/T7Wv g6605E5wpCvejljSIC4ZdS3qKnAyP7lys/cjtexhpNlaBSLDJph2jQE1z/XXzyFS4P2IkAUl4gC5t UAETXS6A==; 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 1fuTNO-0006IH-UY; Tue, 28 Aug 2018 02:05:03 +0000 Received: from mail-oi0-f68.google.com ([209.85.218.68]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuTEC-0007lG-2D; Tue, 28 Aug 2018 01:55:57 +0000 Received: by mail-oi0-f68.google.com with SMTP id m11-v6so40947oic.2; Mon, 27 Aug 2018 18:55:21 -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; bh=55lHpuNsCJJAxN4AHRFm8FDVcJW+iNwvqKUpkyhMS40=; b=qEXvNvp0C5eovHh/VDrMXR57O5H17o9vnMBm7NJZdJxL42Q4qjsZIvJu/CsOF+gbFW SIBMovbahjVRo5dHXaSXs722f52mw08G0vMJmETxxhx0rm9016Pyjnp5IeBqg4S7OEKg VgizTbck9sLrd5u5nMwCmSpJQxZBPXLaOyf5F0c99OovR5H6xC2D+qRKiBj7XWWqE2b1 BdpLgV9TNNAVsJmaoQePCGhRsa2GzIx6oT8tzFmHn7NJ2t89BiyL/7CImLjIQXtEt+nT lEKojDzjUaIPN14iep85Rseac3DTOKI9hZLjQmkQQHR23edICOuaJJcgtw/61Y9152YO YtQA== X-Gm-Message-State: APzg51Ci/+Im14S2Y30yDb9mFa1dCwObY4V6tDg5sg6YB2/PM1lUGs8K 6Kt3cJ2XRYHnp8M3s+4hiQ== X-Google-Smtp-Source: ANB0VdbNCCnft4LPYdktaqopsPKfsBTeJxoso2RWxcyOroPgQHs81v8smDCMeF3hkSMYf8Ga4pNgpg== X-Received: by 2002:aca:3003:: with SMTP id w3-v6mr360623oiw.231.1535421320495; Mon, 27 Aug 2018 18:55:20 -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 n71-v6sm1652696oig.48.2018.08.27.18.55.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Aug 2018 18:55:19 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: Convert to using %pOFn instead of device_node.name Date: Mon, 27 Aug 2018 20:52:52 -0500 Message-Id: <20180828015252.28511-51-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180828015252.28511-1-robh@kernel.org> References: <20180828015252.28511-1-robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180827_185532_224601_3D4C6947 X-CRM114-Status: GOOD ( 13.04 ) 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 , 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 --- 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 | 8 ++++---- 5 files changed, 9 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..cad8c7888292 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -1124,16 +1124,16 @@ 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; }