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 D28A35A0274 for ; Wed, 28 Feb 2024 07:24:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709101488; 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=XKVU+5C14cAr62UK0qNTQr3fG5ZGkcTODpsfTGbpfQc=; b=dH0NUvWFP6QN9dd0bQqKjxsBFFeZhjv9LH96D9OKmxv7+aQa/Ck5AdsBD3+IMrTj2rhzC9 jTJ2m8VSQoa7qKHldsxNeZRNPJNx3gbtV6Pl1rnbfqzUY73kmeMgxoQ4eHd++miIJX38uv ItmL44vybWoJXqM/D+Gc86cKgEddrxk= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-96-zJnNFn80PmW3Nj1pEdV6wQ-1; Wed, 28 Feb 2024 01:24:47 -0500 X-MC-Unique: zJnNFn80PmW3Nj1pEdV6wQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a440b057909so6793366b.3 for ; Tue, 27 Feb 2024 22:24:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709101485; x=1709706285; 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=XKVU+5C14cAr62UK0qNTQr3fG5ZGkcTODpsfTGbpfQc=; b=hAMv800EAmhcAQiXgUF7lHChkNkypEee+Aa6SsvSKriyp2nz31TyJl6m5iYCcB/RRU Ft+pG+pX9fTwW3Z5KjSlWDsnbB+KQ3ftMpgfv9HkFsBBB5xVk/Aaaq6rlleAYul0VPJe tblVknJvDKEX79Quv2niEOVZ/Y8WyXypoMb8Mx+CrYTRKGDJ/cE8nqWp08ZYDUbr566g fITrdNiPLWQUMg8x+VvwWM/M8nZeeQHPl7vujEFWLl64x/MUltqRq0tnAylk/48D2Bk/ 0Et2yAKZyPPBS72Sllfz1b4RWXTwERL3CHfVt951/C2pQ5L2ad0NcRC1uLrJoButKkJs NpYg== X-Gm-Message-State: AOJu0YxyZmSCE22CbRewHXhkRjjjTtaJFZWzt0Og8S57U2lJj2P5vc2r UJ7n4Rvb4CUkgMRsvd5f9j1NaJeRXVG/hT9/AaWE6MR5o+B+hGBdOjBSYlIIm4+W+ByVNJFkZPj i7NTGRroD22fVPdGRuH8wWZ6v66e2DOcj0pTsZGMld+whmnWERXrgLNZXRPhs X-Received: by 2002:a17:906:5f97:b0:a40:75e8:a84e with SMTP id a23-20020a1709065f9700b00a4075e8a84emr7533969eju.5.1709101485455; Tue, 27 Feb 2024 22:24:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHkpTPZOcW83A62OJIvTtytZWunDzmRqGzJGlr6I7yPgjzdSofH+VcFB6fpEfNmO68Zhi7XKA== X-Received: by 2002:a17:906:5f97:b0:a40:75e8:a84e with SMTP id a23-20020a1709065f9700b00a4075e8a84emr7533958eju.5.1709101485152; Tue, 27 Feb 2024 22:24:45 -0800 (PST) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id p11-20020a170906b20b00b00a3d83cff358sm1495372ejz.70.2024.02.27.22.24.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2024 22:24:44 -0800 (PST) Date: Wed, 28 Feb 2024 07:24:10 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 3/6] util: Add write_remainder() helper Message-ID: <20240228072410.61988488@elisabeth> In-Reply-To: References: <20240222055602.1872516-1-david@gibson.dropbear.id.au> <20240222055602.1872516-4-david@gibson.dropbear.id.au> <20240227152551.72d8744f@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: GGH5VLCNTH2UIY6AQJSB6SB2SOAXYCTE X-Message-ID-Hash: GGH5VLCNTH2UIY6AQJSB6SB2SOAXYCTE 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 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. -- Stefano