From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB34DC5ACD7 for ; Wed, 18 Mar 2020 08:36:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1EC620753 for ; Wed, 18 Mar 2020 08:36:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=flowbird.group header.i=@flowbird.group header.b="QZr448e0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727512AbgCRIgD (ORCPT ); Wed, 18 Mar 2020 04:36:03 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40480 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbgCRIgD (ORCPT ); Wed, 18 Mar 2020 04:36:03 -0400 Received: by mail-lj1-f195.google.com with SMTP id 19so25951724ljj.7 for ; Wed, 18 Mar 2020 01:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flowbird.group; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aPBJn2ynYA8FJEh8jEBQDW67obM5EQ6JxVESIr5G6yA=; b=QZr448e03X1SLqCc4Dnk4uM0I3ixSAV5zIkNiw1rz87pIUY6oRIMRNV9PqrljcXj9a 4fyIpf2y4kGj8zX247H4hg3Ol9suRDrX/YKmGSN/KRW7dlOypGjZ2M2eiSzYUG4USk+F PcJGvdV0uzHelwz6P2df1ZSSuNcRGXy9oh+GXj6qDAbG3GDL6GsEwIKFHyUKS9PJikSb OXKSr0x94bDktZolTFej6YovTmzcwb4/XjkG/cVhyhAPyqvlE1spQq4oJN1SlmIPUVhj pL1VPknjBRO5XFAx5/LnsUa7p+N4JFhnq4Q1s99C2eHk4o3ObRkbGkVl/oTGDfe0H/uY JBpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aPBJn2ynYA8FJEh8jEBQDW67obM5EQ6JxVESIr5G6yA=; b=XbX4GnUIy/M/MfRfqsg3ZIxJHJBR4R1y/bdtEN0L3SoOtZUW9ZxsLxA3gY4DT2cBEl hHOmm/EhuJFl82HKzszk7x2wgtI+2VOdoWk3HeyRtNnLtqQpGeiH829efa8nb7sSUTYs 3RVJW5hWfmPNhsYFPCImoGqi8QeThE808pDF0qBYhxs5P9dP0q4ME2d/j1B44bWVWLZ5 B/aAt/vxONrr/NCdXsaCmpiB4vKDuy+34pMcwHkmg56U9EDImotB0rgwMyVuocbW64MG dc7pzQGiMKneOHjy9x2dhhH4Jd/UaYU27c7dCJrR72uO2XQftrW/ka09/R9utueBB3jO t/hg== X-Gm-Message-State: ANhLgQ0zkyE0rqDNCGugzoMA7wjsbcFA0sNnp7eDcKO2wlIZxJd+h4Jf 4Ntm+BhvBXXSjqpQstJqWNEw+a/l+xEPgRmBzrsTTg== X-Google-Smtp-Source: ADFU+vtiUorwgV4PFpNYqYoopqpRkCfZjSt9PPkm/PAS/NdlKM7bdkwklNxYBg0is2VnuB7B8PaXEZ7DimvmfvvZWO4= X-Received: by 2002:a2e:b0f7:: with SMTP id h23mr1695669ljl.56.1584520560877; Wed, 18 Mar 2020 01:36:00 -0700 (PDT) MIME-Version: 1.0 References: <1584463806-15788-1-git-send-email-martin.fuzzey@flowbird.group> <1584463806-15788-2-git-send-email-martin.fuzzey@flowbird.group> In-Reply-To: From: "Fuzzey, Martin" Date: Wed, 18 Mar 2020 09:35:49 +0100 Message-ID: Subject: Re: [EXT] [PATCH 1/4] net: fec: set GPR bit on suspend by DT connfiguration. To: Andy Duan Cc: Rob Herring , Shawn Guo , "David S. Miller" , "netdev@vger.kernel.org" , Fabio Estevam , "linux-kernel@vger.kernel.org" , Sascha Hauer , dl-linux-imx , "devicetree@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 18 Mar 2020 at 07:26, Andy Duan wrote: > > From: Martin Fuzzey Sent: Wednesday, March 18, 2020 12:50 AM > > +static int fec_enet_of_parse_stop_mode(struct fec_enet_private *fep, > > + struct device_node *np) { > > + static const char prop[] = "fsl,stop-mode"; > > + struct of_phandle_args args; > > + int ret; > > + > > + ret = of_parse_phandle_with_fixed_args(np, prop, 2, 0, &args); > To save memory: > > ret = of_parse_phandle_with_fixed_args(np, "fsl,stop-mode", 2, 0, &args); > Why would this save memory? prop is defined static const char[] (and not char *) so there will no be extra pointers. I haven't checked the generated assembler but this should generate the same code as a string litteral I think. It is also reused later in the function in a debug (which is the reason I did it this way to ensure the property name is unique and consistent. Regards, Martin --