Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5934131imm; Wed, 12 Sep 2018 13:28:50 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbvwgsappi5zlQ1G8+KFtqqWoLKBBo14NTlvbZ0gnNoUYk8+DvMIktXOYfMigKzq5yAcn2n X-Received: by 2002:a17:902:7e09:: with SMTP id b9-v6mr4026042plm.221.1536784130003; Wed, 12 Sep 2018 13:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536784129; cv=none; d=google.com; s=arc-20160816; b=kRgL2aUG93ytWrXkHnGO1akO+QLlAlXqGwOPyFxbHfSRsJL1uxrkiiSCEd53hZGiZE AnZdmIvm2iw7ji/HTSMX39fArvXOuLLZ3fbj5KcEbkraN/t8WH5uKalXdGO97wtdLurD wxD4RGdU3VW4NYzgaU3VW3Ig2J7OhOE+tMGu1Giw0O6NA8ch4HYV1elduzCxER4n47a2 74vlIHPVaj6RgKvnQCPJeZ2iYglSaI9iY/stfx9t6c+AdxIhmqz1SpKqIciU/GigcB77 gGN8/e/3zJ6DieAZj7TwnACAkJuF64yjrKmKjjcXRJ2zf9hih8FmvqSzVojdLNSb3ufg +/qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pDyaxI90twGNpk3X2yJ65kv9g5L+wbFD7Zd6lGijDsE=; b=OoKFnjCjivVr0kxc746U2epEZV4Fb2JBsn800ArmDUKREdhgL2uhf4sirC2WMETvkH P3SGoO3ew1jjqX1C3n0+mBm0teUpXY/KfmLIdStzip5KtS/4kD63id6eMvpfqbTNdVPd as9VmLeApL+9V1gPl41QFXAkl0XKfzOo5Dtt0HXmVhn18Pz78kig235xJoZiQMw/kblU KbV82b901Xp7f2ttvmfToDM3vjfVeOmhfDuuG46AwjG0AVXYvw4zV550lPCE+9+y36YK OHhoSRtVnXRyr+gseiM18t2/bztU4xSvPo3z9hox9WyyPTtWiBinJWxAflGy7bc6vChF ftkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1Sw1OC0d; 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=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 a38-v6si1993649pgb.427.2018.09.12.13.28.35; Wed, 12 Sep 2018 13:28:49 -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=@kernel.org header.s=default header.b=1Sw1OC0d; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728350AbeIMBdP (ORCPT + 99 others); Wed, 12 Sep 2018 21:33:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:59956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728253AbeIMBdP (ORCPT ); Wed, 12 Sep 2018 21:33:15 -0400 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1FE5021476; Wed, 12 Sep 2018 20:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536784022; bh=l4O9YmPSHpvJxSugf6M1jpX4ZGgheWee1DFEM3SVVWs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=1Sw1OC0d5c7REHwVGDk8ffLqVZShTzDWSOoqvBudMsnXmZAS77DTbnGApcgWJpIXB 6yUmZweGE56aoCsdYYPzoKr2UzgvN/UhY6lKzstK/1RSSvJDFZpYHzrI503KhHoaOb 3ax/vjYhXR8MRl7rdIpB7Zv4k90GcMtV7gIsxW1U= Received: by mail-qk1-f180.google.com with SMTP id 130-v6so1943543qkd.10; Wed, 12 Sep 2018 13:27:02 -0700 (PDT) X-Gm-Message-State: APzg51AMmc1++4rSaNEfwc7Fc/iokf+3VBO8R8dynUyg5AwSsjpfxiud hNA5WgodN9TeXAsOEUKvl6zDqrz6wkbDQil1nA== X-Received: by 2002:a37:169c:: with SMTP id 28-v6mr2792160qkw.184.1536784021244; Wed, 12 Sep 2018 13:27:01 -0700 (PDT) MIME-Version: 1.0 References: <20180828154433.5693-1-robh@kernel.org> <20180828154433.5693-7-robh@kernel.org> <20180912121705.010a999d@coco.lan> In-Reply-To: <20180912121705.010a999d@coco.lan> From: Rob Herring Date: Wed, 12 Sep 2018 15:26:48 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] staging: Convert to using %pOFn instead of device_node.name To: Mauro Carvalho Chehab , Joe Perches Cc: "linux-kernel@vger.kernel.org" , Ian Arkver , Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Linux Media Mailing List , devel@driverdev.osuosl.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Joe P On Wed, Sep 12, 2018 at 10:17 AM Mauro Carvalho Chehab wrote: > > Em Tue, 28 Aug 2018 10:44:33 -0500 > Rob Herring escreveu: > > > In preparation to remove the node name pointer from struct device_node, > > convert printf users to use the %pOFn format specifier. > > > > Cc: Steve Longerbeam > > Cc: Philipp Zabel > > Cc: Mauro Carvalho Chehab > > Cc: Greg Kroah-Hartman > > Cc: linux-media@vger.kernel.org > > Cc: devel@driverdev.osuosl.org > > Signed-off-by: Rob Herring > > --- > > v2: > > - fix conditional use of node name vs devname for imx > > > > drivers/staging/media/imx/imx-media-dev.c | 15 ++++++++++----- > > drivers/staging/media/imx/imx-media-of.c | 4 ++-- > > drivers/staging/mt7621-eth/mdio.c | 4 ++-- > > It would be better if you had submitted the staging/media stuff > on a separate patch, as they usually go via the media tree. Sorry, I thought Greg took all of staging. A problem with MAINTAINERS is there is no way to tell who applies patches for a given path vs. anyone else listed. This frequently happens when the maintainer organization doesn't match the directory org. If we distinguished this, then it would be quite easy to see when you've created a patch that needs to be split to different maintainers (or an explanation why it isn't). Whatever happened with splitting up MAINTAINERS? If there was a file for each maintainer tree, then it would be easier to extract that information. Or maybe we just need to be stricter with the 'M' vs. 'R' tag and 'M' means that is the person who applies the patch. I don't think many drivers have their own tree and maintainer except for a few big ones. Rob > > As I don't foresee any conflicts on that part of the code, > I'm Ok if Greg pick it and submit via his tree. > > So, > > Acked-by: Mauro Carvalho Chehab > > If you prefer instead that I would pick the media part, please > split it into two patches. > > Regards, > Mauro > > > 3 files changed, 14 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c > > index b0be80f05767..3f48f5ceb6ea 100644 > > --- a/drivers/staging/media/imx/imx-media-dev.c > > +++ b/drivers/staging/media/imx/imx-media-dev.c > > @@ -89,8 +89,12 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd, > > > > /* return -EEXIST if this asd already added */ > > if (find_async_subdev(imxmd, fwnode, devname)) { > > - dev_dbg(imxmd->md.dev, "%s: already added %s\n", > > - __func__, np ? np->name : devname); > > + if (np) > > + dev_dbg(imxmd->md.dev, "%s: already added %pOFn\n", > > + __func__, np); > > + else > > + dev_dbg(imxmd->md.dev, "%s: already added %s\n", > > + __func__, devname); > > ret = -EEXIST; > > goto out; > > } > > @@ -105,19 +109,20 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd, > > if (fwnode) { > > asd->match_type = V4L2_ASYNC_MATCH_FWNODE; > > asd->match.fwnode = fwnode; > > + dev_dbg(imxmd->md.dev, "%s: added %pOFn, match type FWNODE\n", > > + __func__, np); > > } else { > > asd->match_type = V4L2_ASYNC_MATCH_DEVNAME; > > asd->match.device_name = devname; > > imxasd->pdev = pdev; > > + dev_dbg(imxmd->md.dev, "%s: added %s, match type DEVNAME\n", > > + __func__, devname); > > } > > > > list_add_tail(&imxasd->list, &imxmd->asd_list); > > > > imxmd->subdev_notifier.num_subdevs++; > > > > - dev_dbg(imxmd->md.dev, "%s: added %s, match type %s\n", > > - __func__, np ? np->name : devname, np ? "FWNODE" : "DEVNAME"); > > - > > out: > > mutex_unlock(&imxmd->mutex); > > return ret; > > diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c > > index acde372c6795..163437e421c5 100644 > > --- a/drivers/staging/media/imx/imx-media-of.c > > +++ b/drivers/staging/media/imx/imx-media-of.c > > @@ -79,8 +79,8 @@ of_parse_subdev(struct imx_media_dev *imxmd, struct device_node *sd_np, > > int i, num_ports, ret; > > > > if (!of_device_is_available(sd_np)) { > > - dev_dbg(imxmd->md.dev, "%s: %s not enabled\n", __func__, > > - sd_np->name); > > + dev_dbg(imxmd->md.dev, "%s: %pOFn not enabled\n", __func__, > > + sd_np); > > /* unavailable is not an error */ > > return 0; > > } > > diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c > > index 7ad0c4141205..9ffa8f771235 100644 > > --- a/drivers/staging/mt7621-eth/mdio.c > > +++ b/drivers/staging/mt7621-eth/mdio.c > > @@ -70,7 +70,7 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac, > > _port = of_get_property(phy_node, "reg", NULL); > > > > if (!_port || (be32_to_cpu(*_port) >= 0x20)) { > > - pr_err("%s: invalid port id\n", phy_node->name); > > + pr_err("%pOFn: invalid port id\n", phy_node); > > return -EINVAL; > > } > > port = be32_to_cpu(*_port); > > @@ -249,7 +249,7 @@ int mtk_mdio_init(struct mtk_eth *eth) > > eth->mii_bus->priv = eth; > > eth->mii_bus->parent = eth->dev; > > > > - snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%s", mii_np->name); > > + snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np); > > err = of_mdiobus_register(eth->mii_bus, mii_np); > > if (err) > > goto err_free_bus; > > -- > > 2.17.1 > > > > Thanks, > Mauro