From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A70955A0274 for ; Wed, 28 Feb 2024 10:07:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1709111252; bh=RQU1zpZflaTcSpelnDarTXbhkIvlyL4EilXscwV9LQk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dgnbqYBhfVfATkCIWLs5znL0tBg3BraDbjdJ8CrTMUKpLvEWGHSpGFkBOfAvP+xy7 vxIRWQmTxbcAofqIs2y4Sawvax4ogMusxszoc7c0qcaJcjz1Fc2UzImMDuWRbB8wOU y2ZCL8g0mfC3HuBLJkOipeGJgvWWoSA5jBJZr+wFenUj78YJjRY/JnbHlZa+FxsoNP 44gQeViCSV497CsceL/mCSQlKHhexcdwzCxUAC7MdR4zQQeJ1BV82Tve5ls/LFne4E 8c2gzO5XvF2oITm6VtpTRCuBHfWRaygnM0M1YoJvWRYe/r6INMswW6q4t7bu00invS rJ6JMCT7tOBzQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Tl7m42wkQz4wck; Wed, 28 Feb 2024 20:07:32 +1100 (AEDT) Date: Wed, 28 Feb 2024 20:04:55 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 3/6] util: Add write_remainder() helper Message-ID: References: <20240222055602.1872516-1-david@gibson.dropbear.id.au> <20240222055602.1872516-4-david@gibson.dropbear.id.au> <20240227152551.72d8744f@elisabeth> <20240228072410.61988488@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bHZ7+WXrZvVLP/+v" Content-Disposition: inline In-Reply-To: <20240228072410.61988488@elisabeth> Message-ID-Hash: U67UYMIZV63GJ7SW7QWATZ6EP5CFSFK4 X-Message-ID-Hash: U67UYMIZV63GJ7SW7QWATZ6EP5CFSFK4 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --bHZ7+WXrZvVLP/+v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 28, 2024 at 07:24:10AM +0100, Stefano Brivio wrote: > On Wed, 28 Feb 2024 11:44:28 +1100 > David Gibson wrote: >=20 > > On Tue, Feb 27, 2024 at 03:25:51PM +0100, Stefano Brivio wrote: > > > On Thu, 22 Feb 2024 16:55:59 +1100 > > > David Gibson wrote: > > > > > > [...] > > > > > > > + > > > > + if (skip) =20 > > >=20 > > > Curly brackets here for consistency (undecided about readability to be > > > honest). =20 > > > > Uh.. consistency with what? We don't typically brace single line > > clauses in passt. > > > > > > + rc =3D write(fd, (char *)iov[i].iov_base + skip, > > > > + iov[i].iov_len - skip); >=20 > These are two lines though. I've been trying to keep this consistent > with the Linux kernel's net/ and drivers/net/ style, where curly braces > are used for multiple lines, even if it's a single statement. Ah, fair enough. It never occurred to me to consider physical lines rather than logical lines. Adjust and merge if you want, otherwise I'll respin with this change tomorrow. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --bHZ7+WXrZvVLP/+v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmXe9yYACgkQzQJF27ox 2GcbEQ/+PINOT3SOtCEyoMOblhqdXId68VYpRzw/U8SbMSF7wIQUU/YhMOBCniv1 lvsig+HKEGa3ZA0c36o2s/RPRx1zcinoVGgVj6ILbKO0/tzTuEU/cjPkFJO/Tiyq H0rvVqqVPiI7k7Oo9+x2y0SSzWfzdz4iH62Ycch0gd6cM5S4Za8cN9gT/zPZKbsY NDmFbRkk5BYJGGqf1J7jHUhzHrS69NotpobpIMd0eO8zIHQPOC+RI6T9QhVXxR+D 1E5X0ijKw8ANF2vvfWGpzkzreBuOjpKkhEpnzWJ1BcgKQHCH7XheRJTeMCLNu1CM P7hEKKy+U6CYxJbg4Jnr5byaXCDnbxuN1INFSZ1NiqGLSwqP7u2oayp6SjeHzCpi 5xYGG4Ng6lqEl1sPCxYLQjGKBiizn0I9j+JvJzaoIzbH55tsneQ0JqvkfwDoXKXi 4dQvWQN4OJ52kM7/z0w66wMURL0SXQutRMW4yAfZ4jLU/EPigjAJWNLg4RUYk6HW UVlNbG/IT9heBp2EJvWWzOjaHIkktL+4HBx52ksY+I9YFh0VuWb0z0cr5oDedHwH ZvxkxkiXdzPXwx2YE/JXO+zmZ6un2lyZ1o4Y7MLvJxpIuAH4kKqB14LBqn1qhkZx YJFou1Qq68JCZRO2c/2V3TEVah7fZHlv3+BNN7HOCoJ+ksOMUiQ= =5fjM -----END PGP SIGNATURE----- --bHZ7+WXrZvVLP/+v--