From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id AFB5B5A0278 for ; Wed, 28 Feb 2024 10:23:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709112206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ogy8Z9AHjcU7A8kbvTexDoFqU27tlhY76s72RkFB/bA=; b=jGLMIDnlsdI2YDPY+L/wWvE3vorVBDeMYw9yXOrLUbMAt5UqoxYBK6090YVv/mKNzpJRrR f+xAhdfvcvXZFq5Ks8pu1yV0VnjD2zAWPMhNlS23vSwfqbuEZCtU0fo4d0IxpuERAh+fEF dDloZrLQ8cdGeaoAfSDQrbkt3IC4rq4= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-380-FpdQfB4VOc20YkcuOL1raA-1; Wed, 28 Feb 2024 04:23:24 -0500 X-MC-Unique: FpdQfB4VOc20YkcuOL1raA-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-566418cacbeso1021267a12.2 for ; Wed, 28 Feb 2024 01:23:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709112203; x=1709717003; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ogy8Z9AHjcU7A8kbvTexDoFqU27tlhY76s72RkFB/bA=; b=uCpPOUfSx/D1caskS7dPoFwGNljXyIXYS4QPl+l0WfNHefng+vApJhoX0aOSFzXrvd VMRZ4zTwHK8i9MZKW0fClyN6GVo0I1V2yzU7fvaeAF2A6mtmqfiF0aW8pxNJ6eM0p61v j5eKoQNBwKU4mOqV/rS20aoCwDD9ynDdkeurEO9WjBloSTmVZ41dAoCSjfyztC8INl6n yOlAAdZJdwyzVqF90tQ0etybpGVKZ0IuepJqCFiP7rXOnLx0QVlxFBf4eJ/JdcyxRDZO DU7VkP2FOHHAtOC5y2N0JSFlka4JiIr9b1LnYxhOeM9CEdR5OFnUfyx7NHHIfPOhxto3 7w2Q== X-Gm-Message-State: AOJu0YwmXlwb0kaW+ZL5zO3UtxfU+1DgE4QzZYsP93rYDUCXhH7FRI4L ZnU+8/E5UIrcnr56j5g4QBd/hHreGygiWeR/xalq5d6mKKAmLXnNdm66+2ur6chgIDI97b1mTtd MS0lQwCVkE6x5+T9P9Ko8HKZSV96pGPEtbyv5icZ8Yimu0gtVLQ== X-Received: by 2002:a05:6402:713:b0:566:733:917 with SMTP id w19-20020a056402071300b0056607330917mr4991709edx.16.1709112203583; Wed, 28 Feb 2024 01:23:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLK1nTwCh/EFNs0NCKSZ6esb+BB6x5+Smxo9+JQtD8YenHC2oONczGSHVvS5Ug9aSxOAJ0GA== X-Received: by 2002:a05:6402:713:b0:566:733:917 with SMTP id w19-20020a056402071300b0056607330917mr4991699edx.16.1709112203210; Wed, 28 Feb 2024 01:23:23 -0800 (PST) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id c5-20020a0564021f8500b005653439cadcsm1598566edc.25.2024.02.28.01.23.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2024 01:23:22 -0800 (PST) Date: Wed, 28 Feb 2024 10:22:47 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 3/6] util: Add write_remainder() helper Message-ID: <20240228102247.63854842@elisabeth> In-Reply-To: References: <20240222055602.1872516-1-david@gibson.dropbear.id.au> <20240222055602.1872516-4-david@gibson.dropbear.id.au> <20240227152551.72d8744f@elisabeth> <20240228072410.61988488@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: GNOGUMDO7EV2KCU474K3NRX5R5FKMHCA X-Message-ID-Hash: GNOGUMDO7EV2KCU474K3NRX5R5FKMHCA X-MailFrom: sbrivio@redhat.com 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: On Wed, 28 Feb 2024 20:04:55 +1100 David Gibson wrote: > 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: > > > > > 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) > > > > > > > > Curly brackets here for consistency (undecided about readability to be > > > > honest). > > > > > > Uh.. consistency with what? We don't typically brace single line > > > clauses in passt. > > > > > > > > + rc = write(fd, (char *)iov[i].iov_base + skip, > > > > > + iov[i].iov_len - skip); > > > > 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. Sure, let me adjust this on merge. I'm still reviewing the rest. -- Stefano