From patchwork Sun Sep 22 14:46:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3511 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 179D53F14C for ; Sun, 22 Sep 2024 16:46:30 +0200 (CEST) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5c5b83b6718sf1179405a12.3 for ; Sun, 22 Sep 2024 07:46:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727016389; cv=pass; d=google.com; s=arc-20240605; b=jBOgYkM0MRf41IDfbHwG09KqJ0gPzLV6dBt+8mZm7/HlTJ9J6wsWAQnx9+qJlg2Lc9 0O9ydyADrVQHiWoHqI69/TXkrFXT9Y82fKgPNg+WGTPVhvfisMxcjZ0YcmYlPMyBwyoE RT3ky9GWG5rGuhSdf2K63oNS7xfSY262ddJsgvG1vj9QAry4wYZk4F7yN/+mlynvKFnZ snIa/MDulRzJ02PKiN8T35UyODX+36TJF619ShjFVB1Q8yrM6F6GcVrAlINLj4IMrkkF jcVcS04kGZlev2ke4g1Q7cvdHrluoTBaaG1/D7mUsPDcxFN9VKcDUtm5FiFAzTWvRYRR lJpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; fh=RgqKAXl4peoIO04J+Sehp9efrWN7DxzEsNDS3dB0xms=; b=JMpMLFKUfIlLBCGeoMBvTg00ArCVyPe+x3PPQdEUt5zXYW1u2TMjNrOd3uo3L8vh6g 3Q8awQ0VET+Xw0/x5SUrRNdh+6xmNB3lwB6sX+1m5wjNLEMfFB6TWfMAkdSaVnfCSDrC iytDpB6nBUn5Fo1Kj7hIlB43r/QwZGEB+HWaD7sTjYCTEbTErTlzfzSCUs3pBblk2WSQ aXnOMciqTxEutg7ry11gKwvz+BAn+iryg4sML1cqUegwT8QKzrFcG3LourgrFyAv1gMO tj9wQixf617RqZXLBnXtfKVAE6rEWBzeiBZBGTNFdWxo2itH/wZdFh2aCFx/AblLpc4L qySg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lH7NDaNR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727016389; x=1727621189; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; b=oIJCwuTHrN6lukqbop5bPSkbmqODbjsuNdZu7PrEEy5OzeQTu3z5lNnWM6IaojE2Hh 1Pf0MpcDKaBeyIBpaIHNAgjiirDr3rRvNwsrKzOVa2aGELwClurPsavMRaQlqVLz+s7z 6ui+nDuWD8dmm/nfPElaCAHMSntY1bIxTdUJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727016389; x=1727621189; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; b=xK6W8MZpIRJHtGaYhU1RCWFFXSCfPQZex6Xym6HBAQa7qjLwpIEhM8jk3dGFgzcE7B iJrTAZc2/AzVpEY/dglKk2RE8ge8d+rMzIqYv8cYN5YSpzJGLDx75ao+dgttU+4/2wJM ejwLlUoHIZCj7sp23cGRy+8efzlSEkWJwLVEYZLiOjPYPqmMwKhDWv09dMvMzLHHXy9N NNpzt/is7uJndGais5e3MoqaRNtxG3Q8uUzs4Az3MEFBVUkeL6bkEz+ljGF1YvxqzsRb rWI9ymGNWtIAD95I8V3FL4CkFDcglLaBHZ6jxFhybrUAT0HFoi6z5rlh0gkVj2DUABvK NCdw== X-Forwarded-Encrypted: i=2; AJvYcCW6n9Dbp0B4vmFzKGii5otnckBAqH68n1B58hNd/7oAO3jjK4d/rYrbsRxTZVu13y2e8QSRZG1nBarJS282@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzPbpDtxZtjkrsgBsCo9NFLGJaWhgPckOqK6csuGTZMFLgr7JKo ul/lYZNfCRAsOXv/mRaalT8Lknmv1RC+k0oaF/9l+++e3Scr+wPFMc79QTC8g4YP+Q== X-Google-Smtp-Source: AGHT+IGcTBfZqx8El2Et0w73wnvcNUX8jqgNtTXoAXvhCPOrQueKXK/gzBctXOVnm4mzfDyJUtJvPA== X-Received: by 2002:a17:907:7b92:b0:a8a:9246:7f57 with SMTP id a640c23a62f3a-a90d4fbcd4dmr1112736166b.4.1727016389500; Sun, 22 Sep 2024 07:46:29 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:35cf:b0:5c4:2278:28dd with SMTP id 4fb4d7f45d1cf-5c45995355als1470209a12.2.-pod-prod-06-eu; Sun, 22 Sep 2024 07:46:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVD1R+Bqw7u+GAU3B4KBG00K0tWz7VAJZ6G7g7/xGtSoNKRZIKX8AgLSI1eZiptAXAotTJuUnEyOIWFx0E@amarulasolutions.com X-Received: by 2002:a17:907:f1a6:b0:a86:7fc3:8620 with SMTP id a640c23a62f3a-a90d4ffc1b8mr907024966b.31.1727016387863; Sun, 22 Sep 2024 07:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727016387; cv=none; d=google.com; s=arc-20160816; b=fRWv5uydxDPw9ZcnkGT3ku6d8ekKxPZi0XLSJnyyylw58k8VZI94AyRP5KgneCi824 HEQ89FP1eY3zKe/afvpy/5nZxkFDb/HwalGOFHtNBEhqqhPAeQeSzQB5jVxVomj4yo7r i7/LhPSQ0eqeU/ISM/oAmwitK5FCMOl538G/WSDZIB7XgZAWdWMYHbSBOH7BuK+ifxXj kWAgzSzJ2eb75rYzqFVoALeg56EOdwnZXX4JsmV/K4uehE7K88xM6bnxOLogSDGtfg12 U3m1NYrsau7tIzuRhSFvBI21lnAAFlEQERYCVUmwNJjbjECgAoKqDUvj7XXtx+c/Rux7 BoIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=YPYlfu2VkH5W38C/INzwLlNXJPhMZKljvgdLTCWrM5w=; fh=sK5J+WaGXNlNSlNpQ/BrZZfawJVi6XPLjciAb9mRiYU=; b=Pw4bm101WkofE8vHZEKrvayvVOliSLjBZlbjf3xqW0DPJe1ZlCVq6vK9Dq59om8aBP XmaSe5eyLWPVXMLw6z1tI7nQe5Fgb8rj2FFpx36PkfgzcrgGZe5lZtYwb17NzYfDzbOS kwtkyglB7x9PXnWRjdpXT9O/yHpMZPzde0aHkZafQrAFGWJtlnPSojukXvkvhvaT2agU xYs83TEiLjVDqMZ3Oc/POhcJqlRfyceW1EmgJTw2v/uC9JrMrhmGLhgKDQBGeC+U+gGi 4v1pc3L9FKD4d2GAN53km2wKeb6es0aJWbxMmrzb7W/BBJKt0KRRoSdVhHu+QuZrnKFb 6TYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lH7NDaNR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a90612b452esor696141066b.15.2024.09.22.07.46.27 for (Google Transport Security); Sun, 22 Sep 2024 07:46:27 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCVSa/6BkEkq3OujoC8ztD68weuGKH/WxGTsggt5bcIxeYsfk7+rNqEYlyZNPahOAlzWgZaaj9jJyrlWe+WQ@amarulasolutions.com X-Received: by 2002:a17:907:3f19:b0:a86:43c0:4270 with SMTP id a640c23a62f3a-a90d4fbc6a1mr1015534366b.13.1727016387277; Sun, 22 Sep 2024 07:46:27 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-102-52.retail.telecomitalia.it. [79.20.102.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9061331694sm1088425766b.210.2024.09.22.07.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 07:46:26 -0700 (PDT) From: Dario Binacchi To: netdev@vger.kernel.org Cc: Stephen Hemminger , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [iproute2, RESEND PATCH 1/2] arpd: use designated initializers for msghdr structure Date: Sun, 22 Sep 2024 16:46:12 +0200 Message-ID: <20240922144613.2103760-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lH7NDaNR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes the following error: arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 442 | NULL, 0, raised by Buildroot autobuilder [1]. In the case in question, the analysis of socket.h [2] containing the msghdr structure shows that it has been modified with the addition of padding fields, which cause the compilation error. The use of designated initializers allows the issue to be fixed. struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN int __pad1; #endif int msg_iovlen; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN int __pad1; #endif void *msg_control; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN int __pad2; #endif socklen_t msg_controllen; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN int __pad2; #endif int msg_flags; }; [1] http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c/ [2] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h Signed-off-by: Dario Binacchi --- misc/arpd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/arpd.c b/misc/arpd.c index e77ef53928a2..b4935c23eebb 100644 --- a/misc/arpd.c +++ b/misc/arpd.c @@ -437,10 +437,10 @@ static void get_kern_msg(void) struct iovec iov; char buf[8192]; struct msghdr msg = { - (void *)&nladdr, sizeof(nladdr), - &iov, 1, - NULL, 0, - 0 + .msg_name = &nladdr, .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, .msg_iovlen = 1, + .msg_control = (void *)NULL, .msg_controllen = 0, + .msg_flags = 0 }; iov.iov_base = buf;