From patchwork Tue Aug 28 01:52:23 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: 10577825 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 5964313B8 for ; Tue, 28 Aug 2018 01:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C60A1292D9 for ; Tue, 28 Aug 2018 01:58:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA547292DF; Tue, 28 Aug 2018 01:58:02 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFD73292D9 for ; Tue, 28 Aug 2018 01:58:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727585AbeH1FoF (ORCPT ); Tue, 28 Aug 2018 01:44:05 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:39766 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbeH1FoE (ORCPT ); Tue, 28 Aug 2018 01:44:04 -0400 Received: by mail-oi0-f65.google.com with SMTP id c190-v6so14371oig.6; Mon, 27 Aug 2018 18:54:49 -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=yLsZxzjoAPbWtG9fCYKw9jIVtTQlJsGEbn0grKaCpS8=; b=n9vMhMU+YOnmakcE50V3upCN+LZybC/wH9kAhC3InzEGqaqrejOd9tNqZ57x1ohjFy sFtdl5kbLq6bW74xE8alxyiKQyVc/zrUePf6doza6CMi2FrY4/vJbxGQafv3oBSGFmHh lie5PZO1OUh6dNfzCuocX+hZLlUFRwWs+8dYntpQdKHtDkQE9gVQUjqYROek7ctEuhiP GBUnmGsZmWLJG8svhF4Zu3MBj1Q3DrNGZlkmdk0pq2JAqfcLtmX0VoQqFPEb32yBukFL nuK1qLXo3fOFfuXV5v4bAoUA000IFZOC3ejng1bPajpnCnoF2EfsvI81gOpgqINCAGgF GCpg== X-Gm-Message-State: APzg51A/H3X2d7jLx+WMyNYMKsWjS78ExJYHMuPqSD/oPNkDI4sCcoWP DYocM8FSqRI78Omx0iuN9VO0Fik= X-Google-Smtp-Source: ANB0VdZ8fqQF6vI4vqjxkfJTh68HzS7lLiZV35TUeAEL/yDh3wWLGX4Ia8Jr63MzoF9JvTCJ7vrv+g== X-Received: by 2002:aca:c74d:: with SMTP id x74-v6mr985009oif.97.1535421288615; Mon, 27 Aug 2018 18:54:48 -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.54.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Aug 2018 18:54:47 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH] iio: Convert to using %pOFn instead of device_node.name Date: Mon, 27 Aug 2018 20:52:23 -0500 Message-Id: <20180828015252.28511-22-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> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.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: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: linux-iio@vger.kernel.org Signed-off-by: Rob Herring --- drivers/iio/adc/qcom-pm8xxx-xoadc.c | 4 ++-- drivers/iio/adc/rcar-gyroadc.c | 12 ++++++------ drivers/iio/frequency/adf4350.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/iio/adc/qcom-pm8xxx-xoadc.c b/drivers/iio/adc/qcom-pm8xxx-xoadc.c index b093ecddf1a8..c30c002f1fef 100644 --- a/drivers/iio/adc/qcom-pm8xxx-xoadc.c +++ b/drivers/iio/adc/qcom-pm8xxx-xoadc.c @@ -708,8 +708,8 @@ static int pm8xxx_of_xlate(struct iio_dev *indio_dev, * mux. */ if (iiospec->args_count != 2) { - dev_err(&indio_dev->dev, "wrong number of arguments for %s need 2 got %d\n", - iiospec->np->name, + dev_err(&indio_dev->dev, "wrong number of arguments for %pOFn need 2 got %d\n", + iiospec->np, iiospec->args_count); return -EINVAL; } diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c index dcb50172186f..4e982b51bcda 100644 --- a/drivers/iio/adc/rcar-gyroadc.c +++ b/drivers/iio/adc/rcar-gyroadc.c @@ -343,8 +343,8 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev) for_each_child_of_node(np, child) { of_id = of_match_node(rcar_gyroadc_child_match, child); if (!of_id) { - dev_err(dev, "Ignoring unsupported ADC \"%s\".", - child->name); + dev_err(dev, "Ignoring unsupported ADC \"%pOFn\".", + child); continue; } @@ -381,16 +381,16 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev) ret = of_property_read_u32(child, "reg", ®); if (ret) { dev_err(dev, - "Failed to get child reg property of ADC \"%s\".\n", - child->name); + "Failed to get child reg property of ADC \"%pOFn\".\n", + child); return ret; } /* Channel number is too high. */ if (reg >= num_channels) { dev_err(dev, - "Only %i channels supported with %s, but reg = <%i>.\n", - num_channels, child->name, reg); + "Only %i channels supported with %pOFn, but reg = <%i>.\n", + num_channels, child, reg); return ret; } } diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index 6d768431d90e..f4748ff243f7 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c @@ -388,7 +388,7 @@ static struct adf4350_platform_data *adf4350_parse_dt(struct device *dev) if (!pdata) return NULL; - strncpy(&pdata->name[0], np->name, SPI_NAME_SIZE - 1); + snprintf(&pdata->name[0], SPI_NAME_SIZE - 1, "%pOFn", np); tmp = 10000; of_property_read_u32(np, "adi,channel-spacing", &tmp);