Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9942924imu; Wed, 5 Dec 2018 13:03:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xj/sf5h7AcK6gCIRTIJDjwHPGC8ihWKJWGUbnHwPfQ2wIdwkgxTEGtfMGATBQv2hlXOrZp X-Received: by 2002:a17:902:9a98:: with SMTP id w24mr25872720plp.213.1544043820401; Wed, 05 Dec 2018 13:03:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544043820; cv=none; d=google.com; s=arc-20160816; b=fKNaxHuGaOQPgqyR6if7dPenLoO5fMgMS31nu/SWILZMnlCF8cJel941j8sGAAWtwL 3ei3c1FV4YzHsNZAnzwdNW5wULoUMzzN6sNckWpPtBPWR85Dm/yLRHJHG7BxhB738ByQ FCk7mp1C0pfIwE9d1W4gxToGaIZDe1y/EqXn8tNrOX1CkHwLlFQIoBhjVNvM8FGNcjgv BNUi9AiUrBaWw8PKlg1Cphy0H2inajJmaoWx50bhe5ZBqd2p5hz9ueLNzQbC9XA5GsgH WKaIxs36QLK9ZbPGESKTKqy8/9+ODuuVhzGYeScbOqu42GO62E/DA27lYbXKxod6oZ5j uyjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BysOpIzocHTTKy0zsrOe6ngzD9Zx8K2KAtWoT01ykeU=; b=vYSF9INGLrE1GoCslLOQBjkwLV/rgy9RR8uosJ77ySNH9DZKmKg8Td+0kvd2BM+t4g Ec3dQmiQb39xHNzsuusPuVkZrKZslT6RtSCfHa/B1hd79omE8ur4Fay+E+751aKC21e+ VDF6b8KdPjOoGKnbcYPngmazQgihjQPd0ceD2G1MZli0or/IXPPhOxyJwZg+JDpCG9aL Zwen3DsnLhT5zsDYBetJxRv58tVRx5YAS8fLGLucNU5aTBeB20fRzkQh20RkGxzFQ3lF 9LhXUA8Q6kQKF6nBGM3fo6gUAmTyV8afiebzBYsqSlFBMzZDUIUWWfn7C1sAcu8+eDUh jn3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HNM4wrWb; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7si20599833pfb.237.2018.12.05.13.03.24; Wed, 05 Dec 2018 13:03:40 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=HNM4wrWb; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728597AbeLEVAm (ORCPT + 99 others); Wed, 5 Dec 2018 16:00:42 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39685 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728156AbeLEVAl (ORCPT ); Wed, 5 Dec 2018 16:00:41 -0500 Received: by mail-wm1-f67.google.com with SMTP id f81so11877065wmd.4 for ; Wed, 05 Dec 2018 13:00:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BysOpIzocHTTKy0zsrOe6ngzD9Zx8K2KAtWoT01ykeU=; b=HNM4wrWbq4FqBI5Axhq0rTZ2bWaN+7rvAoYxJAQqivjSvDxxYCVxcx6pkZIIX0mhJx zuUYOEErQsRf831RO57pwX60dDDee3YItqFmWaMFrvXsN2aRD8ct769gFnZA581Jrk8d AyKBrmioMecWflDJyHHDEjtK2gGYP/QS2m6VBlKotDXagxv0zNENg9tVya/vvyOevfse HAJzuLTi9HkofYOwkRV+TG7j3yGjRj8hbZqkB26/Jb+sjf2vluOFda8SSkdIqrigF1ri iph4l97ra117iWjppfYzY/EqaMG0Pjqnf8YqNqgdPEYODk2fLoPx824xw+QFMspILxnu ogWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BysOpIzocHTTKy0zsrOe6ngzD9Zx8K2KAtWoT01ykeU=; b=Bji/TKHLq9FbT0yYVpzzZLmmqsmjRk1OImrO1mTR5S+C+FSUlqY4IViVyJMbRSDbZx vEJwZuB0tE44JR88wWFC7l5L4XvRFmkzEHo++RkDAFkYftUTVKgNQ87MV7q7YquvG3Xx RI5f+UkkTbROfR5KfACop71B4upy/Kfp2Fe8g1fsaiCFCyrSOSyz3rldK2+lm5w0eKkx FhSerZ7Km1TdVOrp+jdqel72lCU1Zh8wUM0TV0Ro9GaR3QFKJPbFvdSFdUkkP2sVdGT5 SIrgwQ2cL0Jb2kYVvWVjv/dLaJemK6e22+hnMcEVkug9gD8oQ16kCWZpM2g3aO4qfOcH H5iw== X-Gm-Message-State: AA+aEWbIVCq+J3kGAeoXfEOZolVaZEXPqa/lgxAvgHa1SaRvmyxEJS3B 27w42URZpkGMN0UksLWYPTsg+JELIuY= X-Received: by 2002:a1c:cbca:: with SMTP id b193mr15610200wmg.64.1544043639098; Wed, 05 Dec 2018 13:00:39 -0800 (PST) Received: from peano (host93-127-dynamic.50-79-r.retail.telecomitalia.it. [79.50.127.93]) by smtp.gmail.com with ESMTPSA id t70sm17182982wmd.36.2018.12.05.13.00.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 13:00:37 -0800 (PST) Date: Wed, 5 Dec 2018 22:00:34 +0100 From: Sicilia Cristian To: Bryan O'Donoghue Cc: Johan Hovold , Alex Elder , Greg Kroah-Hartman , greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] staging: greybus: Added space between string concatenated Message-ID: <20181205210034.GA24054@peano> References: <5b215b50d4da9a7730450a83fb5e3a167b65e03a.1543956271.git.sicilia.cristian@gmail.com> <42632636-9b08-bd75-b789-88ef82f52c2c@nexus-software.ie> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: <42632636-9b08-bd75-b789-88ef82f52c2c@nexus-software.ie> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 05, 2018 at 10:12:24AM +0000, Bryan O'Donoghue wrote: > On 04/12/2018 20:58, Cristian Sicilia wrote: > >Some concatenated strings are now spaced. > > > >Signed-off-by: Cristian Sicilia > >--- > > drivers/staging/greybus/loopback.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > >diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybu= s/loopback.c > >index 1085e06..acfa392 100644 > >--- a/drivers/staging/greybus/loopback.c > >+++ b/drivers/staging/greybus/loopback.c > >@@ -141,7 +141,7 @@ static ssize_t name##_##field##_show(struct device *= dev, \ > > /* Report 0 for min and max if no transfer successed */ \ > > if (!gb->requests_completed) \ > > return sprintf(buf, "0\n"); \ > >- return sprintf(buf, "%"#type"\n", gb->name.field); \ > >+ return sprintf(buf, "%" #type "\n", gb->name.field); \ > > } \ > > static DEVICE_ATTR_RO(name##_##field) > >@@ -176,7 +176,7 @@ static ssize_t field##_show(struct device *dev, \ > > char *buf) \ > > { \ > > struct gb_loopback *gb =3D dev_get_drvdata(dev); \ > >- return sprintf(buf, "%"#type"\n", gb->field); \ > >+ return sprintf(buf, "%" #type "\n", gb->field); \ > > } \ > > static ssize_t field##_store(struct device *dev, \ > > struct device_attribute *attr, \ > >@@ -212,7 +212,7 @@ static ssize_t field##_show(struct device *dev, \ > > char *buf) \ > > { \ > > struct gb_loopback *gb =3D dev_get_drvdata(dev); \ > >- return sprintf(buf, "%"#type"\n", gb->field); \ > >+ return sprintf(buf, "%" #type "\n", gb->field); \ > > } \ > > static ssize_t field##_store(struct device *dev, \ > > struct device_attribute *attr, \ > > > Eh. >=20 > But doesn't all of this add an extra two space to the resultant string ? >=20 > Not what we want. It doesn't change the result string, if I well understand the question your doubt is if there are some space between % and type or between type and end of line: This (supposing type=3Du and field=3Dmin): return sprintf(buf, "%"#type"\n", gb->field); Will expanded in this return sprintf(buf, "%""u""\n", gb->min); That's is like: return sprintf(buf, "%u\n", gb->min); This (supposing type=3Du and field=3Dmin): return sprintf(buf, "%" #type "\n", gb->field); Will expanded in this return sprintf(buf, "%" "u" "\n", gb->min); That's is like: return sprintf(buf, "%u\n", gb->min); >=20 > --- > bod --0F1p//8PRICkK4MW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJcCDxuAAoJEAnJ2Lo5pAXyE7kQAI9hw/akm2KI6P37qIEWhcHe H4dsIjB7/uMB79462NZ6dbgktuhRxCqWvXmfRHgHzV3khGmQ+PXH8kj5LoknTOOV I8TpT/vPzxjQuXsDSesvXhLKYeRyCXIIKMFTVzpVnpl57qUQnZZieyixFpGn5Q91 k9iiZPjpLvcZaS4hltsG/makwSdLbzd6xHrnO9TUet8KErd8UCsHUczGpFFL6Awq pCk9Yy+oImIVoRNklJciUF6qeZs4+gBHrEhCX2H36SPfCS2GnCec7ugv/WX4HDtQ rHes5lx/f8PIsG7zkneay5f8Jgp0+WvnJzqZM/sQRLJDznEio66rdVs3oGl8YSyD 3zLRkvmS6q1aXZetKOStwqkF9ntb/l/FMPR9qjIPlL4KHdOfv45k6W3QnAADO66j QTfYU++6cRZfuOsLEbfDDmZWB1Ik/UDKyDS4dU7mGnnmfrh1HyUdMjIVMmcL/BoR WfbGoZOdsGlc4GC8V3JgilzkvRcRwHFshsR2gAGcp5vr9Ot/El69hm8ZzVKTgiKX Ub4utnXit5hsUL9O8RiJHaLHw0V9Z5b/RKJYXQEG7m+HMiSQ1JiL6ZSsNqNqkSW5 +huP39+CnjHcleGMnkqXgNQdkq7QsBXwzsvbbBCa8mdycmCAaOPLPQb6Hwd7Lsg1 TK74teYQGQBt04DLkVn6 =mbVF -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW--